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
new_check_button(gchar *label, gpointer callback, gpointer arg, gint state, GtkWidget *box) { GtkWidget *button; /* create, pack & show the button */ button = gtk_check_button_new_with_label(label); gtk_box_pack_start(GTK_BOX(box), button, TRUE, TRUE, 0); gtk_widget_show(but...
false
false
false
false
false
0
pdf_choose_output_glyph_hame(gx_device_pdf *pdev, pdf_text_enum_t *penum, gs_const_string *gnstr, gs_glyph glyph) { if (penum->orig_font->FontType == ft_composite || penum->orig_font->procs.glyph_name(penum->orig_font, glyph, gnstr) < 0) { /* couldn't find a glyph name, so make one up! This can happen if we...
false
false
false
false
false
0
component_deleted(CL_Component *component) { // First try to move focus to someone else: if (component->get_parent()) owner->set_focus(component->get_parent()); // Make sure we dont crash no matter what: if (comp_focus == component) comp_focus = 0; if (comp_capture_mouse == component) comp_capture_mouse = 0; if ...
false
false
false
false
false
0
SetCreateHistogramFunction(CreateHistogramCallback callback) { i::Isolate* isolate = EnterIsolateIfNeeded(); if (IsDeadCheck(isolate, "v8::V8::SetCreateHistogramFunction()")) return; isolate->stats_table()->SetCreateHistogramFunction(callback); }
false
false
false
false
false
0
sheet_widget_adjustment_init_full (SheetWidgetAdjustment *swa, GnmCellRef const *ref, gboolean horizontal) { SheetObject *so; g_return_if_fail (swa != NULL); so = SHEET_OBJECT (swa); so->flags &= ~SHEET_OBJECT_PRINT; swa->adjustment = GTK_ADJUSTMENT (gtk_adjustment_new (0., 0., 100., 1., 10., 0.));...
false
false
false
false
false
0
ikrt_directory_list(ikptr filename, ikpcb* pcb){ DIR* dir; struct dirent* de; if((dir = opendir((char*)(filename + off_bytevector_data))) == NULL){ return ik_errno_to_code(); } ikptr ac = null_object; pcb->root0 = &ac; while(1){ errno = 0; de = readdir(dir); if(de == NULL){ pcb->root...
false
true
false
false
false
1
ParseConfig(const char *in_fname) { FILE *configf; char confline[8192]; if ((configf = fopen(in_fname, "r")) == NULL) { fprintf(stderr, "ERROR: Reading config file '%s': %d (%s)\n", in_fname, errno, strerror(errno)); return -1; } while (!feof(configf)) { if ...
false
false
false
false
true
1
_eio_eet_read_cipher_job(void *data, Ecore_Thread *thread) { Eio_Eet_Read *er = data; er->result = (void*) eet_read_cipher(er->ef, er->name, &er->size, er->cipher_key); if (!er->result) eio_file_thread_error(&er->common, thread); }
false
false
false
false
false
0
sigmaHat() { // Initial state must consist of a lepton and a photon. int idIn = (id2 == 22) ? id1 : id2; int idInAbs = abs(idIn); if (idInAbs != 11 && idInAbs != 13 && idInAbs != 15) return 0.; // Incoming squared lepton mass. double s1 = pow2( particleDataPtr->m0(idInAbs) ); // Kinematical...
false
false
false
false
false
0
context_gbr_add_eq(struct isl_context *context, isl_int *eq, int check, int update) { struct isl_context_gbr *cgbr = (struct isl_context_gbr *)context; cgbr->tab = add_gbr_eq(cgbr->tab, eq); if (cgbr->shifted && !cgbr->shifted->empty && use_shifted(cgbr)) { if (isl_tab_mark_empty(cgbr->shifted) < 0) goto er...
false
false
false
false
false
0
merge(bool high) const { MPI_Comm comm; BOOST_MPI_CHECK_RESULT(MPI_Intercomm_merge, ((MPI_Comm)*this, high, &comm)); return communicator(comm, comm_take_ownership); }
false
false
false
false
false
0
nfs3_fill_link3res (link3res *res, nfsstat3 stat, struct iatt *buf, struct iatt *preparent, struct iatt *postparent, uint64_t deviceid) { post_op_attr poa; wcc_data dirwcc; memset (res, 0, sizeof (*res)); res->status = stat; if (...
false
false
false
false
false
0
match_text(const char *str1, const char *str2) { int matches = 0; while ((*str1 != 0) && (*str2 != 0)) { if (!unc_isalnum(*str1)) { str1++; continue; } if (!unc_isalnum(*str2)) { str2++; continue; } if (unc_tolower(*str1) != unc_tol...
false
false
false
false
false
0
xmlSecTransformCtxInitialize(xmlSecTransformCtxPtr ctx) { int ret; xmlSecAssert2(ctx != NULL, -1); memset(ctx, 0, sizeof(xmlSecTransformCtx)); ret = xmlSecPtrListInitialize(&(ctx->enabledTransforms), xmlSecTransformIdListId); if(ret < 0) { xmlSecError(XMLSEC_ERRORS_HERE, NULL, ...
false
false
false
false
false
0
strlen2(s) CONST char *s; { int i, len; for (i = len = 0; s[i]; i++, len++) if (isekana(s, i)) i++; return(len); }
false
false
false
false
false
0
_exsltDateParseGYear (exsltDateValDatePtr dt, const xmlChar **str) { const xmlChar *cur = *str, *firstChar; int isneg = 0, digcnt = 0; if (((*cur < '0') || (*cur > '9')) && (*cur != '-') && (*cur != '+')) return -1; if (*cur == '-') { isneg = 1; cur++; } firstChar = cur; while ((*cur...
false
false
false
false
false
0
close_au(krb5_audit_moddata auctx) { fclose(au_fd); k5_mutex_destroy(&lock); return 0; }
false
false
false
false
false
0
camera_check_state(struct camera_t *camera) { if(camera->has_blob && camera->is_connected && camera->expose_prop) { camera->ready = 1; d4_printf("Camera is ready\n"); INDI_exec_callbacks(INDI_COMMON (camera), CAMERA_CALLBACK_READY); } }
false
false
false
false
false
0
isl_vec_extend(__isl_take isl_vec *vec, unsigned size) { if (!vec) return NULL; if (size <= vec->size) return vec; vec = isl_vec_cow(vec); if (!vec) return NULL; vec->block = isl_blk_extend(vec->ctx, vec->block, size); if (!vec->block.data) goto error; vec->size = size; vec->el = vec->block.data; r...
false
false
false
false
false
0
buffer_predelete_cb(int pos, int nDeleted, void *cbArg) { Fl_Text_Display *textD = (Fl_Text_Display *)cbArg; if (textD->mContinuousWrap && (textD->mFixedFontWidth == -1 || textD->mModifyingTabDistance)) /* Note: we must perform this measurement, even if there is not a single character deleted; the...
false
false
false
false
false
0
_enableShortcut(omniServant* _svt, const _CORBA_Boolean* _inv) { if (_svt) _shortcut = (_impl_ServantLocator*)_svt->_ptrToInterface(::PortableServer::ServantLocator::_PD_repoId); else _shortcut = 0; _invalid = _inv; }
false
false
false
false
false
0
ca_sprintf_malloc(const char *format, ...) { size_t size = 100; char *c = NULL; ca_assert(format); for(;;) { int r; va_list ap; ca_free(c); if (!(c = ca_new(char, size))) return NULL; ...
false
false
false
false
false
0
t30_init(t30_state_t *s, int calling_party, t30_set_handler_t *set_rx_type_handler, void *set_rx_type_user_data, t30_set_handler_t *set_tx_type_handler, void *set_tx_type_user_data, t30_se...
false
false
false
false
false
0
addr_valid (const TCHAR *txt, uaecptr addr, uae_u32 len) { addrbank *ab = &get_mem_bank(addr); if (ab == 0 || !(ab->flags & (ABFLAG_RAM | ABFLAG_ROM)) || addr < 0x100 || len < 0 || len > 16777215 || !valid_address (addr, len)) { write_log (_T("corrupt %s pointer %x (%d) detected!\n"), txt, addr, len); return 0; ...
false
false
false
false
false
0
process_one_db(char *database) { if (what_to_do == DO_UPGRADE) { int rc= 0; if (opt_fix_db_names && !strncmp(database,"#mysql50#", 9)) { rc= fix_database_storage_name(database); database+= 9; } if (rc || !opt_fix_table_names) return rc; } return process_all_tables_in_db(dat...
false
false
false
false
false
0
gsc_hw_set_output_addr(struct gsc_dev *dev, struct gsc_addr *addr, int index) { pr_debug("dst_buf[%d]: %pad, cb: %pad, cr: %pad", index, &addr->y, &addr->cb, &addr->cr); writel(addr->y, dev->regs + GSC_OUT_BASE_ADDR_Y(index)); writel(addr->cb, dev->regs + GSC_OUT_BASE_ADDR_CB(index)); writel(addr->cr, de...
false
false
false
false
false
0
new_bucket(context_type *context, unsigned short *pID) { hash_table_type *class_hash = &(context->class_hash); int i = *pID = class_hash->entries_used + 1; int row = i / HASH_ROW_SIZE; if (i >= MAX_HASH_ENTRIES) CCerror(context, "Exceeded verifier's limit of 65535 referred classes"); if (cla...
false
false
false
false
false
0
can_rmdir(struct send_ctx *sctx, u64 dir, u64 dir_gen, u64 send_progress) { int ret = 0; struct btrfs_root *root = sctx->parent_root; struct btrfs_path *path; struct btrfs_key key; struct btrfs_key found_key; struct btrfs_key loc; struct btrfs_dir_item *di; /* * Don't try to rmdir the top/root subvolu...
false
false
false
false
false
0
gm_net_disconnect(GmNet *net) { // thread running if (net->priv->state != GM_NET_STATE_DISCONNECTED) { gm_net_close_thread(net); gm_net_set_state(net, GM_NET_STATE_DISCONNECTING); if (net->priv->connect_timeout_id != 0) { g_source_remove(net->priv->connect_timeout_id); net->priv->connect_timeout_id = 0;...
false
false
false
false
false
0
snmp_api_errstring(int snmp_errnumber) { const char *msg = ""; static char msg_buf[SPRINT_MAX_LEN]; if (snmp_errnumber >= SNMPERR_MAX && snmp_errnumber <= SNMPERR_GENERR) { msg = api_errors[-snmp_errnumber]; } else if (snmp_errnumber != SNMPERR_SUCCESS) { msg = NULL; } i...
false
false
false
false
false
0
MihailescuProvablePrime(RandomNumberGenerator &rng, unsigned int pbits) { Integer p; Integer minP = Integer::Power2(pbits-1); Integer maxP = Integer::Power2(pbits) - 1; if (maxP <= Integer(s_lastSmallPrime).Squared()) { // Randomize() will generate a prime provable by trial division p.Randomize(rng, minP, max...
false
false
false
false
false
0
ooCleanCall(OOH323CallData *call) { OOCTXT *pctxt; OOTRACEWARN4 ("Cleaning Call (%s, %s)- reason:%s\n", call->callType, call->callToken, ooGetReasonCodeText (call->callEndReason)); /* First clean all the logical channels, if not already cleaned. */ if(call->logicalChans...
false
false
false
false
false
0
nautilus_file_info_invalidate_extension_info (NautilusFileInfo *file) { g_return_if_fail (NAUTILUS_IS_FILE_INFO (file)); g_return_if_fail (NAUTILUS_FILE_INFO_GET_IFACE (file)->invalidate_extension_info != NULL); NAUTILUS_FILE_INFO_GET_IFACE (file)->invalidate_extension_info (file); }
false
false
false
false
false
0
tsmux_stream_initialize_pes_packet (TsMuxStream * stream) { if (stream->state != TSMUX_STREAM_STATE_HEADER) return TRUE; if (stream->pes_payload_size != 0) { /* Use prescribed fixed PES payload size */ stream->cur_pes_payload_size = stream->pes_payload_size; tsmux_stream_find_pts_dts_within (stream...
false
false
false
false
false
0
h5tools_print_char(h5tools_str_t *str, const h5tool_format_t *info, char ch) { if (info->str_locale == ESCAPE_HTML) { if (ch <= ' ' || ch > '~') h5tools_str_append(str, "%%%02x", ch); else h5tools_str_append(str, "%c", ch); } else { switch (ch) { case ...
false
false
false
false
false
0
gtpfunc_final_score(const std::string &/*str*/, size_t /*i*/, bool has_id, unsigned id) { if (cur_game_info.is_game_play()) output_error("cannot score", has_id, id); else { int black_score = cur_game_info.board_ptr->board_black_score(); int white_score = cur_game_info.board_ptr->board_white_score(); s...
false
false
false
false
false
0
test_revwalk_mergebase__prefer_youngest_merge_base(void) { git_oid result, one, two, expected; cl_git_pass(git_oid_fromstr(&one, "a4a7dce85cf63874e984719f4fdd239f5145052f")); cl_git_pass(git_oid_fromstr(&two, "be3563ae3f795b2b4353bcce3a527ad0a4f7f644")); cl_git_pass(git_oid_fromstr(&expected, "c47800c7266a2be04c57...
false
false
false
false
false
0
taxEmbossTaxReadRef(AjPTaxin taxin) { AjPStr line = NULL; AjPQuery qry; TaxPEmbossQry qryd; const char *p = NULL; ajuint taxid = 0; ajuint firstid = 0; qry = taxin->Input->Query; qryd = qry->QryData; ajDebug("taxEmbossTaxReadRef pos: %Ld\n", ajFileResetPos(qryd->libr)); while(...
false
false
false
false
false
0
display_event (const char *notified_at, const char *friendly_name, const char *service_id, const char *variable_name, const char *value) { GtkTreeModel *model; GtkTreeIter iter; GtkTreePath *path; char *actual_value; ...
false
false
false
false
false
0
compute_dom_frontier(struct compilation_unit *cu) { struct basic_block *b, *start; start = cu->entry_bb; for_each_basic_block(b, &cu->bb_list) { b->dom_frontier = alloc_bitset(nr_bblocks(cu)); if (!b->dom_frontier) return -ENOMEM; } for_each_basic_block(b, &cu->bb_list) { if (b->nr_predecessors >= 2) {...
false
false
false
false
false
0
lrangeCommand(redisClient *c) { robj *o; long start, end, llen, rangelen; if ((getLongFromObjectOrReply(c, c->argv[2], &start, NULL) != REDIS_OK) || (getLongFromObjectOrReply(c, c->argv[3], &end, NULL) != REDIS_OK)) return; if ((o = lookupKeyReadOrReply(c,c->argv[1],shared.emptymultibulk)) == ...
false
false
false
false
false
0
TransferElement(cmlArray& arr) { //Reads the attributes of the current node, e.g. <atom id="a1" elementType="C"/> //pushes each of them as a pairs into each of the members of the array // e.g. ("id", "a1") and (elementType", "C") will be put into AtomArray[n] //where n is the number of times this rout...
false
false
false
false
false
0
project_test_run_list(project_ty *pp, string_list_ty *wlp, user_ty::pointer up, bool progress_flag, time_t time_limit, const nstring_list &variable_assignments) { change::pointer cp; batch_result_list_ty *result; // // create a fake change, // so can set environment variables // for the...
false
false
false
false
false
0
_registered_device(struct message_data *message_data, struct thread_status *thread) { struct dm_event_daemon_message *msg = message_data->msg; const char *fmt = "%s %s %s %u"; const char *id = message_data->id; const char *dso = thread->dso_data->dso_name; const char *dev = thread->device.uuid; int r; u...
false
false
false
false
false
0
convolve_free(convolve_susp_type susp) { table_unref(susp->table); free(susp->x_buffer_pointer); sound_unref(susp->x_snd); ffree_generic(susp, sizeof(convolve_susp_node), "convolve_free"); }
false
false
false
false
false
0
nv40_fan_pwm_get(struct nvkm_therm *therm, int line, u32 *divs, u32 *duty) { struct nvkm_subdev *subdev = &therm->subdev; struct nvkm_device *device = subdev->device; if (line == 2) { u32 reg = nvkm_rd32(device, 0x0010f0); if (reg & 0x80000000) { *duty = (reg & 0x7fff0000) >> 16; *divs = (reg & 0x00007fff)...
false
false
false
false
false
0
xlp9xx_i2c_drain_rx_fifo(struct xlp9xx_i2c_dev *priv) { u32 len, i; u8 *buf = priv->msg_buf; len = xlp9xx_read_i2c_reg(priv, XLP9XX_I2C_FIFOWCNT) & XLP9XX_I2C_FIFO_WCNT_MASK; len = min(priv->msg_buf_remaining, len); for (i = 0; i < len; i++, buf++) *buf = xlp9xx_read_i2c_reg(priv, XLP9XX_I2C_MRXFIFO); p...
false
false
false
false
false
0
bam_plp_init(bam_plp_auto_f func, void *data) { bam_plp_t iter; iter = calloc(1, sizeof(struct __bam_plp_t)); iter->mp = mp_init(); iter->head = iter->tail = mp_alloc(iter->mp); iter->dummy = mp_alloc(iter->mp); iter->max_tid = iter->max_pos = -1; iter->flag_mask = BAM_DEF_MASK; iter->maxcnt = 8000; if (func) ...
false
false
false
false
false
0
cb_init_constants (void) { char *s; int i; cb_error_node = make_constant (CB_CATEGORY_UNKNOWN, NULL); cb_any = make_constant (CB_CATEGORY_UNKNOWN, NULL); cb_true = make_constant (CB_CATEGORY_BOOLEAN, "1"); cb_false = make_constant (CB_CATEGORY_BOOLEAN, "0"); cb_null = make_constant (CB_CATEGORY_DATA_POINTER, "0...
false
false
false
false
false
0
updatePixelTransform(QGeoMapObject *object) { QGeoCoordinate origin = object->origin(); QGraphicsItem *item = graphicsItemFromMapObject(object); // skip any objects without graphicsitems if (!item) return; QRectF localRect = (item->boundingRect() | item->childrenBoundingRect()); // sk...
false
false
false
false
false
0
collectPossibleRoots(Instruction *Base, std::map<int64_t,Instruction*> &Roots) { SmallInstructionVector BaseUsers; for (auto *I : Base->users()) { ConstantInt *CI = nullptr; if (isLoopIncrement(I, IV)) { LoopIncs.push_back(cast<Instruction>(I)); continue; } // The root nodes must be e...
false
false
false
false
false
0
FLAC__lpc_compute_lp_coefficients(const FLAC__real autoc[], unsigned *max_order, FLAC__real lp_coeff[][FLAC__MAX_LPC_ORDER], FLAC__double error[]) { unsigned i, j; FLAC__double r, err, lpc[FLAC__MAX_LPC_ORDER]; FLAC__ASSERT(0 != max_order); FLAC__ASSERT(0 < *max_order); FLAC__ASSERT(*max_order <= FLAC__MAX_LPC_OR...
false
false
false
false
false
0
is_unused_scalar_param (tree parm) { tree name; return (is_gimple_reg (parm) && (!(name = gimple_default_def (cfun, parm)) || has_zero_uses (name))); }
false
false
false
false
false
0
createIP( int index, unsigned char r, unsigned char g, unsigned char b, NWT_RGB * map, int *pnWarkerMark ) { int i; if( index == 0 ) { map[0].r = r; map[0].g = g; map[0].b = b; *pnWarkerMark = 0; return; } if( index <= *pnWarkerMark ) ...
false
false
false
false
false
0
atom(unsigned char const **x) { /* atom */ if (strchr(atomchar, (char)**x)) { *x += strspn((const char *)*x, atomchar); return 1; } /* invalid character */ return 0; }
false
false
false
false
false
0
alarm_gconf_associate_schemas (Alarm *alarm) { AlarmPrivate *priv = ALARM_PRIVATE (alarm); GConfClient *client = priv->gconf_client; GSList *list, *l; GError *error = NULL; if (alarm->id < 0) return; list = gconf_client_all_entries (client, ALARM_GCONF_SCHEMA_DIR, &error); g_return_if_fail (error == NULL)...
false
false
false
false
false
0
mac_filter_del(const char *addr, void *client) { int n[ETH_ALEN]; uint8_t a[ETH_ALEN]; struct mac_t *mac; int i; int found = 0; if (sscanf(addr, "%x:%x:%x:%x:%x:%x", n + 0, n + 1, n + 2, n + 3, n + 4, n + 5) != 6) { cli_send(client, "invalid format\r\n"); return; } for (i = 0; i < ETH_ALEN; i++) { if ...
false
false
false
false
false
0
pie_grab_scanner (Pie_Scanner * scanner) { SANE_Status status; DBG (DBG_proc, "grab_scanner\n"); status = pie_wait_scanner (scanner); if (status) return status; status = sanei_scsi_cmd (scanner->sfd, reserve_unit.cmd, reserve_unit.size, NULL, NULL); if (status) { ...
false
false
false
false
false
0
_finfo_update(void *db_ptr, struct cinfo *info, struct lms_file_info *finfo, unsigned int *flags) { struct master_db *db = db_ptr; struct stat st; _update_finfo_from_stmt(finfo, db->get_files); *flags = 0; if (stat(finfo->path, &st) == 0) { if (st.st_mtime == finfo->mtime && (size_t)st.st_...
false
false
false
false
false
0
gs_currentcolorscreen(gs_state * pgs, gs_colorscreen_halftone * pht) { int code; switch (pgs->halftone->type) { case ht_type_colorscreen: *pht = pgs->halftone->params.colorscreen; return 0; default: code = gs_currentscreen(pgs, &pht->screens.colored.gray); ...
false
false
false
false
false
0
AddCustomCommandRule() { this->AddRule("CUSTOM_COMMAND", "$COMMAND", "$DESC", "Rule for running custom commands.", /*depfile*/ "", /*rspfile*/ "", /*rspcontent*/ "", /*restat*/ true); }
false
false
false
false
false
0
run_linuxrc(int argc, char *argv[], dev_t root_dev) { int root_fd, old_fd; pid_t pid; long realroot = Root_RAM0; const char *ramdisk_name = "/dev/ram0"; FILE *fp; dprintf("kinit: mounting initrd\n"); mkdir("/root", 0700); if (!mount_block(ramdisk_name, "/root", NULL, MS_VERBOSE, NULL)) return -errno; /* Wr...
false
false
false
false
true
1
free_labels(KnappWidget w) { int n; for (n = 0 ; n < w->knapp.no_labels ; n++) XtFree(w->knapp.labels[n]); XtFree((char *)w->knapp.labels); w->knapp.labels = NULL; w->knapp.no_labels = 0; w->knapp.label_no = 0; }
false
false
false
false
false
0
simplify(){ if(str!=EMPTY){ register FXint s=0; register FXint d=0; register FXint e=length(); while(s<e && Ascii::isSpace(str[s])) s++; while(1){ while(s<e && !Ascii::isSpace(str[s])) str[d++]=str[s++]; while(s<e && Ascii::isSpace(str[s])) s++; if(s>=e) break; str[d++]=' '...
false
false
false
false
false
0
read_byte(connection_t *src) { if (src->buffer_consumed >= src->read_buffer.size()) { char local[ENV_UNIVERSAL_BUFFER_SIZE]; ssize_t res = read(src->fd, local, sizeof local); // debug(4, L"Read chunk '%.*s'", res, src->buffer ); if (res < 0) { if (errno == EAG...
false
false
false
false
false
0
gkm_attribute_set_template (CK_ATTRIBUTE_PTR attr, GArray *template) { CK_ATTRIBUTE_PTR array; CK_ATTRIBUTE_PTR at; CK_RV rv; gulong len; gulong i; g_assert (attr); g_warn_if_fail ((attr->type & CKF_ARRAY_ATTRIBUTE) != 0); len = sizeof (CK_ATTRIBUTE) * template->len; if (!attr->pValue) { attr->ulValueLen =...
false
false
false
false
false
0
CanReadFile(const char *filename) { // First check if the file can be read GenericCUBFileAdaptor *reader = CreateReader(filename); if ( reader == ITK_NULLPTR ) { itkDebugMacro(<< "The file is not a valid CUB file"); return false; } // Now check the content bool iscub = true; try { ...
false
false
false
false
false
0
narrate_balance(char * account, char * currency) { char * str; double balance = get_current_balance(account, currency, 0); char * currencystr = get_currency_description(currency); if (currencystr==0) { printf("Unrecognised currency type %s\n", currency); return; } if (balance>=0) { str = get_t...
false
false
false
false
false
0
cdf_print_property_name(char *buf, size_t bufsiz, uint32_t p) { size_t i; for (i = 0; i < __arraycount(vn); i++) if (vn[i].v == p) return snprintf(buf, bufsiz, "%s", vn[i].n); return snprintf(buf, bufsiz, "0x%x", p); }
false
false
false
false
false
0
folder_get_persist_prefs_recursive(GNode *node, GHashTable *pptable) { FolderItem *item = FOLDER_ITEM(node->data); PersistPrefs *pp; GNode *child, *cur; gchar *id; cm_return_if_fail(node != NULL); cm_return_if_fail(item != NULL); /* NOTE: item->path == NULL means top level folder; not interesting * to store ...
false
false
false
false
false
0
init(Dict *dict) { Object obj1, obj2; int i; //----- Domain if (!dict->lookup("Domain", &obj1)->isArray()) { error(-1, "Function is missing domain"); goto err2; } m = obj1.arrayGetLength() / 2; if (m > funcMaxInputs) { error(-1, "Functions with more than %d inputs are unsupported", funcMax...
false
false
false
false
false
0
create_pkg(unsigned int _number_of_pins) { if(number_of_pins) { cout << "error: Package::create_pkg. Package appears to already exist.\n"; return; } number_of_pins = _number_of_pins; pins = new IOPIN *[number_of_pins]; m_pinGeometry = new PinGeometry[number_of_pins]; for(unsigned int...
false
false
false
false
false
0
term_addch_utf8(TERM_WINDOW *window, unichar chr) { char buf[10]; int i, len; len = g_unichar_to_utf8(chr, buf); for (i = 0; i < len; i++) putc(buf[i], window->term->out); }
true
true
false
false
false
1
getPassSubstitution(AnalysisID ID) const { DenseMap<AnalysisID, IdentifyingPassPtr>::const_iterator I = Impl->TargetPasses.find(ID); if (I == Impl->TargetPasses.end()) return ID; return I->second; }
false
false
false
false
false
0
MoveAction(vtkAbstractWidget *w) { vtkRectilinearWipeWidget *self = reinterpret_cast<vtkRectilinearWipeWidget*>(w); // compute some info we need for all cases int X = self->Interactor->GetEventPosition()[0]; int Y = self->Interactor->GetEventPosition()[1]; // Set the cursor appropriately if ( self->Widget...
false
false
false
false
false
0
unicode_to_ascii(char *string, int buflen, __le16 *unicode, int unicode_size) { int i; if (buflen <= 0) /* never happens, but... */ return; --buflen; /* space for nul */ for (i = 0; i < unicode_size; i++) { if (i >= buflen) break; string[i] = (char)(le16_to_cpu(unicode[i])); } string[i] = 0x00; }
false
false
false
false
false
0
qib_7322_eeprom_wen(struct qib_devdata *dd, int wen) { int prev_wen; u32 mask; mask = 1 << QIB_EEPROM_WEN_NUM; prev_wen = ~gpio_7322_mod(dd, 0, 0, 0) >> QIB_EEPROM_WEN_NUM; gpio_7322_mod(dd, wen ? 0 : mask, mask, mask); return prev_wen & 1; }
false
false
false
false
false
0
release( void ) throw(SemaphoreException) { SemaphoreOperationStatus aStatus( SUCCESS ); aStatus = setUnlock( IPC_NOWAIT ); return aStatus; } }
false
false
false
false
false
0
_mesa_GetMaterialfv( GLenum face, GLenum pname, GLfloat *params ) { GET_CURRENT_CONTEXT(ctx); GLuint f; GLfloat (*mat)[4] = ctx->Light.Material.Attrib; FLUSH_VERTICES(ctx, 0); /* update materials */ FLUSH_CURRENT(ctx, 0); /* update ctx->Light.Material from vertex buffer */ if (face==GL_FRONT) { ...
false
false
false
false
false
0
getModRefInfo(ImmutableCallSite CS1, ImmutableCallSite CS2) { if (!EnableTBAA) return AAResultBase::getModRefInfo(CS1, CS2); if (const MDNode *M1 = CS1.getInstruction()->getMetadata(LLVMContext::MD_tbaa)) if (const MDNode *M2 = CS2.getInstru...
false
false
false
false
false
0
__wb_request_unref (wb_request_t *req) { int ret = -1; wb_inode_t *wb_inode = NULL; wb_inode = req->wb_inode; if (req->refcount <= 0) { gf_log ("wb-request", GF_LOG_WARNING, "refcount(%d) is <= 0", req->refcount); goto out; } ...
false
false
false
false
false
0
removeBlock(fl_BlockLayout * pBlock) { if(m_bDoingPurge) { return true; } if(m_pLayout && m_pLayout->isLayoutDeleting()) { return false; } if(isInVector(pBlock,&m_vecEntries) >= 0) { fp_TOCContainer * pTOC = static_cast<fp_TOCContainer *>(getFirstContainer()); if(pTOC) { pTOC->clearScreen(); } ...
false
false
false
false
false
0
CL(const ShowerParticleVector::const_iterator & a, unsigned int index=0) { return (*a)->colourInfo()->colourLines().empty() ? ThePEG::tColinePtr() : const_ptr_cast<ThePEG::tColinePtr>((*a)->colourInfo()->colourLines()[index]); }
false
false
false
false
false
0
wd_do_transfer_in (void) { #if WD33C93_DEBUG > 0 write_log (_T("%s SCSI I [%02X] %d/%d %s\n"), WD33C93, wdregs[WD_COMMAND_PHASE], wd_dataoffset, wd_tc, scsitostring ()); #endif wd_dataoffset = 0; if (wdregs[WD_COMMAND_PHASE] >= 0x36 && wdregs[WD_COMMAND_PHASE] < 0x47) { wdregs[WD_COMMAND_PHASE] = 0x47; wd_phase ...
false
false
false
false
false
0
do_duplicate_params(param_t** _n, param_t* _p, int _shm) { param_t* last, *ptr, *t; if (!_n) { LM_ERR("invalid parameter value\n"); return -1; } last = 0; *_n = 0; ptr = _p; while(ptr) { if (_shm) { t = (param_t*)shm_malloc(sizeof(param_t)); } else { t = (param_t*)pkg_malloc(sizeof(param_t)); ...
false
false
false
false
false
0
gst_qt_mux_get_asc_buffer_ts (GstQTMux * qtmux, GstQTPad * pad, GstBuffer * buf) { const gint wrap = G_N_ELEMENTS (pad->buf_entries); GstClockTime ts; /* store buffer and ts, latter ordered */ if (buf) { pad->buf_entries[pad->buf_tail++] = buf; pad->buf_tail %= wrap; gst_qt_mux_push_ts (qtmux, pad,...
false
false
false
false
false
0
BnsAdjustFlowBondsRad( BN_STRUCT *pBNS, BN_DATA *pBD, inp_ATOM *at, int num_atoms ) { int bError=0, nOrigDelta=0, ret, num_removed; #if( CHECK_AROMBOND2ALT == 1 ) int *pcValMinusBondsVal = NULL; int i, nValMinusBondsVal, nAltBonds, bIgnore, valen, is_rad, excess; /* find valence excess (it m...
false
false
false
false
false
0
bkm_interrupt_ipac(int intno, void *dev_id) { struct IsdnCardState *cs = dev_id; u_char ista, val, icnt = 5; u_long flags; spin_lock_irqsave(&cs->lock, flags); ista = readreg(cs->hw.ax.base, cs->hw.ax.data_adr, IPAC_ISTA); if (!(ista & 0x3f)) { /* not this IPAC */ spin_unlock_irqrestore(&cs->lock, flags); re...
false
false
false
false
false
0
radeon_do_wait_for_idle(drm_radeon_private_t * dev_priv) { int i, ret; dev_priv->stats.boxes |= RADEON_BOX_WAIT_IDLE; ret = radeon_do_wait_for_fifo(dev_priv, 64); if (ret) return ret; for (i = 0; i < dev_priv->usec_timeout; i++) { if (!(RADEON_READ(RADEON_RBBM_STATUS) & RADEON_RBBM_ACTIVE)) { rad...
false
false
false
false
false
0
replace_name(struct commit_name *e, int prio, const unsigned char *sha1, struct tag **tag) { if (!e || e->prio < prio) return 1; if (e->prio == 2 && prio == 2) { /* Multiple annotated tags point to the same commit. * Select one to keep based upon their tagger date. */ struct...
false
false
false
false
false
0
gva_favorites_remove (const gchar *game) { if (G_UNLIKELY (!initialized)) favorites_load (); g_return_if_fail (game != NULL); game = g_intern_string (game); favorites = g_list_remove_all (favorites, game); favorites_save (); }
false
false
false
false
false
0
awt_copy_selection_list_2_queried_species(struct adaqbsstruct *cbs, AW_selection_list *id, const char *hit_description) { GB_transaction ta(cbs->gb_main); awt_assert(strstr(hit_description, "%s")); // hit_description needs '%s' (which is replaced by visible content of 'id') GB_ERROR error = 0;...
false
false
false
false
false
0
write(output::pointer op) { // // The output looks something like this... // // S: Mode u=rw,g=r,o=r // S: Checked-in ./ // S: /u/cvsroot/supermunger/mungeall.c // S: /mungeall.c/1.1/// // string_ty *short_dir_name = os_dirname_relative(client_side); string_ty *short_file_name = ...
false
false
false
false
false
0
insert_linebreaks(const QByteArray &s, int *col, int lfAt) { QByteArray out = s; int needed = (out.size() + *col) / lfAt; // how many newlines needed? if(needed > 0) { int firstlen = lfAt - *col; // length of first chunk int at = firstlen + (lfAt * (needed - 1)); // position of last newline ...
false
false
false
false
false
0
strrindex(char *buffer, int ch) { char *address = NULL; do if(*buffer == ch) address = buffer; while (*buffer++ != '\0'); return(address); }
false
false
false
false
false
0
lt_extlang_db_new(void) { lt_extlang_db_t *retval = lt_mem_alloc_object(sizeof (lt_extlang_db_t)); if (retval) { lt_error_t *err = NULL; lt_extlang_t *le; LT_ITER_TMPL_INIT (&retval->parent, _lt_extlang_db); retval->extlang_entries = lt_trie_new(); lt_mem_add_ref((lt_mem_t *)retval, retval->extlang_entri...
false
false
false
false
false
0
print_plot_ranges_etc (const GPT_SPEC *spec, FILE *fp) { const char *rstrs[] = { "x", "y", "y2", "t", "x2" }; int i; gretl_push_c_numeric_locale(); for (i=0; i<5; i++) { if (i < 3 && spec->logbase[i] > 0.0) { fprintf(fp, "set logscale %s %g\n", rstrs[i], spec->logbase[i]); } if (na(spec-...
false
false
false
false
false
0
getParamString() const { return "ChangeSvgCommand " + QString(" id:%1, old:%2, new:%3") .arg(m_sketchWidget->viewID()) .arg(m_oldFilename) .arg(m_newFilename) ; }
false
false
false
false
false
0
as_wide_impl(const char* str, size_t size) { const uint8_t* data = reinterpret_cast<const uint8_t*>(str); // first pass: get length in wchar_t units size_t length = utf_decoder<wchar_counter>::decode_utf8_block(data, size, 0); // allocate resulting string std::basic_string<wchar_t> result; resul...
false
false
false
false
false
0
on_find_previous1_activate(GtkMenuItem *menuitem, gpointer user_data) { if (search_data.flags & SCFIND_REGEXP) /* Can't reverse search order for a regex (find next ignores search backwards) */ utils_beep(); else search_find_again(TRUE); }
false
false
false
false
false
0