functionSource
stringlengths
20
97.4k
CWE-119
bool
2 classes
CWE-120
bool
2 classes
CWE-469
bool
2 classes
CWE-476
bool
2 classes
CWE-other
bool
2 classes
combine
int64
0
1
evas_gl_context_destroy(Evas_GL *evas_gl, Evas_GL_Context *ctx) { MAGIC_CHECK(evas_gl, Evas_GL, MAGIC_EVAS_GL); return; MAGIC_CHECK_END(); if (!ctx) { ERR("Trying to destroy a NULL context pointer!"); return; } // Call Engine's destroy evas_gl->evas->engine.func->gl_contex...
false
false
false
false
false
0
DecodePosixTimezone(char *str, int *tzp) { int val, tz; int type; char *cp; char delim; cp = str; while (*cp != '\0' && isalpha((unsigned char) *cp)) cp++; if (DecodeTimezone(cp, &tz) != 0) return -1; delim = *cp; *cp = '\0'; type = DecodeSpecial(MAXDATEFIELDS - 1, str, &val); *cp = delim;...
false
false
false
false
false
0
_rocker_neigh_del(struct switchdev_trans *trans, struct rocker_neigh_tbl_entry *entry) { if (switchdev_trans_ph_prepare(trans)) return; if (--entry->ref_count == 0) { hash_del(&entry->entry); rocker_port_kfree(trans, entry); } }
false
false
false
false
false
0
elm_font_available_hash_add(Eina_List *list) { Eina_Hash *font_hash; Eina_List *l; void *key; font_hash = NULL; /* populate with default font families */ //FIXME: Need to check whether fonts are being added multiple times. font_hash = _elm_font_available_hash_add(font_hash, "Sans:style=Regular");...
false
false
false
false
false
0
commit_cowonly_roots(struct btrfs_trans_handle *trans, struct btrfs_root *root) { struct btrfs_fs_info *fs_info = root->fs_info; struct list_head *dirty_bgs = &trans->transaction->dirty_bgs; struct list_head *io_bgs = &trans->transaction->io_bgs; struct list_head *next; struct extent_buffer *eb; int ret; ...
false
false
false
false
false
0
Java_ncsa_hdf_hdflib_HDFLibrary_HXsetdir ( JNIEnv *env, jclass clss, jstring dir) { intn rval; char *str; if (dir != NULL) { str =(char *) ENVPTR->GetStringUTFChars(ENVPAR dir,0); } else { str = NULL; } rval = HXsetdir(str); if (str != NULL) { ENVPTR->ReleaseString...
false
false
false
false
false
0
drawSquares(QPaintEvent* event) { QPainter p(this); for(Square square = 0; square < 64; square++) { QRect rect = squareRect(square); if(!event->region().intersects(rect)) { continue; } int coord = m_coordinates ? CoordinateSize : 0; int x = isFlip...
false
false
false
false
false
0
string_array_add(char ***list, char **list_buf, int *num_str, int *max_str, int *max_buf, const char *str) { char *next_str = *num_str ? (*list)[*num_str - 1] + strlen((*list)[*num_str - 1]) + 1 : *list_buf; // Need to grow an array? if (*num_str >= *max_str) { char **new_list = (char **) d_realloc(*list, *max_...
false
false
false
false
false
0
SendSecureTokenResponse(RTMP *r, AVal *resp) { RTMPPacket packet; char pbuf[1024], *pend = pbuf+sizeof(pbuf); packet.m_nChannel = 0x03; /* control channel (invoke) */ packet.m_headerType = RTMP_PACKET_SIZE_MEDIUM; packet.m_packetType = 0x14; packet.m_nInfoField2 = 0; packet.m_nInfoField1 = 0; packet.m_...
false
false
false
false
false
0
fileio_read(fileio *self, PyObject *args) { char *ptr; Py_ssize_t n; Py_ssize_t size = -1; PyObject *bytes; if (self->fd < 0) return err_closed(); if (!self->readable) return err_mode("reading"); if (!PyArg_ParseTuple(args, "|O&", &_PyIO_ConvertSsize_t, &size)) retu...
false
false
false
false
false
0
menu_toggle (ClutterActor *actor, ClutterEvent *event, gpointer user_data) { ClutterAnimation *animation; ClutterActor *menu = CLUTTER_ACTOR (user_data); if (clutter_actor_get_animation (menu)) return; if (clutter_actor_get_opacity (menu) > 0) { animation = clutter...
false
false
false
false
false
0
init_parent(pid_t pid,const std::string& pid_file) { if(!pid_file.empty()) { /* write pid to pid file */ std::fstream pf(pid_file.c_str(), std::fstream::out); pf << pid << std::endl; pf.close(); } }
false
false
false
false
false
0
qtdemux_parse_theora_extension (GstQTDemux * qtdemux, QtDemuxStream * stream, GNode * xdxt) { int len = QT_UINT32 (xdxt->data); guint8 *buf = xdxt->data; guint8 *end = buf + len; GstBuffer *buffer; /* skip size and type */ buf += 8; end -= 8; while (buf < end) { gint size; guint32 type; ...
false
true
false
false
false
1
destroy_StoreEntry(void *data) { StoreEntry *e = data; debug(20, 3) ("destroy_StoreEntry: destroying %p\n", e); assert(e != NULL); if (e->mem_obj) destroy_MemObject(e); storeHashDelete(e); assert(e->hash.key == NULL); memFree(e, MEM_STOREENTRY); }
false
false
false
false
false
0
GlyfContourCount(gr::gid16 nGlyphId, const void * pGlyf, const void * pLoca, size_t lLocaSize, const void * pHead, size_t & cnContours) { cnContours = static_cast<size_t>(INT_MIN); if (IsSpace(nGlyphId, pLoca, lLocaSize, pHead)) {return false;} void * pSimpleGlyf = GlyfLookup(nGlyphId, pGlyf, pLoca, lLocaSize, p...
false
false
false
false
false
0
command_get_children(char * token, Channel * c) { char id[256]; json_read_string(&c->inp, id, sizeof(id)); if (read_stream(&c->inp) != 0) exception(ERR_JSON_SYNTAX); if (read_stream(&c->inp) != MARKER_EOM) exception(ERR_JSON_SYNTAX); write_stringz(&c->out, "R"); write_stringz(&c->out, token); ...
true
true
false
false
false
1
reset(struct east_state *es) { int sz; void *ptr; struct rpacket *p; struct owned *ow; FILE *f; char mac[18]; /* close buddy */ close(es->es_buddys); es->es_buddys = 0; /* reset state */ ptr = es->es_apmac; sz = sizeof(*es) - ((unsigned long)ptr - (unsigned long)es); memset(ptr, 0, sz); /* fixup state ...
true
true
false
false
true
1
paintEvent(QPaintEvent *) { QPainter p(this); if (needLayout) layoutItems(); foreach(const PreviewCursor *c, list) { if (c->pixmap().isNull()) continue; p.drawPixmap(c->position(), *c); } }
false
false
false
false
false
0
hqxchar(void) { int c; do c = getc(file); while (c != EOF && ISRETURN(c)); if (c == EOF) { if (feof(file)) ERROR(EINVAL, "unexpected end of file"); else ERROR(EIO, "error reading input file"); return -1; } c = demap[(unsigned char) c]; if (c == 0) { ERROR(EINVAL, "...
false
false
false
false
false
0
tr_load() { if (CKT_BASE::_sim->is_inc_mode()) {itested(); assert(!OPT::traceload); for (iterator ci=begin(); ci!=end(); ++ci) {itested(); trace_func_comp(); CARD* brh = *ci; if (!brh->is_constant()) {itested(); brh->tr_load(); }else{itested(); } } }else{ for (iterator...
false
false
false
false
false
0
apc_agent_timeout(unsigned long data) { u32 index; struct sci_timer *tmr = (struct sci_timer *)data; struct sci_port_configuration_agent *port_agent; struct isci_host *ihost; unsigned long flags; u16 configure_phy_mask; port_agent = container_of(tmr, typeof(*port_agent), timer); ihost = container_of(port_agent...
false
false
false
false
false
0
updateEffectiveTime(int currentTime) { QGraphicsWidget *w = targetWidget(); if (w && state() == QAbstractAnimation::Running) { const qreal delta = currentTime / qreal(duration()); w->setPos(m_startPos * (1-delta) + (m_targetPos * delta)); } }
false
false
false
false
false
0
sb_dsp_command(sb_devc * devc, unsigned char val) { int i; unsigned long limit; limit = jiffies + HZ / 10; /* Timeout */ /* * Note! the i<500000 is an emergency exit. The sb_dsp_command() is sometimes * called while interrupts are disabled. This means that the timer is * disabled also. However the timeout ...
false
false
false
false
false
0
BigDecimal_inspect(VALUE self) { ENTER(5); Real *vp; volatile VALUE obj; size_t nc; char *psz, *tmp; GUARD_OBJ(vp,GetVpValue(self,1)); nc = VpNumOfChars(vp,"E"); nc +=(nc + 9) / 10; obj = rb_str_new(0, nc+256); psz = RSTRING_PTR(obj); sprintf(psz,"#<BigDecimal:%"PRIxVALUE",...
false
true
false
false
false
1
find_metadata_(FLAC__StreamDecoder *decoder) { FLAC__uint32 x; unsigned i, id; FLAC__bool first = true; FLAC__ASSERT(FLAC__bitreader_is_consumed_byte_aligned(decoder->private_->input)); for(i = id = 0; i < 4; ) { if(decoder->private_->cached) { x = (FLAC__uint32)decoder->private_->lookahead; decoder->pri...
false
false
false
false
false
0
WebPIDecGetYUVA(const WebPIDecoder* idec, int* last_y, uint8_t** u, uint8_t** v, uint8_t** a, int* width, int* height, int* stride, int* uv_stride, int* a_stride) { const WebPDecBuffer* const src = GetOutputBuffer(idec); if (src == NULL) ret...
false
false
false
false
false
0
gt_color_equals(const GtColor *c1, const GtColor *c2) { gt_assert(c1 && c2); return ((c1->red == c2->red) && (c1->green == c2->green) && (c1->blue == c2->blue) && (c1->alpha == c2->alpha)); }
false
false
false
false
false
0
get_properties(DBusConnection *conn, DBusMessage *msg, void *data) { DBusMessage *reply; DBusMessageIter array, dict; struct timeval tv; const char *str; DBG("conn %p", conn); reply = dbus_message_new_method_return(msg); if (reply == NULL) return NULL; dbus_message_iter_init_append(reply, &array); c...
false
false
false
false
false
0
CreateFeature(TABFeature *poFeature) { int nFeatureId = -1; nFeatureId = WriteFeature(poFeature, -1); if (nFeatureId == -1) return OGRERR_FAILURE; poFeature->SetFID(nFeatureId); return OGRERR_NONE; }
false
false
false
false
false
0
parser_cxx_assist_proposal_new (IAnjutaSymbol* symbol) { IAnjutaEditorAssistProposal* proposal = g_new0 (IAnjutaEditorAssistProposal, 1); AnjutaLanguageProposalData* data = anjuta_language_proposal_data_new (g_strdup (ianjuta_symbol_get_string (symbol, IANJUTA_SYMBOL_FIELD_NAME, NULL))); data->type = ianjuta_symb...
false
false
false
false
false
0
matches(DrvName & n) { if (name != "*" && name != n.name) return false; if (version != "" && version != n.version) return false; return true; }
false
false
false
false
false
0
gfarm_size_add(int *overflowp, size_t a, size_t b) { size_t sum = a + b; if (sum < a) { *overflowp = 1; gflog_debug(GFARM_MSG_1000761, "Overlow when adding size_t (%llu) + (%llu)", (unsigned long long)a, (unsigned long long)b); } return (sum); }
false
false
false
false
false
0
return_void(int local_count) { fprintf(out, "; return_void\n"); fprintf(out, " mov SP, locals\n"); if (!is_main) { POP_HI("locals"); POP_LO("locals"); fprintf(out, " ret\n\n"); } else { // stop the cpu when program ends fprintf(out, " break\n"); } return 0; }
false
false
false
false
false
0
get_ctags_token(gchar *text,gint *advancing) { int i; int k=0; gchar *name; gchar *part = text; name=part; for (i=0;i<strlen(text);i++){ /* process until get a space*/ if (*(part+i)==' '){ while (*(part+i+k)==' ') k++; /*count spaces*/ break; } } name=g_malloc0(i+1); strncpy(na...
false
false
false
false
false
0
gth_grid_view_cursor_changed (GthFileView *file_view, int pos) { GthGridView *self = GTH_GRID_VIEW (file_view); GthGridViewItem *old_item; GList *link; GthGridViewItem *new_item; old_item = NULL; if (self->priv->focused_item >= 0) { link = g_list_nth (self->priv->items, self->pr...
false
false
false
false
false
0
test_status_submodules__initialize(void) { git_buf modpath = GIT_BUF_INIT; g_repo = cl_git_sandbox_init("submodules"); cl_fixture_sandbox("testrepo.git"); cl_git_pass(git_buf_sets(&modpath, git_repository_workdir(g_repo))); cl_assert(git_path_dirname_r(&modpath, modpath.ptr) >= 0); cl_git_pass(git_buf_joinpath...
false
false
false
false
false
0
write_statistics_of_this_indiv( ae_individual * indiv, int32_t num_gener ) { ae_stat_record* stat_record; for ( int8_t chrom_or_GU = 0 ; chrom_or_GU < NB_CHROM_OR_GU ; chrom_or_GU++ ) { stat_record = new ae_stat_record( _exp_m, indiv, (chrom_or_gen_unit) chrom_or_GU, true, num_gener ); for ( int8_...
false
false
false
false
false
0
GensymStar( void *theEnv) { char genstring[15]; /*=======================================================*/ /* Create a symbol using the current gensym index as the */ /* postfix. If the symbol is already present in the */ /* symbol table, then continue generating symbols until */ /* a u...
false
false
false
false
false
0
_cb_del_binding(void *data, void *data2 __UNUSED__) { E_Config_Dialog_Data *cfdata; E_Config_Binding_Acpi *binding, *bind2; Eina_List *l; if (!(cfdata = data)) return; if (!(binding = _selected_binding_get(cfdata))) return; /* delete from e_config */ EINA_LIST_FOREACH(e_config->ac...
false
false
false
false
false
0
Cns_get_smd_by_fullid(dbfd, fileid, copyno, fsec, smd_entry, lock, rec_addr) struct Cns_dbfd *dbfd; u_signed64 fileid; int copyno; int fsec; struct Cns_seg_metadata *smd_entry; int lock; Cns_dbrec_addr *rec_addr; { char fileid_str[21]; char func[22]; static char query[] = "SELECT \ S_FILEID, COPYNO, FSEC, SEGSI...
false
false
false
false
false
0
overwrite_extension (ASN1_TYPE asn, const char *root, unsigned int indx, const gnutls_datum_t * ext_data, unsigned int critical) { char name[ASN1_MAX_NAME_SIZE], name2[ASN1_MAX_NAME_SIZE]; const char *str; int result; if (root[0] != 0) snprintf (name, sizeof (name), "%s.?%u", root, ind...
false
false
false
false
false
0
dispatch_app_message(env, msg) ENV *env; REPMGR_MESSAGE *msg; { DB_REP *db_rep; DB_CHANNEL db_channel; CHANNEL channel; __repmgr_msg_metadata_args meta; DBT *dbt, *segment; u_int32_t flags, i, size, *uiptr; u_int8_t *data; void *ptr; int ret; COMPQUIET(size, 0); db_rep = env->rep_handle; db_channel.cha...
false
false
false
false
false
0
HandleGuildMOTDOpcode(WorldPacket& recvPacket) { DEBUG_LOG("WORLD: Received opcode CMSG_GUILD_MOTD"); std::string MOTD; if (!recvPacket.empty()) { recvPacket >> MOTD; } else { MOTD = ""; } Guild* guild = sGuildMgr.GetGuildById(GetPlayer()->GetGuildId()); if (!guild) { ...
false
false
false
false
false
0
skd_start_timer(struct skd_device *skdev) { int rc; init_timer(&skdev->timer); setup_timer(&skdev->timer, skd_timer_tick, (ulong)skdev); rc = mod_timer(&skdev->timer, (jiffies + HZ)); if (rc) pr_err("%s: failed to start timer %d\n", __func__, rc); return rc; }
false
false
false
false
false
0
dict2json(heim_object_t key, heim_object_t value, void *ctx) { struct twojson *j = ctx; if (j->ret) return; if (j->first) { j->first = 0; } else { j->out(j->ctx, NULL); /* eat previous '\n' if possible */ j->out(j->ctx, ",\n"); } j->ret = base2json(key, j); if (j->ret) return; j->ou...
false
false
false
false
false
0
xencons_probe(struct xenbus_device *dev, const struct xenbus_device_id *id) { int ret, devid; struct xencons_info *info; devid = dev->nodename[strlen(dev->nodename) - 1] - '0'; if (devid == 0) return -ENODEV; info = kzalloc(sizeof(struct xencons_info), GFP_KERNEL); if (!info) return -ENOMEM; dev_set_...
false
false
false
false
false
0
_begin(Evry_Plugin *plugin, const Evry_Item *it) { Plugin *p = NULL; if (it) { const char *dir = NULL; if ((CHECK_TYPE(it, EVRY_TYPE_FILE)) || (CHECK_SUBTYPE(it, EVRY_TYPE_FILE))) { /* browse */ GET_FILE(file, it); if (!evry->file...
false
false
false
false
false
0
ShiftRightGF2Vec( Obj vec, UInt amount ) { UInt len; UInt *ptr1, *ptr2, *ptr0; UInt i; UInt block; UInt off; if (amount == 0) return; len = LEN_GF2VEC(vec); ResizeGF2Vec(vec, len+amount); if (amount % BIPEB == 0) { /* move the blocks */ ptr1 = BLOCKS_GF2VEC(vec) + (len - 1 + amount...
false
false
false
false
false
0
calcWidth(const char *s, int count) { if (!prettyClock) //leave 2px space on both sides return (apmFont != null ? apmFont->textWidth(s, count) : 0) + 4; else { int len = 0; while (count--) { ref<YPixmap> p = getPixmap(*s++); if (p != null) ...
false
false
false
true
false
1
dwapb_do_irq(struct dwapb_gpio *gpio) { u32 irq_status = readl_relaxed(gpio->regs + GPIO_INTSTATUS); u32 ret = irq_status; while (irq_status) { int hwirq = fls(irq_status) - 1; int gpio_irq = irq_find_mapping(gpio->domain, hwirq); generic_handle_irq(gpio_irq); irq_status &= ~BIT(hwirq); if ((irq_get_tri...
false
false
false
false
false
0
ib_get_dma_mr(struct ib_pd *pd, int mr_access_flags) { struct ib_mr *mr; int err; err = ib_check_mr_access(mr_access_flags); if (err) return ERR_PTR(err); mr = pd->device->get_dma_mr(pd, mr_access_flags); if (!IS_ERR(mr)) { mr->device = pd->device; mr->pd = pd; mr->uobject = NULL; atomic_inc(&p...
false
false
false
false
false
0
page_func (gint current_page, gpointer data) { if (current_page == PAGE_SEARCH) { if (target_ssp != FALSE || automatic_pincode != FALSE) return PAGE_CONNECTING; else return PAGE_SETUP; } if (current_page == PAGE_SETUP) return PAGE_SUMMARY; return current_page + 1; }
false
false
false
false
false
0
ipmi_sdr_print_entry_byid(struct ipmi_intf *intf, int argc, char **argv) { struct sdr_record_list *sdr; int rc = 0; int v, i; if (argc < 1) { lprintf(LOG_ERR, "No Sensor ID supplied"); return -1; } v = verbose; verbose = 1; for (i = 0; i < argc; i++) { sdr = ipmi_sdr_find_sdr_byid(intf, argv[i]); if ...
false
false
false
false
false
0
_format_pvsegs(struct dm_pool *mem, const struct lv_segment *seg, int range_format) { unsigned int s; const char *name = NULL; uint32_t extent = 0; char extent_str[32]; if (!dm_pool_begin_object(mem, 256)) { log_error("dm_pool_begin_object failed"); return NULL; } for (s = 0; s < seg->area_count; s...
false
false
false
false
false
0
future_parse(PyFutureFeatures *ff, mod_ty mod, const char *filename) { int i, found_docstring = 0, done = 0, prev_line = 0; if (!(mod->kind == Module_kind || mod->kind == Interactive_kind)) return 1; /* A subsequent pass will detect future imports that don't appear at the beginning of the f...
false
false
false
false
false
0
LB216_close(Driver *drvthis) { PrivateData *p = drvthis->private_data; if (p != NULL) { if (p->fd >= 0) close(p->fd); if (p->framebuf) free(p->framebuf); free(p); } drvthis->store_private_ptr(drvthis, NULL); }
false
false
false
false
false
0
myrevstrdup(const char * s) { char * d = NULL; if (s) { size_t sl = strlen(s); d = (char *) malloc(sl+1); if (d) { const char * p = s + sl - 1; char * q = d; while (p >= s) *q++ = *p--; *q = '\0'; } else { HUNSPELL_WARNING(stde...
false
false
false
false
false
0
afm_message (AFMHandle handle, unsigned int level, char *message) { if (handle->verbose < level) return; fprintf (stderr, "%s", message); }
false
false
false
false
false
0
knot_ddns_check_update(const knot_rrset_t *rrset, const knot_packet_t *query, knot_rcode_t *rcode) { /* Accept both subdomain and dname match. */ dbg_ddns("Checking UPDATE packet.\n"); const knot_dname_t *owner = knot_rrset_owner(rrset); const knot...
false
false
false
false
false
0
_ghwp_metadata_hash_func (gpointer k, gpointer v, gpointer user_data) { gchar *name = (gchar *) k; GsfDocProp *prop = (GsfDocProp *) v; GHWPDocument *doc = (GHWPDocument *) user_data; GValue const *value = gsf_doc_prop_get_val (prop); if ( g_str_equal(name, GSF_META_NAME_CREAT...
false
false
false
false
false
0
isdn_tty_cmd_ATS(char **p, modem_info *info) { atemu *m = &info->emu; int bitpos; int mreg; int mval; int bval; mreg = isdn_getnum(p); if (mreg < 0 || mreg >= ISDN_MODEM_NUMREG) PARSE_ERROR1; switch (*p[0]) { case '=': p[0]++; mval = isdn_getnum(p); if (mval < 0 || mval > 255) PARSE_ERROR1; if (i...
false
false
false
false
false
0
mupdate_disconnect(mupdate_handle **hp) { mupdate_handle *h; if(!hp || !(*hp)) return; h = *hp; backend_disconnect(h->conn); free(h->conn); buf_free(&(h->tag)); buf_free(&(h->cmd)); buf_free(&(h->arg1)); buf_free(&(h->arg2)); buf_free(&(h->arg3)); if(h->acl_buf) free(h->a...
false
false
false
false
false
0
Server_noserverpossible() { /* we know! */ if(Server->time_noserverpossible) return; /* All servers have had attempts, and none were active IRC. */ Server->time_noserverpossible = time(NULL); Log_write(LOG_MAIN,"*","Unable to connect with any servers. Waiting %ds...",Grufti->serverpossible_timeout); }
false
false
false
false
false
0
ttm_dma_populate(struct ttm_dma_tt *ttm_dma, struct device *dev) { struct ttm_tt *ttm = &ttm_dma->ttm; struct ttm_mem_global *mem_glob = ttm->glob->mem_glob; struct dma_pool *pool; enum pool_type type; unsigned i; gfp_t gfp_flags; int ret; if (ttm->state != tt_unpopulated) return 0; type = ttm_to_type(ttm-...
false
false
false
false
false
0
T1_AAHGetGrayValues( long *pgrayvals) { int i; if (T1_CheckForInit()) { T1_errno=T1ERR_OP_NOT_PERMITTED; return(-1); } if (pgrayvals==NULL) { T1_errno=T1ERR_INVALID_PARAMETER; return(-1); } for ( i=0; i<17; i++) { /* bg (i=0) to fg (i=16) */ pgrayvals[i]=gv_h[i]; } return( 0); }
false
false
false
false
false
0
snd_atiixp_pcm_trigger(struct snd_pcm_substream *substream, int cmd) { struct atiixp *chip = snd_pcm_substream_chip(substream); struct atiixp_dma *dma = substream->runtime->private_data; int err = 0; if (snd_BUG_ON(!dma->ops->enable_transfer || !dma->ops->flush_dma)) return -EINVAL; spin_lock(&chip->r...
false
false
false
false
false
0
get_input_arg(struct combiner_state *rc, int arg, int flags) { int source = rc->source[arg]; int operand = rc->operand[arg]; /* Fake several unsupported texture formats. */ if (is_texture_source(source)) { int i = (source == GL_TEXTURE ? rc->unit : source - GL_TEXTURE0); struct gl_texture_object *t = rc->c...
false
false
false
false
false
0
scr_cursor(int mode) { D_SCREEN(("scr_cursor(%s)\n", (mode == SAVE ? "SAVE" : "RESTORE"))); switch (mode) { case SAVE: save.row = screen.row; save.col = screen.col; save.rstyle = rstyle; save.charset = screen.charset; save.charset_char = chars...
false
false
false
false
false
0
CopyHashes(struct CfAssoc **newhash,struct CfAssoc **oldhash) { int i; for (i = 0; i < CF_HASHTABLESIZE; i++) { newhash[i] = CopyAssoc(oldhash[i]); } }
false
false
false
false
false
0
gtk_source_completion_hide (GtkSourceCompletion *completion) { g_return_if_fail (GTK_SOURCE_IS_COMPLETION (completion)); reset_completion (completion); if (gtk_widget_get_visible (GTK_WIDGET (completion->priv->main_window))) { g_signal_emit (completion, signals[HIDE], 0); } }
false
false
false
false
false
0
get_matching_species(BOOL match_kompl, int match_weight, int match_mis, char *match_seq, MO_Liste *convert, long *number_of_species) { MO_Mismatch **ret_list = NULL; const char *servername = MP_probe_pt_look_for_server(); if (servername) { char *match_name, *match_mismatches, *mat...
false
false
false
false
false
0
AddBezierCurve(OGRLineString& lineString, double dfLatA, double dfLonA, double dfCtrPtLatA, double dfCtrPtLonA, double dfSymCtrlPtLatB, double dfSymCtrlPtLonB, ...
false
false
false
false
false
0
clone() const { AtomAbstractNode *node = OGRE_NEW AtomAbstractNode(parent); node->file = file; node->line = line; node->id = id; node->type = type; node->value = value; return node; }
false
false
false
false
false
0
mobskill_command_use_id_sub(struct block_list *bl, va_list ap ) { int skill_idx; int target_id; int target_type; int casttime; int commander_id; int *flag; struct mob_data* md = NULL; struct mob_skill *ms; nullpo_retr(0, bl); nullpo_retr(0, ap); commander_id = va_arg(ap,int); md = va_arg(ap,stru...
false
false
false
false
false
0
AscInitSetConfig(struct pci_dev *pdev, struct Scsi_Host *shost) { struct asc_board *board = shost_priv(shost); ASC_DVC_VAR *asc_dvc = &board->dvc_var.asc_dvc_var; PortAddr iop_base = asc_dvc->iop_base; unsigned short cfg_msw; unsigned short warn_code = 0; asc_dvc->init_state |= ASC_INIT_STATE_BEG_SET_CFG; if (a...
false
false
false
false
false
0
copy_stsyms(struct sy_t **osytab, word32 nsyms) { register int32 i; struct sy_t **sytbp; struct sy_t *nsyp; int32 bytes; bytes = nsyms*sizeof(struct sy_t *); __wrkstab = (struct sy_t **) __my_malloc(bytes); for (i = 0; i < (int32) nsyms; i++) { /* allocate the new symbol */ nsyp = (struct sy_t *) __my_...
false
false
false
false
false
0
_nrrdTernaryOpExists(double a, double b, double c) { return (AIR_EXISTS(a) ? b : c); }
false
false
false
false
false
0
node_score_changed_callback(GtFeatureNode *changed, GT_UNUSED double score, void *data) { unsigned long *id; ObserverCallbackInfo *info = (ObserverCallbackInfo*) data; gt_assert(changed); if ((id = node_ul_gt_hashmap_get(info->fis->...
false
false
false
false
false
0
starter_stroke_configure(starter_config_t *cfg) { stroke_msg_t msg; if (cfg->setup.cachecrls) { msg.type = STR_CONFIG; msg.length = offsetof(stroke_msg_t, buffer); msg.config.cachecrl = 1; return send_stroke_msg(&msg); } return 0; }
false
false
false
false
false
0
viewReport() { QString report = createReport(); QDialog viewReportDial(this); viewReportDial.setWindowTitle("View Report"); QVBoxLayout *layout = new QVBoxLayout(); layout->addWidget(new QLabel(tr("Report:"))); QTextEdit* txt = new QTextEdit(); txt->setReadOnly(TRUE); txt->insertPlainText(report); QTextCursor ...
false
false
false
false
false
0
read_sleep( int usec ) { struct timeval tv, tv2, tv3; int caplen; fd_set rfds; gettimeofday(&tv, NULL); gettimeofday(&tv2, NULL); tv3.tv_sec=0; tv3.tv_usec=10000; while( ((tv2.tv_sec*1000000 - tv.tv_sec*1000000) + (tv2.tv_usec - tv.tv_usec)) < (usec) ) { FD_ZERO( &rfds ); ...
false
false
false
false
true
1
cob_intr_midrange (const int params, ...) { cob_field *f, *basemin, *basemax; va_list args; int i; make_double_entry (); va_start (args, params); basemin = va_arg (args, cob_field *); basemax = basemin; for (i = 1; i < params; ++i) { f = va_arg (args, cob_field *); if (cob_cmp (f, basemin) < 0) { bas...
false
false
false
false
false
0
convert_bitmap(char *data, int size) { BITMAPV5HEADER *bih = (BITMAPV5HEADER *)data; BITMAPOS2HEADER *boh = (BITMAPOS2HEADER *)data; DWORD bmsize; int type = 0; int returnSize = 0; /* size to be returned */ /* * Originally the bih and b4h pointers were simply incremented here, * and memmov...
false
false
false
false
true
1
ParseRecordedUnitsChoice(struct Aoc *chanp, u_char *p, u_char *end, int *recordedUnits) { INIT; XCHOICE_1(ParseNumberOfUnits, ASN1_TAG_INTEGER, ASN1_NOT_TAGGED, recordedUnits); XCHOICE(ParseNull, ASN1_TAG_NULL, ASN1_NOT_TAGGED); // not available XCHOICE_DEFAULT; }
false
false
false
false
false
0
lgfs2_lang_parses(struct lgfs2_lang_state *state, const char *cstr) { int ret; FILE *src; char *str = strdup(cstr); if (str == NULL) { perror("Failed to duplicate source string"); return 1; } src = fmemopen(str, strlen(str), "r"); if (src == NULL) { perror("Failed to open string as source file"); free(s...
false
false
false
false
false
0
ln_rotation() const { CArrayDouble<3> result; const double cos_angle = (m_ROT.trace() - 1.0) * 0.5; result[0] = (m_ROT(2,1)-m_ROT(1,2))*0.5; result[1] = (m_ROT(0,2)-m_ROT(2,0))*0.5; result[2] = (m_ROT(1,0)-m_ROT(0,1))*0.5; double sin_angle_abs = result.norm(); //sqrt(result*result); if (cos_angle > M_SQRT1_2) ...
false
false
false
false
false
0
setup_image_process_colorspace(gx_device_pdf *pdev, image_union_t *image, gs_color_space **pcs_orig, const char *sname, cos_value_t *cs_value) { int code; gs_color_space *pcs_device = NULL; cos_c_string_value(cs_value, sname); *pcs_orig = image->pixel.ColorSpac...
false
false
false
false
false
0
buildCStoreRSP(T_DIMSE_C_StoreRSP * e, DcmDataset * obj) { OFCondition cond = buildCommonRSP(obj, DIMSE_C_STORE_RSP, e->MessageIDBeingRespondedTo, e->DataSetType, e->DimseStatus); RET(cond); /* build optional items */ if (e->opts & O_STORE_AFFECTEDSOPCLASSUID) { cond = addString(obj, DCM_A...
false
false
false
false
false
0
build_range_check (tree type, tree exp, int in_p, tree low, tree high) { tree etype = TREE_TYPE (exp); tree value; if (! in_p && (0 != (value = build_range_check (type, exp, 1, low, high)))) return invert_truthvalue (value); if (low == 0 && high == 0) return fold_convert (type, integer_one_node)...
false
false
false
false
false
0
ppc32_clear_host_reg_map(ppc_reg_map_t *ppc_map,int *host_map, int reg) { int ppc_reg; if (host_map[reg] != JIT_OP_INV_REG) { ppc_reg = host_map[reg]; ppc_map[ppc_reg].host_reg = JIT_OP_INV_REG; ppc_map[ppc_reg].last_store = NULL; host_map[reg] = JIT_...
false
false
false
false
false
0
utf162ucs4 (const ACEXML_UTF16 *src, size_t len, ACEXML_UCS4 &dst) { if (src == 0) { return ACEXML_INVALID_ARGS; } size_t forward = 1; if (*src >= 0xDC00 && *src < 0xE000) { if (len < 2) { return ACEXML_END_OF...
false
false
false
false
false
0
parse(XML_PARSER& xp) { while (!xp.get_tag()) { if (xp.match_tag("/file_transfer")) return 0; if (xp.parse_string("name", name)) continue; if (xp.parse_string("project_url", project_url)) continue; if (xp.parse_string("project_name", project_name)) continue; if (xp.parse_doub...
false
false
false
false
false
0
listDelete(void ** root, int *nmemb, const int size, const int index) { int remainder = *nmemb - index - 1; if((index < 0) || (index >= *nmemb)) { return -1; } memmove(((char*)(*root) + index*size), ((char*)(*root) + (index+1)*size), remainder * size); if(*nmemb > 1) { if((*root = realloc(...
false
false
false
false
false
0
job_submit(struct job_descriptor *job_desc, uint32_t submit_uid) { if (job_desc->acctg_freq < MIN_ACCTG_FREQUENCY) { info("Changing accounting frequency of submitted job " "from %u to %u", job_desc->acctg_freq, MIN_ACCTG_FREQUENCY); job_desc->acctg_freq = MIN_ACCTG_FREQUENCY; } if (job_desc->qos) ...
false
false
false
false
false
0
soap_in_x__DataType(struct soap *soap, const char *tag, struct x__DataType *a, const char *type) { size_t soap_flag_choice = 1; if (soap_element_begin_in(soap, tag, 0, type)) return NULL; a = (struct x__DataType *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_x__DataType, sizeof(struct x__DataType), 0, NULL, NULL, NU...
false
false
false
false
false
0
gf_node_animation_add(GF_Node *node, void *animation) { if (!node || !animation) return GF_BAD_PARAM; if (!node->sgprivate->interact) GF_SAFEALLOC(node->sgprivate->interact, struct _node_interactive_ext); if (!node->sgprivate->interact->animations) node->sgprivate->interact->animations = gf_list_new(); return gf_li...
false
false
false
true
false
1
rtsp_cmd_pause(HTTPContext *c, const char *url, RTSPMessageHeader *h) { HTTPContext *rtp_c; rtp_c = find_rtp_session_with_url(url, h->session_id); if (!rtp_c) { rtsp_reply_error(c, RTSP_STATUS_SESSION); return; } if (rtp_c->state != HTTPSTATE_SEND_DATA && rtp_c->state != HT...
false
false
false
false
false
0
swapping(void* a, void* b) { redraw_line(a); redraw_line(b); if (a == selection_) selection_ = b; else if (b == selection_) selection_ = a; if (a == top_) top_ = b; else if (b == top_) top_ = a; }
false
false
false
false
false
0
gw_menu_popup_folder_rename_ok ( GtkWidget *w, GtkWidget *data) { gboolean result = FALSE; guint8 spc; GdkBitmap *btmp; GdkPixmap *pxmp; gchar *tmp_name = NULL, *name = NULL; GtkCTree *tree = NULL; GtkCTreeNode *selection = NULL; GtkWindow *window = gw_gui_manager_main_interface_get_main_window ( ); gchar *tex...
false
false
false
false
false
0
operator=( const PropDict& dict ) { Dict::operator=( dict ); if( propdict_ ) { xmmsv_unref( propdict_ ); } propdict_ = dict.propdict_; xmmsv_ref( propdict_ ); return *this; }
false
false
false
false
false
0