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
account_widget_select_first (AccountWidget* self) { GtkTreeIter iter = {0}; g_return_if_fail (self != NULL); if (gtk_tree_model_get_iter_first ((GtkTreeModel*) self->model, &iter)) { gtk_tree_selection_select_iter (gtk_tree_view_get_selection (self->priv->table), &iter); } else { gtk_widget_set_sensitive ((GtkW...
false
false
false
false
false
0
fnrec_append ( void *called_fn, void *call_site ) { struct fnrec_entry *entry; /* Re-use existing entry, if possible */ entry = &fnrec_buffer->data[ fnrec_buffer->idx ]; if ( ( entry->called_fn == called_fn ) && ( entry->call_site == call_site ) && ( entry->entry_count >= entry->exit_count ) ) { retu...
false
false
false
false
false
0
RetrievalDone(string Message) /*{{{*/ { // We have just finished downloading a Release file (it is not // verified yet) string FileName = LookupTag(Message,"Filename"); if (FileName.empty() == true) { Status = StatError; ErrorText = "Method gave a blank filename"; return; } if...
false
false
false
false
false
0
cmc_field_add_path(CmdCfg *cmc, const gchar *name, const gchar *desc, gsize offset, gsize size, gunichar separator) { if(cmc != NULL) { CField *fld = field_new(CFT_PATH, name, desc, offset); /* Sneaky: use the 'string' member for CFT_PATH, too. */ fld->field.string.size = size; fld->field.string.separator = ...
false
false
false
false
false
0
GetLTXArg(char *SrcBuf, char *OrigDest, const int Until, struct WordList *wl) { char *Retval; char *TmpPtr; char *Dest = OrigDest; unsigned long DeliCnt = 0; *Dest = 0; TmpPtr = SrcBuf; switch (Until) { case GET_STRIP_TOKEN: case GET_TOKEN: while ((Retval = GetLTXToken...
false
false
false
false
false
0
visibleCenter() const { QPoint center; QGraphicsView * view = mainGraphicsView(); if (view) { QPoint viewCenter = view->viewport()->rect().center(); center = view->mapToScene(viewCenter).toPoint(); } else center = sceneRect().center().toPoint(); return center + QPoint(2 - (qr...
false
false
false
false
false
0
operator=(const CglPreProcess& rhs) { if (this!=&rhs) { gutsOfDestructor(); numberSolvers_=rhs.numberSolvers_; defaultHandler_=rhs.defaultHandler_; appData_=rhs.appData_; numberCutGenerators_=rhs.numberCutGenerators_; numberProhibited_ = rhs.numberProhibited_; numberIterationsPre_ = rhs.nu...
false
false
false
false
false
0
lang_pseudo_class_handler (CRSelEng * a_this, CRAdditionalSel * a_sel, xmlNode * a_node) { xmlNode *node = a_node; xmlChar *val = NULL; gboolean result = FALSE; g_return_val_if_fail (a_this && PRIVATE (a_this) && a_sel && a_sel->c...
false
false
false
false
false
0
gncTaxTableIncRef (GncTaxTable *table) { if (!table) return; if (table->parent || table->invisible) return; /* children dont need refcounts */ gncTaxTableBeginEdit (table); table->refcount++; mark_table (table); gncTaxTableCommitEdit (table); }
false
false
false
false
false
0
pack_mass(int n) { int *type = atom->type; double *mass = atom->mass; double *rmass = atom->rmass; if (rmass) { for (int i = 0; i < nchoose; i++) { buf[n] = rmass[clist[i]]; n += size_one; } } else { for (int i = 0; i < nchoose; i++) { buf[n] = mass[type[clist[i]]]; n += s...
false
false
false
false
false
0
_clutter_script_parse_geometry (ClutterScript *script, JsonNode *node, ClutterGeometry *geometry) { g_return_val_if_fail (CLUTTER_IS_SCRIPT (script), FALSE); g_return_val_if_fail (node != NULL, FALSE); g_return_val_if_fail (geometry != NULL,...
false
false
false
false
false
0
CreateVariableSizedObject(unsigned Alignment, const AllocaInst *Alloca) { HasVarSizedObjects = true; Alignment = clampStackAlignment(!StackRealignable || !RealignOption, Alignment, StackAlignment); Objects.push_back(StackObject(0, A...
false
false
false
false
false
0
validate_raid_redundancy(struct raid_set *rs) { unsigned i, rebuild_cnt = 0; unsigned rebuilds_per_group = 0, copies, d; unsigned group_size, last_group_start; for (i = 0; i < rs->md.raid_disks; i++) if (!test_bit(In_sync, &rs->dev[i].rdev.flags) || !rs->dev[i].rdev.sb_page) rebuild_cnt++; switch (rs-...
false
false
false
false
false
0
EditFileExists(char *file) { struct Edit *ptr; char ebuff[CF_EXPANDSIZE]; ExpandVarstring(file,ebuff,""); for (ptr = VEDITLIST; ptr != NULL; ptr=ptr->next) { if (strcmp(ptr->fname,ebuff) == 0) { return true; } } return false; }
false
false
false
false
false
0
H5FD_fapl_open(H5P_genplist_t *plist, hid_t driver_id, const void *driver_info) { void *copied_driver_info = NULL; /* Temporary VFL driver info */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(FAIL) /* Increment the reference count on driver and copy driver info */ if...
false
false
false
false
false
0
spool_berkeleydb_default_delete_func(lList **answer_list, const lListElem *type, const lListElem *rule, const char *key, const sge_object_type object_type) { bool ret = true;...
false
false
false
false
false
0
UFOGetBits(xmlDocPtr doc,xmlNodePtr value) { xmlNodePtr kid; long mask=0; if ( _xmlStrcmp(value->name,(const xmlChar *) "array")!=0 ) return( 0 ); for ( kid = value->children; kid!=NULL; kid=kid->next ) { if ( _xmlStrcmp(kid->name,(const xmlChar *) "integer")==0 ) { char *valName = (char *) _xmlN...
false
false
false
false
false
0
HtmlNodeDeleteCommand(pTree, pNode) HtmlTree *pTree; HtmlNode *pNode; { if (pNode->pNodeCmd) { Tcl_Obj *pCommand = pNode->pNodeCmd->pCommand; Tcl_DeleteCommand(pTree->interp, Tcl_GetString(pCommand)); Tcl_DecrRefCount(pCommand); HtmlFree(pNode->pNodeCmd); pNode->pNode...
false
false
false
false
false
0
save( const Meta::TrackList &tracks, const QString& name ) { DEBUG_BLOCK debug() << "saving " << tracks.count() << " tracks to db with name" << name; Playlists::SqlPlaylistPtr sqlPlaylist = Playlists::SqlPlaylistPtr( new Playlists::SqlPlaylist( name, tracks, Playlists::SqlPlaylis...
false
false
false
false
false
0
mei_me_intr_clear(struct mei_device *dev) { u32 hcsr = mei_hcsr_read(dev); if (hcsr & H_CSR_IS_MASK) mei_hcsr_write(dev, hcsr); }
false
false
false
false
false
0
mii_rw(struct nic *nic __unused, int addr, int miireg, int value) { u8 *base = (u8 *) BASE; u32 reg; int retval; writel(NVREG_MIISTAT_MASK, base + NvRegMIIStatus); reg = readl(base + NvRegMIIControl); if (reg & NVREG_MIICTL_INUSE) { writel(NVREG_MIICTL_INUSE, base + NvRegMIIControl); udelay(NV_MIIBUSY_D...
false
false
false
false
false
0
decode_extradata(AVFormatContext *s, ADTSContext *adts, uint8_t *buf, int size) { GetBitContext gb; init_get_bits(&gb, buf, size * 8); adts->objecttype = get_bits(&gb, 5) - 1; adts->sample_rate_index = get_bits(&gb, 4); adts->channel_conf = get_bits(&gb, 4); if (adts->objecttype > 3) { ...
false
false
false
false
false
0
print_wakeup_source_stats(struct seq_file *m, struct wakeup_source *ws) { unsigned long flags; ktime_t total_time; ktime_t max_time; unsigned long active_count; ktime_t active_time; ktime_t prevent_sleep_time; spin_lock_irqsave(&ws->lock, flags); total_time = ws->total_time; max_time = ws->max_time;...
false
false
false
false
false
0
dev_get_by_macvtap_minor(int minor) { struct net_device *dev = NULL; struct macvlan_dev *vlan; mutex_lock(&minor_lock); vlan = idr_find(&minor_idr, minor); if (vlan) { dev = vlan->dev; dev_hold(dev); } mutex_unlock(&minor_lock); return dev; }
false
false
false
false
false
0
ath9k_htc_setup_rate(struct ath9k_htc_priv *priv, struct ieee80211_sta *sta, struct ath9k_htc_target_rate *trate) { struct ath9k_htc_sta *ista = (struct ath9k_htc_sta *) sta->drv_priv; struct ieee80211_supported_band *sband; u32 caps = 0; int i, j; sband = priv->hw->wiphy->bands[priv->hw->conf.chandef.c...
false
false
false
false
false
0
local_cross(elist l, int dir) { int i, j, is_out; int cross = 0; edge_t *e, *f; if (dir > 0) is_out = TRUE; else is_out = FALSE; for (i = 0; (e = l.list[i]); i++) { if (is_out) for (j = i + 1; (f = l.list[j]); j++) { if ((ND_order(aghead(f)) - ND_order(aghead(e))) * (ED_tail_port(f...
false
false
false
false
false
0
bLoadCpnts( void ) { wxString os1, os2; size_t sz1; Component tCpnt; // Need at least a title line and 2 components if( m_osaNetLst.GetCount( ) < 3 ) return( FALSE ); // Reset sub-circuit detection function os1 = wxT(".ENDS"); bIsSubCkt( os1 ); // Scan circuit description for components fo...
false
false
false
false
false
0
gx_device_init(gx_device * dev, const gx_device * proto, gs_memory_t * mem, bool internal) { memcpy(dev, proto, proto->params_size); dev->memory = mem; dev->retained = !internal; rc_init(dev, mem, (internal ? 0 : 1)); }
false
false
false
false
false
0
blkid_partitions_strcpy_ptuuid(blkid_probe pr, char *str) { struct blkid_chain *chn = blkid_probe_get_chain(pr); if (chn->binary || !str || !*str) return 0; if (!blkid_probe_set_value(pr, "PTUUID", (unsigned char *) str, strlen(str) + 1)) return -ENOMEM; return 0; }
false
false
false
false
false
0
check8bit(const char *str, const char type, void *flag) { for ( ; *str; str++) if ( (unsigned char)*str & 0x80 ) *(int *)flag=1; }
false
false
false
false
false
0
_gda_web_meta_columns (G_GNUC_UNUSED GdaServerProvider *prov, GdaConnection *cnc, GdaMetaStore *store, GdaMetaContext *context, GError **error, const GValue *table_catalog, const GValue *table_schema, const GValue *table_name) { GdaDataModel *model; gboolean retval; WebConnectionData *cda...
false
false
false
false
false
0
libssh2_publickey_init(LIBSSH2_SESSION *session) { LIBSSH2_PUBLICKEY *ptr; BLOCK_ADJUST_ERRNO(ptr, session, publickey_init(session)); return ptr; }
false
false
false
false
false
0
cp_parser_type_specifier (cp_parser* parser, cp_parser_flags flags, cp_decl_specifier_seq *decl_specs, bool is_declaration, int* declares_class_or_enum, bool* is_cv_qualifier) { tree type_spec = NULL_TREE; cp_token *token; enum rid keyword; cp_decl_spec ds = ds_last; /* Assume this t...
false
false
false
false
false
0
show_temp_hyst(struct device *dev, struct device_attribute *devattr, char *buf) { struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); struct lm77_data *data = lm77_update_device(dev); int nr = attr->index; int temp; temp = nr == t_min ? data->temp[nr] + data->temp[t_hyst] : data->...
false
true
false
false
false
1
rb_newobj() { VALUE obj; if (!freelist) garbage_collect(); obj = (VALUE)freelist; freelist = freelist->as.free.next; MEMZERO((void*)obj, RVALUE, 1); #ifdef GC_DEBUG RANY(obj)->file = ruby_sourcefile; RANY(obj)->line = ruby_sourceline; #endif return obj; }
false
false
false
false
false
0
vim_FullName(fname, buf, len, force) char_u *fname, *buf; int len; int force; /* force expansion even when already absolute */ { int retval = OK; int url; *buf = NUL; if (fname == NULL) return FAIL; url = path_with_url(fname); if (!url) retval = mch_FullName(fname, buf, l...
false
false
false
false
false
0
meta() { unsigned int c; KEYMAP *kp; if ((c = TTYget()) == EOF) return CSeof; #if defined(ANSI_ARROWS) /* Also include VT-100 arrows. */ if (c == '[' || c == 'O') switch (c = TTYget()) { default: return ring_bell(); case EOF: return CSeof; case 'A': return h_prev(); case 'B': return h_next()...
false
false
false
false
false
0
avatar_cache_read_cb (GObject *object, GAsyncResult *result, gpointer user_data) { GitgAvatarCacheLoader *loader = user_data; GInputStream *stream = G_INPUT_STREAM (object); GError *error = NULL; gssize len; len = g_inpu...
false
false
false
false
false
0
_isBadFd ( int fd ) { dmtcp::string device = _resolveSymlink( _procFDPath ( fd ) ); return ( device == "" ); }
false
false
false
false
false
0
obj_policy_get_delegation_blob(TSS_HPOLICY hPolicy, UINT32 type, UINT32 *blobLength, BYTE **blob) { struct tsp_object *obj; struct tr_policy_obj *policy; TSS_RESULT result = TSS_SUCCESS; if ((obj = obj_list_get_obj(&policy_list, hPolicy)) == NULL) return TSPERR(TSS_E_INVALID_HANDLE); policy = (struct tr_policy...
false
false
false
false
false
0
resize_receive_buffer(int size) { if(size <= receive_buffer_size) return 0; if(receive_buffer == NULL) { receive_buffer = malloc(size); if(receive_buffer == NULL) { perror("malloc(receive_buffer)"); return -1; } receive_buffer_size = size; } e...
false
false
false
false
false
0
check_acl(struct inode *inode, int mask) { #ifdef CONFIG_FS_POSIX_ACL struct posix_acl *acl; if (mask & MAY_NOT_BLOCK) { acl = get_cached_acl_rcu(inode, ACL_TYPE_ACCESS); if (!acl) return -EAGAIN; /* no ->get_acl() calls in RCU mode... */ if (acl == ACL_NOT_CACHED) return -ECHILD; ...
false
false
false
false
false
0
MGD77_Info_from_Abbrev (char *name, struct MGD77_HEADER *H, GMT_LONG *set, GMT_LONG *item) { GMT_LONG id, c; /* Returns the number in the output list AND passes set,item as the entry in H */ for (c = 0; c < MGD77_N_SETS; c++) { for (id = 0; id < H->info[c].n_col; id++) { if (!strcmp (name, H->info[c].col[id]....
false
false
false
false
false
0
generateEvalCode(CompileState* comp) { Node* cand = expr->nodeInsideAllParens(); ASSERT(cand->isLocation()); LocationNode* loc = static_cast<LocationNode*>(cand); OpValue funVal, thisVal; loc->generateRefFunc(comp, &funVal, &thisVal); args->generateEvalArguments(comp); OpValue out; Cod...
false
false
false
false
false
0
spi_new_device(struct spi_master *master, struct spi_board_info *chip) { struct spi_device *proxy; int status; /* NOTE: caller did any chip->bus_num checks necessary. * * Also, unless we change the return value convention to use * error-or-pointer (not NULL-or-pointer), troubleshootability * sugges...
false
false
false
false
false
0
qtdemux_handle_xmp_taglist (GstQTDemux * qtdemux, GstTagList * taglist) { /* Strip out bogus fields */ if (taglist) { gst_tag_list_remove_tag (taglist, GST_TAG_VIDEO_CODEC); GST_DEBUG_OBJECT (qtdemux, "Found XMP tags %" GST_PTR_FORMAT, taglist); if (qtdemux->tag_list) { /* prioritize native tags...
false
false
false
false
false
0
k8_mc0_mce(u16 ec, u8 xec) { if (BUS_ERROR(ec)) { pr_cont("during system linefill.\n"); return true; } return f10h_mc0_mce(ec, xec); }
false
false
false
false
false
0
view_fullscreen_stop_func(FullScreenData *fs, gpointer data) { ViewWindow *vw = data; vw->fs = NULL; if (vw->ss) vw->ss->imd = vw->imd; }
false
false
false
false
false
0
hud_ship_icon_page_in(ship_info *sip) { hud_frames *sgp; if ( sip->shield_icon_index == 255 ) { return; } // load in shield frames if not already loaded Assert(sip->shield_icon_index < (ubyte)Hud_shield_filenames.size()); sgp = &Shield_gauges.at(sip->shield_icon_index); if ( sgp->first_frame == -1 ) { sgp...
false
false
false
false
false
0
print_transactions_list_get_visibles_lines ( gint *number_of_archives, gint *number_of_transactions ) { gint i; CustomList *custom_list; gint archives_nb = 0; gint transactions_nb = 0; custom_list = transaction_model_get_model (); for (i=0 ; i<custom_list -> num_visibles_rows ; i++...
false
false
false
false
false
0
supplement_binding_1 (cxx_binding *binding, tree decl) { tree bval = binding->value; bool ok = true; tree target_bval = strip_using_decl (bval); tree target_decl = strip_using_decl (decl); if (TREE_CODE (target_decl) == TYPE_DECL && DECL_ARTIFICIAL (target_decl) && target_decl != target_bval && (...
false
false
false
false
false
0
HTS_PStream_gv_parmgen(HTS_PStream * pst, size_t m) { size_t t, i; double step = STEPINIT; double prev = 0.0; double obj; if (pst->gv_length == 0) return; HTS_PStream_conv_gv(pst, m); if (GV_MAX_ITERATION > 0) { HTS_PStream_calc_wuw_and_wum(pst, m); for (i = 1; i <= GV_MAX_ITERA...
false
false
false
false
false
0
get_flags_sync_cb (struct nl_object *obj, void *arg) { GetFlagsInfo *info = arg; /* Ensure this cache item matches our filter */ if (nl_object_match_filter (obj, OBJ_CAST (info->filter)) != 0) info->flags = rtnl_link_get_flags ((struct rtnl_link *) obj); }
false
false
false
false
false
0
brcmf_chip_sr_capable(struct brcmf_chip *pub) { u32 base, addr, reg, pmu_cc3_mask = ~0; struct brcmf_chip_priv *chip; brcmf_dbg(TRACE, "Enter\n"); /* old chips with PMU version less than 17 don't support save restore */ if (pub->pmurev < 17) return false; base = brcmf_chip_get_chipcommon(pub)->base; chip = ...
false
false
false
false
false
0
getNextImageSync(CObservationImagePtr& lastImage ) //This function grabbes the images taken by thread_video { if (!isVideoStreamming()) return false; { mrpt::synch::CCriticalSectionLocker cs( &buffer_img_cs ); if(!buffer_img) return false; lastImage = buffer_img; } return true; }
false
false
false
false
false
0
rb_exec_end_proc() { struct end_proc_data *link, *tmp; int status; volatile int safe = ruby_safe_level; while (ephemeral_end_procs) { tmp_end_procs = link = ephemeral_end_procs; ephemeral_end_procs = 0; while (link) { PUSH_TAG(PROT_NONE); if ((status = EXEC_TAG()) == 0) { ruby_safe_level...
false
false
false
false
false
0
bwmk(W *window, B *b, int prompt) { BW *w = (BW *) joe_malloc(sizeof(BW)); w->parent = window; w->b = b; if (prompt || (!window->y && staen)) { w->y = window->y; w->h = window->h; } else { w->y = window->y + 1; w->h = window->h - 1; } if (b->oldcur) { w->top = b->oldtop; b->oldtop = NULL; w->top->...
false
false
false
false
false
0
initsite(void) { PyObject *m; m = PyImport_ImportModule("site"); if (m == NULL) { PyErr_Print(); Py_Finalize(); exit(1); } else { Py_DECREF(m); } }
false
false
false
false
false
0
free_class_item (gpointer data) { ClassBrowserClass *class = (ClassBrowserClass *) data; if (class->filename) g_free(class->filename); if (class->classname) g_free(class->classname); if (class) g_slice_free(ClassBrowserClass, class); }
false
false
false
false
false
0
generic_dialog_new(const gchar *title, const gchar *role, GtkWidget *parent, gboolean auto_close, void (*cancel_cb)(GenericDialog *, gpointer), gpointer data) { GenericDialog *gd; gd = g_new0(GenericDialog, 1); generic_dialog_setup(gd, title, role, parent, auto_close, cancel_cb, data); re...
false
false
false
false
false
0
unpack_msg(struct log_msg_t *msg) { struct log_chunk_t *chunk; int pos; strcpy(log_buf, msg->hdr->msg); pos = strlen(log_buf); list_for_each_entry(chunk, msg->chunks, entry) { memcpy(log_buf + pos, chunk->msg, chunk->len); pos += chunk->len; } if (pos > 1) log_buf[pos - 1] = 0; else log_buf[0] = 0; }
false
false
false
false
false
0
abitset_andn_or_cmp (bitset dst, bitset src1, bitset src2, bitset src3) { bitset_windex i; bool changed = false; bitset_word *src1p = ABITSET_WORDS (src1); bitset_word *src2p = ABITSET_WORDS (src2); bitset_word *src3p = ABITSET_WORDS (src3); bitset_word *dstp = ABITSET_WORDS (dst); bitset_windex size = ds...
false
false
false
false
true
1
increment(BidiState *bidi, bool skipInlines) { if(!obj) return; if(obj->isText()) { pos++; if(pos >= static_cast<RenderText *>(obj)->stringLength()) { obj = Bidinext( par, obj, bidi, skipInlines ); pos = 0; } } else { obj = Bidinext( par, obj, bidi, sk...
false
false
false
false
false
0
pcap_loop(pcap_t *p, int cnt, pcap_handler callback, u_char *user) { register int n; for (;;) { if (p->sf.rfile != NULL) { /* * 0 means EOF, so don't loop if we get 0. */ n = pcap_offline_read(p, cnt, callback, user); } else { /* * XXX keep reading until we get something * (or an error o...
false
false
false
false
false
0
create(std::unique_ptr<MemoryBuffer> Buffer) { // Sanity check the buffer. if (Buffer->getBufferSize() > std::numeric_limits<unsigned>::max()) return instrprof_error::too_large; std::unique_ptr<InstrProfReader> Result; // Create the reader. if (IndexedInstrProfReader::hasFormat(*Buffer)) Result.reset...
false
false
false
false
false
0
Level_find_class(JNIEnv *env) { static jclass clazz = NULL; if (clazz == NULL) { clazz = (*env)->FindClass(env, "java/util/logging/Level"); if(clazz == NULL) { abort(); } clazz = (jclass)(*env)->NewGlobalRef(env, clazz); } return clazz; }
false
false
false
false
false
0
output_strcasecmp (void) { ACE_OS::printf ("%s", "/* This array is designed for mapping upper and lower case letter\n" " * together for a case independent comparison. The mappings are\n" " * based upon ascii character sequences.\n */" "static char charmap[] = {\n" " ...
false
false
false
false
false
0
report_perfect_segment (int *found_score, List_T hits, Genomicpos_T left, Chrnum_T chrnum, Genomicpos_T chroffset, Genomicpos_T chrhigh, int querylength, Compress_T query_compress, int nmisses_allowed, bool plusp, int genestrand) { Stage3end_T hit; int nmismatches; if (snpp == true) { if ((hit = Sta...
false
false
false
false
false
0
rmobile_reset_probe(struct platform_device *pdev) { int error; sysc_base2 = of_iomap(pdev->dev.of_node, 1); if (!sysc_base2) return -ENODEV; error = register_restart_handler(&rmobile_reset_nb); if (error) { dev_err(&pdev->dev, "cannot register restart handler (err=%d)\n", error); goto fail_unmap; } r...
false
false
false
false
false
0
i915_gem_object_pin_fence(struct drm_i915_gem_object *obj) { if (obj->fence_reg != I915_FENCE_REG_NONE) { struct drm_i915_private *dev_priv = obj->base.dev->dev_private; struct i915_vma *ggtt_vma = i915_gem_obj_to_ggtt(obj); WARN_ON(!ggtt_vma || dev_priv->fence_regs[obj->fence_reg].pin_count > ggtt_vma->p...
false
false
false
false
false
0
getinput (analdef *adef, rawdata *rdta, cruncheddata *cdta, tree *tr) { /* getinput */ if (! getnums(rdta)) return FALSE; if (! getoptions(adef, rdta, cdta, tr)) return FALSE; if (! adef->empf && ! getbasefreqs(rdta)) return FALSE; if (! getyspace(rdta)) r...
false
false
false
false
false
0
paintEvent(QPaintEvent *) { QPainter painter(this); painter.fillRect(rect(), Qt::white); QPixmap colourSwatch(10,10); if (hasColour) { if (colour.isValid()) { colourSwatch.fill(colour); painter.drawPixmap(rect().center()-QPoint(5,5), colourSwatch); } else { QPen pen; pen.setColor(Qt::black); ...
false
false
false
false
false
0
get_default (Fixture *f, gconstpointer test_data) { EvdResolver *other_resolver; g_assert (EVD_IS_RESOLVER (f->resolver)); g_assert_cmpint (G_OBJECT (f->resolver)->ref_count, ==, 1); other_resolver = evd_resolver_get_default (); g_assert (f->resolver == other_resolver); g_assert_cmpint...
false
false
false
false
false
0
mc_queue_handle(uint32_t flags) { struct xen_mc mc_op; int ret = 0; mc_op.cmd = XEN_MC_fetch; mc_op.interface_version = XEN_MCA_INTERFACE_VERSION; set_xen_guest_handle(mc_op.u.mc_fetch.data, &g_mi); do { mc_op.u.mc_fetch.flags = flags; ret = HYPERVISOR_mca(&mc_op); if (ret) { pr_err("Failed to fetch %su...
false
false
false
false
false
0
glp_write_cnfsat(glp_prob *P, const char *fname) { /* write CNF-SAT problem data in DIMACS format */ XFILE *fp = NULL; GLPAIJ *aij; int i, j, len, count = 0, ret; char s[50]; if (P == NULL || P->magic != GLP_PROB_MAGIC) xerror("glp_write_cnfsat: P = %p; invalid problem object\...
true
true
false
false
false
1
player_select_close() { // destroy the player select window Player_select_window.destroy(); // if we're in input mode - we should undo the pilot create reqeust if(Player_select_input_mode) { player_select_cancel_create(); } // if we are just exiting then don't try to save any pilot files - taylor if (Player_...
false
false
false
false
false
0
timegm(struct tm *const t) { register time_t day; register time_t i; register time_t years = t->tm_year - 70; if (t->tm_sec>60) { t->tm_min += t->tm_sec/60; t->tm_sec%=60; } if (t->tm_min>60) { t->tm_hour += t->tm_min/60; t->tm_min%=60; } if (t->tm_hour>60) { t->tm_mday += t->tm_hour/60; t->tm_hour%=60; ...
false
false
false
false
false
0
gnac_profiles_speex_generate_audio_profile(GError **error) { AudioProfileGeneric *generic = gnac_profiles_default_generate_audio_profile( &speex_bfi); AudioProfileSpeex *profile = gnac_profiles_speex_audio_profile_new(); profile->generic = generic; GtkWidget *widget = gnac_profiles_utils_get_widget(&speex...
false
false
false
false
false
0
whitespace(const nstring &value) { print_one(op, "whitespace", "", value); }
false
false
false
false
false
0
bstr_scatprintf(bstr_t *bstr, char *fmt, ...) { va_list ap; bstr_t buf; int len; va_start(ap, fmt); len = _bstr_vasprintf(&buf, fmt, ap); va_end(ap); if (len < 0) { bstr_free(buf); return -1; } *bstr = bstr_catBStr(*bstr, buf); bstr_free(buf); return len; }
false
false
false
false
true
1
gen_split_1663 (rtx curr_insn ATTRIBUTE_UNUSED, rtx *operands ATTRIBUTE_UNUSED) { rtx _val = 0; start_sequence (); #line 5676 "../../src/gcc/config/rs6000/rs6000.md" { operands[1] = rs6000_address_for_fpconvert (operands[1]); if (GET_CODE (operands[2]) == SCRATCH) operands[2] = gen_reg_rtx (DImode); emit...
false
false
false
false
false
0
toaplan2_videoram16_w(offs_t offset, data16_t data, UINT32 mem_mask, int controller) { data16_t oldword = 0; offs_t vram_offset; switch (toaplan2_voffs[controller] & 0xfc00) { case 0x0400: case 0x0000: vram_offset = toaplan2_voffs[controller] & ((TOAPLAN2_BG_VRAM_SIZE/2)-1); oldword = bgvideo...
false
false
false
false
false
0
ForbiddenShip(Object *ship) { forlist(&ship->units) { Unit *u = (Unit *) elem; if (Forbidden(u)) return 1; } return 0; }
false
false
false
false
false
0
base_damage(bool real_life) { int str = (real_life ? str_cur : str_max); int dam = (real_life ? rng(0, str / 2) : str / 2); // Bonus for strong characters if (str > 10) dam += int((str - 9) / 2); // Big bonus for super-human characters if (str > 20) dam += int((str - 20) * 1.5); return dam; }
false
false
false
false
false
0
mdb_read_props(MdbHandle *mdb, GPtrArray *names, gchar *kkd, int len) { guint32 record_len, name_len; int pos = 0; int elem, dtype, dsize; gchar *name, *value; MdbProperties *props; int i=0; #if MDB_DEBUG buffer_dump(kkd, 0, len); #endif pos = 0; record_len = mdb_get_int16(kkd, pos); pos += 4; name_len = m...
false
false
false
false
false
0
Init_Simulation_Data( reax_system *system, control_params *control, simulation_data *data, char *msg ) { Reset_Simulation_Data( data, control->virial ); /* initialize the timer(s) */ if( system->my_rank == MASTER_NODE ) { data->timing.start = Get_Time( ); #if defined(LOG_PERFORMANCE...
false
false
false
false
false
0
dns_ip6_packet_add(stralloc *out,const char *buf,unsigned int len) { unsigned int pos; char header[16]; uint16 numanswers; uint16 datalen; pos = dns_packet_copy(buf,len,0,header,12); if (!pos) return -1; uint16_unpack_big(header + 6,&numanswers); pos = dns_packet_skipname(buf,len,pos); if (!pos) return -...
true
true
false
false
false
1
flashgchar(struct airo_info *ai,int matchbyte,int dwelltime){ int rchar; unsigned char rbyte=0; do { rchar = IN4500(ai,SWS1); if(dwelltime && !(0x8000 & rchar)){ dwelltime -= 10; mdelay(10); continue; } rbyte = 0xff & rchar; if( (rbyte == matchbyte) && (0x8000 & rchar) ){ OUT4500(a...
false
false
false
false
false
0
internalLogin(const std::string &uname, const std::string &pwd) { assert(m_status == DISCONNECTED); m_status = LOGGING_IN; m_username = uname; // store for posterity AtlasAccount account; account->setPassword(pwd); account->setUsername(uname); Login l; l->setArgs1(account); l->set...
false
false
false
false
false
0
writeElement(const wchar_t* name, bool empty, core::array<core::stringw> &names, core::array<core::stringw> &values) { if (!File || !name) return; if (Tabs > 0) { for (int i=0; i<Tabs; ++i) File->write(L"\t", sizeof(wchar_t)); } // write name File->write(L"<", sizeof(wchar_t)...
false
false
false
false
false
0
setup_environment(int argc, Char *argv[]) { /* Set up all kinds of fun stuff */ node *q, *r; char* treestr; char *pChar; double i; boolean firsttree; pointarray treenode = NULL; #ifdef MAC OSErr retcode; FInfo fndrinfo; macsetup("Drawtree","Preview"); #endif #ifdef TURBOC if ((registerbgidri...
false
false
false
false
false
0
screentrace_cb(char *tfn) { tfn = do_subst(tfn, True, True); screentracef = fopen(tfn, "a"); if (screentracef == (FILE *)NULL) { popup_an_errno(errno, "%s", tfn); Free(tfn); return False; } Free(tfn); (void) SETLINEBUF(screentracef); #if !defined(_WIN32) /*[*/ (void) fcntl(fileno(screentracef), F_SETFD, 1)...
false
false
false
false
true
1
esl_msaweight_BLOSUM(ESL_MSA *msa, double maxid) { int *c = NULL; /* cluster assignments for each sequence */ int *nmem = NULL; /* number of seqs in each cluster */ int nc; /* number of clusters */ int i; /* loop counter */ int status; /* Contract checks */ ESL_DASSERT1( (ma...
false
true
false
false
false
1
sh_diff_checksum (call_frame_t *loop_frame, xlator_t *this) { afr_private_t *priv = NULL; afr_local_t *loop_local = NULL; afr_self_heal_t *loop_sh = NULL; int call_count = 0; int i ...
false
false
false
false
false
0
__rep_write_egen(env, rep, egen) ENV *env; REP *rep; u_int32_t egen; { DB_FH *fhp; int ret; size_t cnt; char *p; /* * If running in-memory replication, return without any file * operations. */ if (FLD_ISSET(rep->config, REP_C_INMEM)) return (0); if ((ret = __db_appname(env, DB_APP_META, REP_EGE...
false
false
false
false
false
0
cmv_decode_frame(AVCodecContext *avctx, void *data, int *data_size, const uint8_t *buf, int buf_size) { CmvContext *s = avctx->priv_data; const uint8_t *buf_end = buf + buf_size; if (AV_RL32(buf)==MVIh_TAG||AV_RB32(buf)==MVIh_TAG) { cmv_proces...
false
true
false
false
false
1
request_log(dns_dispatch_t *disp, dns_dispentry_t *resp, int level, const char *fmt, ...) { char msgbuf[2048]; char peerbuf[256]; va_list ap; if (! isc_log_wouldlog(dns_lctx, level)) return; va_start(ap, fmt); vsnprintf(msgbuf, sizeof(msgbuf), fmt, ap); va_end(ap); if (VALID_RESPONSE(resp)) { isc_so...
true
true
false
false
true
1
close_handler (gpointer data) { DialogQueryView *dqv = data; g_return_if_fail (dqv); gnc_dialog_query_view_delete_cb (GTK_DIALOG(dqv->dialog), NULL, dqv); }
false
false
false
false
false
0
importFromEPSG( int nCode ) { OGRErr eErr = importFromEPSGA( nCode ); // Strip any GCS axis settings found. if( eErr == OGRERR_NONE ) { OGR_SRSNode *poGEOGCS = GetAttrNode( "GEOGCS" ); if( poGEOGCS != NULL ) poGEOGCS->StripNodes( "AXIS" ); OGR_SRSNode *poPROJCS = ...
false
false
false
false
false
0
EndElement(const string& name) { if(name=="reactant") { if(!_spmol.get()) return false; _preact->AddReactant(_spmol); } else if(name=="product") { if(!_spmol.get()) return false; _preact->AddProduct(_spmol); } else if(name=="reaction") { _spmol.reset(); return false;/...
false
false
false
false
false
0