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
flickcurl_stats_getCollectionDomains(flickcurl* fc, const char* date, const char* collection_id, int per_page, int page) { xmlDocPtr doc = NULL; xmlXPathContextPtr xpathCtx = NULL; flickcurl_stat** stats = NULL; char per_page_str[10]; ...
true
true
false
false
false
1
mlx4_en_poll_rx_cq(struct napi_struct *napi, int budget) { struct mlx4_en_cq *cq = container_of(napi, struct mlx4_en_cq, napi); struct net_device *dev = cq->dev; struct mlx4_en_priv *priv = netdev_priv(dev); int done; if (!mlx4_en_cq_lock_napi(cq)) return budget; done = mlx4_en_process_rx_cq(dev, cq, budget);...
false
false
false
false
false
0
restore_toc_entries_postfork(ArchiveHandle *AH, TocEntry *pending_list) { RestoreOptions *ropt = AH->ropt; TocEntry *te; ahlog(AH, 2, "entering restore_toc_entries_postfork\n"); /* * Now reconnect the single parent connection. */ ConnectDatabase((Archive *) AH, ropt->dbname, ropt->pghost, ropt->pgport...
false
false
false
false
false
0
clone_as_declaration (dw_die_ref die) { dw_die_ref clone; dw_die_ref decl; dw_attr_ref a; unsigned ix; /* If the DIE is already a declaration, just clone it. */ if (is_declaration_die (die)) return clone_die (die); /* If the DIE is a specification, just clone its declaration DIE. */ decl = get_A...
false
false
false
false
false
0
SendSpellStart() { if (!IsNeedSendToClient()) return; DEBUG_FILTER_LOG(LOG_FILTER_SPELL_CAST, "Sending SMSG_SPELL_START id=%u", m_spellInfo->Id); uint32 castFlags = CAST_FLAG_UNKNOWN2; if (IsRangedSpell()) castFlags |= CAST_FLAG_AMMO; if (m_spellInfo->runeCostID) castFlags...
false
false
false
false
false
0
SoundCallback(void *userdata, Uint8 *stream, int len) { #ifndef SYNCHRONIZED_SOUND int sndn = (sound_bits == 8 ? len : len/2); /* in mono, sndn is the number of samples (8 or 16 bit) */ /* in stereo, 2*sndn is the number of sample pairs */ POKEYSND_Process(dsp_buffer, sndn); memcpy(stream, dsp_buffer, len); #else ...
false
false
false
false
false
0
GetCommandCompletionString( void *theEnv, char *theString, unsigned maxPosition) { struct token lastToken; struct token theToken; char lastChar; char *rs; unsigned length; /*=========================*/ /* Get the command string. */ /*=========================*/ if (theString == NULL...
false
false
false
false
false
0
glade_gtk_store_string_from_value (GladeWidgetAdaptor * adaptor, GladePropertyClass * klass, const GValue * value) { GString *string; GParamSpec *pspec; pspec = glade_property_class_get_pspec (klass); if (pspec->value_type == GLADE_TYPE_COL...
false
false
false
false
false
0
checkForHits(HeroAircraft *hero) { int i; ActiveAmmo *thisAmmo; ActiveAmmo *backAmmo; ActiveAmmo *nextAmmo; float minDist; float dist; float *p; minDist = (hero->getSize(0)+hero->getSize(1))*0.5; if(!hero->isVisible()) return; //-- Go through all the ammunition and check for hits for(i = 0; i < NUM...
false
false
false
false
false
0
getTransformIsotropicScale (decodeISF_t * pDecISF) { int err = OK; float a; transform_t * pTransform; /** * This tag consists of the one value describing an isotropic scale * transform matrix.\n * This value (let's call it "A") is coded in the stream as float IEEE 754\n * The transf...
false
false
false
false
false
0
caribou_ikeyboard_object_real_get_keys (CaribouIKeyboardObject* self, int* result_length1) { CaribouKeyModel** result = NULL; GeeArrayList* keys = NULL; GeeArrayList* _tmp0_ = NULL; gint _tmp1_ = 0; CaribouIKeyboardObject** _tmp2_ = NULL; GeeArrayList* _tmp11_ = NULL; gint _tmp12_ = 0; gpointer* _tmp13_ = NULL;...
false
false
false
false
false
0
OnReceive(Packet *packet) { if (packet->data[0]==ID_REMOTE_CONNECTION_LOST || packet->data[0]==ID_REMOTE_DISCONNECTION_NOTIFICATION) { bool objectExists; unsigned idx = remoteSystems.GetIndexFromKey(packet->guid, &objectExists); if (objectExists) { RakNet::BitStream bs(packet->data,packet->length,f...
false
false
false
false
false
0
translatedEntry(const KConfigGroup& group, const char* key) const { Q_D(const KDesktopFile); if (d->locale == 0 || !group.hasKey(key)) { return group.readEntry(key); } QString value = group.readEntryUntranslated(key); QString poValue; // translateRaw does not like being called with an empty value. if...
false
false
false
false
false
0
mono_decimalFloorAndTrunc(/*[In, Out]*/decimal_repr* pA, gint32 floorFlag) { guint64 alo, ahi; guint32 factor, rest; int scale, sign, idx; int hasRest = 0; MONO_ARCH_SAVE_REGS; scale = pA->signscale.scale; if (scale == 0) return; /* nothing to do */ DECTO128(pA, alo, ahi); sign = ...
false
false
false
false
false
0
tower_interrupt_in_callback (struct urb *urb) { struct lego_usb_tower *dev = urb->context; int status = urb->status; int retval; lego_usb_tower_debug_data(&dev->udev->dev, __func__, urb->actual_length, urb->transfer_buffer); if (status) { if (status == -ENOENT || status == -ECONNRESET || stat...
false
false
false
false
false
0
nv04_dfp_restore(struct drm_encoder *encoder) { struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder); struct drm_device *dev = encoder->dev; int head = nv_encoder->restore.head; if (nv_encoder->dcb->type == DCB_OUTPUT_LVDS) { struct nouveau_connector *connector = nouveau_encoder_connector_get(nv_enco...
false
false
false
false
false
0
disassemble(char *Instruction, char *Arg1, char *Arg2) { MOVEM_Instr Instr; char *regStr; short size; unsigned long RegisterListMask; Memory_RetrWordFromPC(&Instr.Code); Memory_RetrWordFromPC(&RegisterListMask); sprintf(Instruction, "MOVEM.L"); if(Instr.Bits.Direction==0) { /* Registers to memory */ regS...
false
false
false
false
false
0
substituteAllLagsAndExo1Leads(FormulaParser& fp, AtomSubstitutions& as) { const char* name; int mlead, mlag; endovarspan(mlead, mlag); // substitute all endo lagged more than 1 while (NULL != (name = findEndoWithLeadInInterval(mlag, -2))) makeAuxVariables(name, -1, -2, mlag, fp, as); exovarspan(mlead, mlag);...
false
false
false
false
false
0
kui_manager_getkey_blocking(struct kui_manager *kuim) { if (!kuim) return -1; unsigned long terminal_keys_msec, normal_keys_msec, val; /* Get the original values */ kui_get_blocking_ms(kuim->terminal_keys, &terminal_keys_msec); kui_get_blocking_ms(kuim->normal_keys, &normal_keys_msec); ...
false
false
false
false
true
1
prop_set_storage(prop_set_t *ps, property_t prop, const char *src, size_t length) { gboolean differ = FALSE; g_assert(ps != NULL); g_assert(src != NULL); if (!prop_in_range(ps, prop)) g_error("prop_set_storage: unknown property %d", prop); if (PROP(ps,prop).type != PROP_TYPE_STORAGE) g_error("Type mismatch ...
false
true
false
false
false
1
fusefat_open(const char *path, struct fuse_file_info *fi) { int res; File_t *F; Volume_t *V; fusefat_getvolume(V); F = malloc(sizeof(File_t)); fat_lock(V); if ((res = fat_open(path, F, V, O_RDWR)) != 0) { fat_unlock(V); fprintf(stderr,"-- %d",__LINE__); free(F); return -ENOENT; } fat_unlock(V); fi->fh = (lo...
false
false
false
false
false
0
all_pass_get_buffer(all_pass *this) { int i; sample *i_buf; if (this->next) { this->next = 0; i_buf = this->input->get_buffer(this->input); for(i = 0; i < TBASS_BUFF_SIZE;i++) { sample s; if(this->d_index >= this->delay_size) this->d_index = 0; /* this->buffer[i] = (long)this...
false
false
false
false
false
0
icalspanlist_dump(icalspanlist* sl){ int i = 0; pvl_elem itr; for( itr = pvl_head(sl->spans); itr != 0; itr = pvl_next(itr)) { struct icaltime_span *s = (struct icaltime_span*)pvl_data(itr); printf("#%02d %d start: %s",++i,s->is_busy,ctime(&s->start)); printf(" end : %s",ctime(&s->end...
false
false
false
false
false
0
cache_directory(const gchar *dir, GHashTable *dirs_hash) { GDir *dir_handle; const gchar *filename; gchar *path; if (!g_file_test(dir, G_FILE_TEST_IS_DIR)) return; /* dir represents a directory so store it in the hash table */ g_hash_table_insert(dirs_hash, g_strdup(dir), NULL); d...
false
false
false
false
false
0
archive_write_disk_new(void) { struct archive_write_disk *a; a = (struct archive_write_disk *)malloc(sizeof(*a)); if (a == NULL) return (NULL); memset(a, 0, sizeof(*a)); a->archive.magic = ARCHIVE_WRITE_DISK_MAGIC; /* We're ready to write a header immediately. */ a->archive.state = ...
false
false
false
false
false
0
getutxid(struct utmpx *ut) { struct utmpx *tmp; while ((tmp = getutxent())) { if (ut->ut_type && (ut->ut_type <= OLD_TIME)) { if (ut->ut_type == tmp->ut_type) break; } if ((ut->ut_type >= INIT_PROCESS) && (ut->ut_type <= DEAD_PROCESS)) { if (!strncmp(ut->ut_id,tmp->ut_id,4)) break; } ...
false
false
false
false
false
0
highlightDelimiter(int col_) { if (col_>=firstColumn()&&col_<=lastColumn()) { int arrowHeight; if (delimiterTitle().length()!=0) arrowHeight=headingsHeight()-rowHeight(); else arrowHeight=headingsHeight()-MSDelimiterPadding; XSegment segments[2]; int x=computeDelimiterXCoord(col_); s...
false
false
false
false
false
0
__ecereMethod___ecereNameSpace__ecere__gui__controls__EditBox_Printf(struct __ecereNameSpace__ecere__com__Instance * this, char * format, ...) { struct __ecereNameSpace__ecere__gui__controls__EditBox * __ecerePointer___ecereNameSpace__ecere__gui__controls__EditBox = (struct __ecereNameSpace__ecere__gui__controls__EditB...
false
false
false
false
false
0
add_transaction_to(const transaction_t& xact, value_t& value) { if (transaction_has_xdata(xact) && transaction_xdata_(xact).dflags & TRANSACTION_COMPOUND) { value += transaction_xdata_(xact).value; } else if (xact.cost || ! value.realzero()) { value.add(xact.amount, xact.cost); } else { valu...
false
false
false
false
false
0
_delete_list(n) struct node *n; { struct node *nt, *ot; if (n == NULL) return; _delete_list(n->l); _delete_list(n->r); /* erase the cluster of equal values at this node */ /* first go to the end of the cluster ... */ for (ot = n ; ot->same != NULL; ot = ot->same) ; /* ... then climb back up, erasing as you g...
false
false
false
false
false
0
parselonglongint(char *arg, uint64_t *val) { char *endptr = NULL; errno = 0; *val = strtoull(arg, &endptr, 0); if ((endptr && *endptr != '\0') || errno != 0) { if (errno == ERANGE) return "value out of range"; return "invalid integer input"; } return NULL; }
false
false
false
false
false
0
fl_pieslice( int fill, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, int a1, int a2, FL_COLOR col ) { int delta = a2 - a1, bw = fli_dithered( fl_vmode ) && fli_mono_dither( col ); GC gc = flx->gc;...
false
false
false
false
false
0
RaCopyArgusRecord (struct ArgusRecord *argus) { int length = 0; struct ArgusRecord *retn = NULL; if (argus && ((length = argus->ahdr.length) > 0)) if ((retn = (struct ArgusRecord *) ArgusCalloc(1, length)) != NULL) bcopy ((char *) argus, (char *) retn, length); return (retn); }
false
false
false
false
false
0
tm6000_load_std(struct tm6000_core *dev, struct tm6000_reg_settings *set) { int i, rc; /* Load board's initialization table */ for (i = 0; set[i].req; i++) { rc = tm6000_set_reg(dev, set[i].req, set[i].reg, set[i].value); if (rc < 0) { printk(KERN_ERR "Error %i while setting " "req %d, reg %d to va...
false
false
false
false
false
0
__ecereInstMeth___ecereNameSpace__ecere__gui__controls__Button_NotifyClicked__00000012(struct __ecereNameSpace__ecere__com__Instance * this, struct __ecereNameSpace__ecere__com__Instance * button, int x, int y, unsigned int mods) { struct CompilerDirectoriesTab * __ecerePointer_CompilerDirectoriesTab = (struct Compiler...
false
false
false
false
false
0
dri2_create_image_khr_pixmap(_EGLDisplay *disp, _EGLContext *ctx, EGLClientBuffer buffer, const EGLint *attr_list) { struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp); struct gbm_dri_bo *dri_bo = gbm_dri_bo((struct gbm_bo *) buffer); struct dri2_egl_image *dri2_img; dri2_img = malloc(sizeo...
false
false
false
false
false
0
glkputl(GLKDisplay *fd, ...) { va_list ap; int value; int retval; va_start(ap, fd); retval = 0; /* Success */ value = va_arg(ap, int); while (!retval && value != EOF) { retval = glkput(fd, value); value = va_arg(ap, int); } va_end(ap); return(retval); }
false
false
false
false
false
0
LoadFunction(State state, Code::ExtraICState extra_ic_state, Handle<Object> object, Handle<String> name) { // If the object is undefined or null it's illegal to try to get any // of its properties; thro...
false
false
false
false
false
0
ssl3_HandleCertificateVerify(sslSocket *ss, SSL3Opaque *b, PRUint32 length, SSL3Hashes *hashes) { SECItem signed_hash = {siBuffer, NULL, 0}; SECStatus rv; int errCode = SSL_ERROR_RX_MALFORMED_CERT_VERIFY; SSL3AlertDescription desc = handshake_f...
false
false
false
false
false
0
tree_ssa_phiprop (void) { VEC(basic_block, heap) *bbs; struct phiprop_d *phivn; bool did_something = false; basic_block bb; gimple_stmt_iterator gsi; unsigned i; size_t n; calculate_dominance_info (CDI_DOMINATORS); calculate_dominance_info (CDI_POST_DOMINATORS); n = num_ssa_names; phivn = XCNEWV...
false
false
false
false
false
0
skipColorTransform(FILE *f) { unsigned int needAdd, needMul, nBits; InitBits(f); needAdd = getBits(f, 1); needMul = getBits(f, 1); nBits = getBits(f, 4); if (needMul) getBits(f, nBits * 4); if (needAdd) getBits(f, nBits * 4); }
false
false
false
false
false
0
nemo_find_file_insensitive_next (GFile *parent, const gchar *name) { GFileEnumerator *children; GFileInfo *info; gboolean use_utf8, found; char *filename, *case_folded_name, *utf8_collation_key, *ascii_collation_key, *child_key; GFile *file; const char *child_name, *compare_key; /* First check the given version...
false
false
false
false
false
0
tgt_device_path_update(struct target *target, struct scsi_lu *lu, char *path) { int err, dev_fd; uint64_t size; if (lu->path) { if (lu->attrs.online) return TGTADM_INVALID_REQUEST; lu->dev_type_template.lu_offline(lu); lu->bst->bs_close(lu); free(lu->path); lu->fd = 0; lu->addr = 0; lu->size = 0; ...
false
false
false
false
false
0
__connman_resolvfile_append(int index, const char *domain, const char *server) { struct resolvfile_entry *entry; DBG("index %d server %s", index, server); if (index < 0) return -ENOENT; entry = g_try_new0(struct resolvfile_entry, 1); if (entry == NULL) return -ENOMEM; entry->index = index; entry->...
false
false
false
false
false
0
vorbis_bitrate_init(vorbis_info *vi,bitrate_manager_state *bm){ codec_setup_info *ci=vi->codec_setup; bitrate_manager_info *bi=&ci->bi; memset(bm,0,sizeof(*bm)); if(bi && (bi->reservoir_bits>0)){ long ratesamples=vi->rate; int halfsamples=ci->blocksizes[0]>>1; bm->short_per_long=ci->blocksizes...
false
false
false
false
false
0
_k_newIconName(const QString& name) { if (name.isEmpty()) { return; } q->setIcon(KIcon(name)); mIcon = name; if (mbUser) { mpDialog->setCustomLocation(QFileInfo(mpLoader->iconPath(mIcon, mGroup, true)).absolutePath()); } emit q->iconChanged(name); }
false
false
false
false
false
0
GetTokenId(Object* token) { Isolate* isolate = Isolate::Current(); if (token == NULL) return TokenEnumerator::kNoSecurityToken; for (int i = 0; i < token_locations_.length(); ++i) { if (*token_locations_[i] == token && !token_removed_[i]) return i; } Handle<Object> handle = isolate->global_handles()->Crea...
false
false
false
false
false
0
H5G_get_name_by_addr(hid_t file, hid_t lapl_id, hid_t dxpl_id, const H5O_loc_t *loc, char *name, size_t size) { H5G_gnba_iter_t udata; /* User data for iteration */ H5G_loc_t root_loc; /* Root group's location */ hbool_t found_obj = FALSE; /* If we found the object */ herr_t status; ...
false
false
false
false
false
0
radeon_legacy_atom_fixup(struct drm_crtc *crtc) { struct drm_device *dev = crtc->dev; struct radeon_device *rdev = dev->dev_private; struct radeon_crtc *radeon_crtc = to_radeon_crtc(crtc); u32 disp_merge_cntl; switch (radeon_crtc->crtc_id) { case 0: disp_merge_cntl = RREG32(RADEON_DISP_MERGE_CNTL); disp_merg...
false
false
false
false
false
0
solo_motion_config(struct solo_dev *solo_dev) { int i; for (i = 0; i < solo_dev->nr_chans; i++) { /* Clear motion flag area */ solo_dma_vin_region(solo_dev, i * SOLO_MOT_FLAG_SIZE, 0x0000, SOLO_MOT_FLAG_SIZE); /* Clear working cache table */ solo_dma_vin_region(solo_dev, SOLO_MOT_FLAG_AREA + ...
false
false
false
false
false
0
got_file_size_cb (GObject *source_object, GAsyncResult *res, gpointer userdata) { SwClientServiceCallClosure *closure = (SwClientServiceCallClosure *) userdata; SwClientServicePrivate *priv = GET_PRIVATE (closure->service); GFileInfo *info; char *filename; const char *sig...
false
false
false
false
false
0
hdr_test(stbi *s) { char *signature = "#?RADIANCE\n"; int i; for (i=0; signature[i]; ++i) if (get8(s) != signature[i]) return 0; return 1; }
false
false
false
false
false
0
doconsult(struct monst *oracl) { int u_pay, minor_cost = 50, major_cost = 500 + 50 * u.ulevel; int add_xpts; char qbuf[QBUFSZ]; multi = 0; if (!oracl) { There("is no one here to consult."); return 0; } else if (!oracl->mpeaceful) { pline("%s is in no mood fo...
false
false
false
false
false
0
namedNodeU(const StringC &str, NodePtr &ptr) const { const Notation *notation = dtd_->lookupNotationTemp(str); if (!notation) return accessNull; ptr.assign(new NotationNode(grove(), notation)); return accessOK; }
false
false
false
false
false
0
read_ctv(struct ips_driver *ips, int cpu) { int reg = cpu ? THM_CTV2 : THM_CTV1; u16 val; val = thm_readw(reg); if (!(val & CTV_TEMP_ERROR)) val = (val) >> 6; /* discard fractional component */ else val = 0; return val; }
false
false
false
false
false
0
do_stop(void) { int cnt; pgpid_t pid; struct stat statbuf; pid = get_pgpid(); if (pid == 0) /* no pid file */ { write_stderr(_("%s: PID file \"%s\" does not exist\n"), progname, pid_file); write_stderr(_("Is server running?\n")); exit(1); } else if (pid < 0) /* standalone backend, not postmaster...
false
false
false
false
false
0
fe_set_tab_color(window_t *sess, int col) { if (!gtk_private_ui(sess)->is_tab) return; if (sess == window_current || sess->id == 0) col = 0; /* XXX */ // col value, what todo values comment. // 0: chan_set_color(sess->tab, plain_list); [new_data = NULL, msg_said = NULL, nick_said = ...
false
false
false
false
false
0
gap_arr_arg_init (GapArrArg *arr_ptr, gint widget_type) { arr_ptr->label_txt = NULL; arr_ptr->help_txt = NULL; arr_ptr->help_id = NULL; arr_ptr->help_func = NULL; arr_ptr->togg_label = NULL; arr_ptr->entry_width = 80; arr_ptr->scale_width = 200; arr_ptr->con...
false
false
false
false
false
0
hsw_mixer_to_ipc(unsigned int value) { if (value >= ARRAY_SIZE(volume_map)) return volume_map[0]; else return volume_map[value]; }
false
false
false
false
false
0
php_pdo_unregister_driver(pdo_driver_t *driver) { if (!zend_hash_exists(&module_registry, "pdo", sizeof("pdo"))) { return; } zend_hash_del(&pdo_driver_hash, (char*)driver->driver_name, driver->driver_name_len); }
false
false
false
false
false
0
computePSetLimit(unsigned Idx) const { const TargetRegisterClass *RC = nullptr; unsigned NumRCUnits = 0; for (TargetRegisterInfo::regclass_iterator RI = TRI->regclass_begin(), RE = TRI->regclass_end(); RI != RE; ++RI) { const int *PSetID = TRI->getRegClassPressureSets(*RI); for (; *PSetID != -1; ...
false
false
false
false
false
0
event_srv_chk_w(struct connection *conn) { struct check *check = conn->owner; struct server *s = check->server; struct task *t = check->task; if (unlikely(check->result == CHK_RES_FAILED)) goto out_wakeup; if (conn->flags & CO_FL_HANDSHAKE) return; if (retrieve_errno_from_socket(conn)) { chk_report_conn_...
false
false
false
false
false
0
generateResponse(const QString &_user, const QString &password) { generateResponseCommon(_user, password); if (m_isError) { return; } QByteArray buf; if (m_challenge.isEmpty()) { m_finalAuthStage = false; // first, send type 1 message (with empty domain, workstation..., but...
false
false
false
false
false
0
shouldRoundUp(int32_t maximumDigits) const { int i = 0; if (fRoundingMode == DecimalFormat::kRoundDown || fRoundingMode == DecimalFormat::kRoundFloor && fIsPositive || fRoundingMode == DecimalFormat::kRoundCeiling && !fIsPositive) { return FALSE; } if (fRoundingMode == Decima...
false
false
false
false
false
0
compare_with (GDataComparable *self, GDataComparable *other) { GDataGDNamePrivate *a = ((GDataGDName*) self)->priv, *b = ((GDataGDName*) other)->priv; if (g_strcmp0 (a->given_name, b->given_name) == 0 && g_strcmp0 (a->additional_name, b->additional_name) == 0 && g_strcmp0 (a->family_name, b->family_name) == 0 &...
false
false
false
false
false
0
bcma_host_pci_provide_access_to_core(struct bcma_device *core) { switch (core->id.id) { case BCMA_CORE_CHIPCOMMON: return 3 * BCMA_CORE_SIZE; case BCMA_CORE_PCIE: return 2 * BCMA_CORE_SIZE; } if (core->bus->mapped_core != core) bcma_host_pci_switch_core(core); return 0; }
false
false
false
false
false
0
parse_htpl_constructor___fwd(stack, untag) int untag; STR stack; { TOKEN token; static done = 0; STR buff; int code; static int nesting = 0; static int refcount = 0; refcount++; makepersist(stack); if (!currscope) RETURN(croak("Unexpected CONSTRUCTOR")) if (currscope->s...
false
false
false
false
false
0
expand_variable_error(parser_t &parser, const wchar_t *token, size_t token_pos, int error_pos) { size_t stop_pos = token_pos+1; switch (token[stop_pos]) { case BRACKET_BEGIN: { wchar_t *cpy = wcsdup(token); *(cpy+token_pos)=0; wchar_t *name = &cpy[stop_po...
false
false
false
false
false
0
SSFindMinXAtY(SplineSet *spl,real y,real min) { Spline *sp, *first; while ( spl!=NULL ) { first = NULL; for ( sp = spl->first->next; sp!=NULL && sp!=first; sp = sp->to->next ) { min = SplineFindMinXAtY(sp,y,min); if ( first==NULL ) first = sp; } spl = spl->next; } return( min ); }
false
false
false
false
false
0
flush_logqueue (void) { int empty; do { pthread_mutex_lock(&logq_lock); empty = log_dequeue(la->buff); pthread_mutex_unlock(&logq_lock); if (!empty) log_syslog(la->buff); } while (empty == 0); }
false
false
false
false
false
0
count_leaf_nodes(struct gr_learn_file_node *node) { unsigned long ret = 0; for_each_list_entry(node, node) { if (node->leaves == NULL) ret++; } return ret; }
false
false
false
false
false
0
dead_link(struct Client *to, char *notice) { SetFlag(to, FLAG_DEADSOCKET); /* * If because of BUFFERPOOL problem then clean dbuf's now so that * notices don't hurt operators below. */ DBufClear(&(cli_recvQ(to))); MsgQClear(&(cli_sendQ(to))); client_drop_sendq(cli_connect(to)); /* * Keep a copy ...
false
false
false
false
false
0
chirp_alloc_pwrite(int fd, const void *data, INT64_T length, INT64_T offset) { struct alloc_state *a; int result; if(!alloc_enabled) return cfs->pwrite(fd, data, length, offset); if(!fd_table) fd_table = itable_create(0); a = alloc_state_cache(itable_lookup(fd_table, fd)); if(a) { INT64_T filesize = cfs_...
false
false
false
false
false
0
_gfshare_fill_rand_using_random( unsigned char* buffer, unsigned int count ) { unsigned int i; for( i = 0; i < count; ++i ) buffer[i] = (random() & 0xff00) >> 8; /* apparently the bottom 8 aren't * very random but the middles ones ...
false
false
false
false
false
0
jid_store(struct gfs2_sbd *sdp, const char *buf, size_t len) { int jid; int rv; rv = sscanf(buf, "%d", &jid); if (rv != 1) return -EINVAL; rv = wait_for_completion_killable(&sdp->sd_locking_init); if (rv) return rv; spin_lock(&sdp->sd_jindex_spin); rv = -EINVAL; if (sdp->sd_lockstruct.ls_ops->lm_mo...
false
false
false
false
false
0
ufs_setattr(struct dentry *dentry, struct iattr *attr) { struct inode *inode = d_inode(dentry); unsigned int ia_valid = attr->ia_valid; int error; error = inode_change_ok(inode, attr); if (error) return error; if (ia_valid & ATTR_SIZE && attr->ia_size != inode->i_size) { error = ufs_truncate(inode, attr->ia...
false
false
false
false
false
0
count_bits (uint64_t bitmap) { size_t c; if (bitmap == 0) return 0; c = bitmap & 1 ? 1 : 0; bitmap >>= 1; return c + count_bits (bitmap); }
false
false
false
false
false
0
ProcessPIN(struct BTCrackStruct *bp, unsigned char *pin, int pinlen) { if (pinlen > 16) return -1; if (KeyInit(pinlen, pin, bp->bdaddr_s, bp->in_rand, bp->kinit) != 0) { return -1; } GetLRand(bp->comb_key_m, bp->kinit, bp->lk_rand_m); GetLRand(bp->comb_key_s, bp->kinit, bp->lk_rand_s); if (GetPIN(bp->bdad...
false
false
false
false
false
0
static_order (gamgi_symmetry *symmetry, gamgi_element *element) { int n_atoms = symmetry->n_atoms; int i, j, k ; for (i = 0; i < n_atoms; i++) { /****************************************************************** * for any operation of symmetry, some atoms may remain unchanged * *****************************...
false
false
false
false
false
0
ui_acc_manage_getlast(struct ui_acc_manage_data *data) { gboolean bool; gdouble value; Account *item; DB( g_print("\n(ui_acc_manage_getlast)\n") ); DB( g_print(" -> for account id=%d\n", data->lastkey) ); item = da_acc_get(data->lastkey); if(item != NULL) { data->change++; item->type = gtk_combo_box_get_a...
false
false
false
false
false
0
do_tree(AP_tree * node) { ST_sequence_ml *seq = static_cast<ST_sequence_ml*>(node->sequence); if (!seq) { seq = new ST_sequence_ml(tree_root, this); node->sequence = (AP_sequence *) seq; } if (seq->last_updated) return seq; // already valid !!! if (node->is_leaf) { ...
false
false
false
false
false
0
intel_lpss_register_clock_divider(struct intel_lpss *lpss, const char *devname, struct clk **clk) { char name[32]; struct clk *tmp = *clk; snprintf(name, sizeof(name), "%s-enable", devname); tmp = clk_register_gate(NULL, name, __clk_get_name(tmp), 0, lpss->priv, 0, 0, NULL); if (IS_ERR(tmp...
true
true
false
false
false
1
writeLayerDeclaration(const TerrainLayerDeclaration& decl, StreamSerialiser& stream) { // Layer declaration stream.writeChunkBegin(TERRAINLAYERDECLARATION_CHUNK_ID, TERRAINLAYERDECLARATION_CHUNK_VERSION); // samplers uint8 numSamplers = (uint8)decl.samplers.size(); stream.wr...
false
false
false
false
false
0
au_diropq_sio(struct dentry *dentry, aufs_bindex_t bindex, unsigned int flags) { struct dentry *diropq, *h_dentry; h_dentry = au_h_dptr(dentry, bindex); if (!au_test_h_perm_sio(d_inode(h_dentry), MAY_EXEC | MAY_WRITE)) diropq = do_diropq(dentry, bindex, flags); else { int wkq_err; struct do_diropq_ar...
false
false
false
false
false
0
synth_setvolume_R (int voice, int volume) { gint8 level1, level2; level1 = ~adlib_reg_R[register_base[2]+register_offset[voice]] & 0x3f; level2 = ~adlib_reg_R[register_base[3]+register_offset[voice]] & 0x3f; if (level1) { level1 += sci_adlib_vol_tables[adlib_master][volume>>1]; } if (level2) { ...
false
false
false
false
false
0
net_can_howl_seeker_new(int t, int n) { int i; int suffix; int suffix_d; double x; double y; double result[2]; tenm_object *new = NULL; int *count = NULL; double *count_d = NULL; result[0] = 0.0; result[1] = 0.0; net_can_howl_position(result, 0, 0, t); x = result[0]; y = result[1]; count...
false
false
false
false
false
0
on_entry_account_password(GtkEntry *entry, gpointer user_data) { const char *old, *password1, *password2, *cp; old = gtk_entry_get_text(GTK_ENTRY(entry_account_password_current)); password1 = gtk_entry_get_text(GTK_ENTRY(entry_account_password_new)); password2 = gtk_entry_get_text(GTK_ENTRY(entry_acco...
false
false
false
false
false
0
soup_socket_listen (SoupSocket *sock) { SoupSocketPrivate *priv; GSocketAddress *addr; g_return_val_if_fail (SOUP_IS_SOCKET (sock), FALSE); priv = SOUP_SOCKET_GET_PRIVATE (sock); g_return_val_if_fail (priv->gsock == NULL, FALSE); g_return_val_if_fail (priv->local_addr != NULL, FALSE); priv->is_server = TRUE; ...
false
false
false
false
false
0
main(int argc, char* argv[]){ if(argc != 3) { printf(" usage: %s [array width] [num threads]\n",argv[0]); } else { int m = atoi(argv[1]); int NUM_THREADS = atoi(argv[2]); printf("m = %i, NUM_THREADS = %i\n",m,NUM_THREADS); // Generate seed for random number generation srand(time(NULL)); // Al...
false
false
false
false
false
0
convert_partition2scalefac(PsyConst_CB2SB_Ptr pcd, FLOAT const *eb, FLOAT const *thr, FLOAT enn_out[], FLOAT thm_out[]) { FLOAT enn, thmm; int sb, b, n = pcd->n_sb; enn = thmm = 0.0f; for (sb = b = 0; sb < n; ++b, ++sb) { int const bo_sb = pcd->bo[sb]; in...
false
false
false
false
false
0
openFile() { kWarning(1000) << "Default implementation of ReadOnlyPart::openFile called!" << metaObject()->className() << "should reimplement either openUrl or openFile."; return false; }
false
false
false
false
false
0
test_merge_trees_automerge__automerge(void) { git_index *index; const git_index_entry *entry; git_merge_tree_opts opts = GIT_MERGE_TREE_OPTS_INIT; git_blob *blob; struct merge_index_entry merge_index_entries[] = { ADDED_IN_MASTER_INDEX_ENTRY, AUTOMERGEABLE_INDEX_ENTRY, CHANGED_IN_BRANCH_INDEX_ENTRY, C...
false
false
false
true
false
1
sfaxpci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) { int err = -ENOMEM; struct sfax_hw *card = kzalloc(sizeof(struct sfax_hw), GFP_KERNEL); if (!card) { pr_info("No memory for Speedfax+ PCI\n"); return err; } card->pdev = pdev; err = pci_enable_device(pdev); if (err) { kfree(card); ret...
false
false
false
false
false
0
test_photo(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) { Evas_Object *win, *sc, *tb, *ph; int i, j, n; char buf[PATH_MAX]; const char *img[9] = { "panel_01.jpg", "mystrale.jpg", "mystrale_2.jpg", "rock_02.jpg", "sky_01.jpg", ...
true
true
false
false
false
1
implicitConvTo(Type *to) { //printf("TypeNull::implicitConvTo(this=%p, to=%p)\n", this, to); //printf("from: %s\n", toChars()); //printf("to : %s\n", to->toChars()); MATCH m = Type::implicitConvTo(to); if (m) return m; // NULL implicitly converts to any pointer type or dynamic array ...
false
false
false
false
false
0
read_slideshow_file (const char *filename, GError **err) { GnomeBGSlideShow *show; show = gnome_bg_slide_show_new (filename); if (!gnome_bg_slide_show_load (show, err)) { g_object_unref (show); return NULL; } return show; }
false
false
false
false
false
0
construct_extract_state(struct extract_state* es, struct fpga_model* model) { RC_CHECK(model); memset(es, 0, sizeof(*es)); es->model = model; return 0; }
false
false
false
false
false
0
gspool_write(const int fd, char *buff, unsigned size) { int obytes; while (size != 0) { if ((obytes = write(fd, buff, size)) < 0) { if (errno == EINTR) continue; return GSPOOL_BADWRITE; } size -= obytes; buff += obytes; } return 0; }
false
false
false
false
false
0
LI7(object V26,object first,...) { va_list ap; int narg = VFUN_NARGS; VMB7 VMS7 VMV7 bds_check; {object V27; object V28; va_start(ap,first); V27= V26; narg= narg - 1; V29 = list_vector_new(narg,first,ap); V28= V29; bds_bind(((object)VV[3]),((object)VV[2])); if(((((object)VV[14])->s.s_dbind))!=Cnil){ goto ...
false
false
false
false
false
0
libisocodes_iso_15924_setup (libisocodesISO_15924* self) { g_return_if_fail (self != NULL); _libisocodes_iso_codes_setup_i18n ((libisocodesISO_Codes*) self); xmlInitParser (); libisocodes_iso_codes_set_standard ((libisocodesISO_Codes*) self, "15924"); libisocodes_iso_codes_set_filepath ((libisocodesISO_Codes*) sel...
false
false
false
false
false
0