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
__ibvs_prep_flash_access_mad( IN ibvs_t* p_ibvs, IN uint16_t lid, IN uint8_t method, IN uint16_t attr_id, IN uint32_t attr_mod, IN uint8_t size, IN uint32_t data[], IN uint32_t address, OUT osm_madw_t **pp_madw) { osm_mad_addr_t mad_addr; osm_madw_t *p_madw; uint8_t ...
false
false
false
false
false
0
maybe_end_member_template_processing (void) { int i; if (!inline_parm_levels_used) return; --inline_parm_levels_used; for (i = 0; i < VARRAY_INT (inline_parm_levels, inline_parm_levels_used); ++i) { --processing_template_decl; current_template_parms = TREE_CHAIN (current_te...
false
false
false
false
false
0
kill_procs(struct list_head *to_kill, int forcekill, int trapno, int fail, struct page *page, unsigned long pfn, int flags) { struct to_kill *tk, *next; list_for_each_entry_safe (tk, next, to_kill, nd) { if (forcekill) { /* * In case something went wrong with munmapping * make sure the process...
false
false
false
false
false
0
ring_test_fifo(struct test_fifo_struct *f) { int retval; /* * loops some data through the pipes to make sure they still work */ switch((f->flags) & O_ACCMODE) { case O_RDONLY: retval = write_atomic(f->rdwr_fd); if (!retval) retval = read_atomic(f->client_fd); break; case O_WRON...
false
false
false
false
false
0
sgen_init_allocator (void) { #if defined(HAVE_KW_THREAD) && !defined(SGEN_WITHOUT_MONO) int tlab_next_addr_offset = -1; int tlab_temp_end_offset = -1; MONO_THREAD_VAR_OFFSET (tlab_next_addr, tlab_next_addr_offset); MONO_THREAD_VAR_OFFSET (tlab_temp_end, tlab_temp_end_offset); mono_tls_key_set_offset (TLS_KEY_SG...
false
false
false
false
false
0
parse_menuitem(char *buff, void *state) { static menu_t *menu; menuitem_t *curitem; ASSERT_RVAL(state != NULL, (void *) (file_skip_to_end(), NULL)); if (*buff == SPIFCONF_BEGIN_CHAR) { menu = (menu_t *) state; curitem = menuitem_create(NULL); return ((void *) curitem); } ...
false
false
false
false
false
0
load_file(cmd_parms *cmd, void *dummy, const char *filename) { apr_dso_handle_t *handle; const char *used_file, *error; error = dso_load(cmd, &handle, filename, &used_file); if (error) return error; ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, NULL, APLOGNO(01576) "loaded file...
false
false
false
false
true
1
upack (char *buf, CheckMsg * msg, enum ck_msg_type *type) { char *obuf; int nread; if (buf == NULL) return -1; obuf = buf; *type = upack_type (&buf); check_type (*type, __FILE__, __LINE__); upftab[*type] (&buf, msg); nread = buf - obuf; return nread; }
false
false
false
false
true
1
update_lcd(struct gps_data_t *gpsdata) { char tmpbuf[255]; char *gridsquare; /* Get our location in Maidenhead. */ gridsquare = maidenhead(gpsdata->fix.latitude,gpsdata->fix.longitude); /* Fill in the latitude and longitude. */ if (gpsdata->fix.mode >= MODE_2D) { int track; char *s; s = deg_t...
false
false
false
false
false
0
sas_ex_discover_devices(struct domain_device *dev, int single) { struct expander_device *ex = &dev->ex_dev; int i = 0, end = ex->num_phys; int res = 0; if (0 <= single && single < end) { i = single; end = i+1; } for ( ; i < end; i++) { struct ex_phy *ex_phy = &ex->ex_phy[i]; if (ex_phy->phy_state == PH...
false
false
false
false
false
0
hostname_validate (const char *hostname) { const char *p; gunichar c, first_char, last_char; p = hostname; if (*p == '\0') return TRUE; do { /* read in a label */ c = g_utf8_get_char (p); p = g_utf8_next_char (p); if (!is_escalphanum (c)) return FALSE; first_char = c; ...
false
false
false
false
false
0
getEnvironmentVarNameByIndex(int index) const { if(index < 0 || index >= (int)getImpl()->env_.size()) return ""; StringMap::const_iterator iter = getImpl()->env_.begin(); for(int i = 0; i < index; ++i) ++iter; return iter->first.c_str(); }
false
false
false
false
false
0
sendResults(IDB_HANDLE ** handle, FIS_HANDLE ** fisHandle, DMAN_HANDLE ** dmanHandle, const char *accessionNumber, const char *studyInstanceUID, char *requestingAETitle, char *remoteAETitle) { FIS_STUDYRECORD study; FIS_RESULTSRECORD results; CONDITION cond = 0; FIS_INTERPRETATIONRECORD *...
false
false
false
false
false
0
init_child(void) { /* If initialization failed, there isn't much we can do. */ if (child_broken) return; /* Create pipes. */ if (pipe(child_outpipe) < 0) { popup_an_errno(errno, "pipe()"); child_broken = True; return; } if (pipe(child_errpipe) < 0) { popup_an_errno(errno, "pipe()"); close(child_outpi...
false
false
false
false
false
0
zGetTBTreeNode(zTBTree *t){ zTBTreeNode* n; t->size++; if(t->dead_nodes == NULL){ /* if there are no dead node allocate a new node */ n = zCreateTBTreeNode(); } else{ /* otherwise return the dead node at the start of the list */ n = t->dead_nodes; t->dead_nodes = t->dead_nodes->child; if(n->alive != 0)...
false
false
false
false
false
0
cmd_rename_sheet (WorkbookControl *wbc, Sheet *sheet, char const *new_name) { WorkbookSheetState *old_state; Sheet *collision; g_return_val_if_fail (new_name != NULL, TRUE); g_return_val_if_fail (sheet != NULL, TRUE); if (*new_name == 0) { go_cmd_context_error_invalid (GO_CMD_CONTEXT (wbc), _("Name"), ...
false
false
false
false
false
0
open_compress_pipe(const String &filename, ErrorHandler *errh) { StringAccum cmd; int c = compressed_filename(filename); switch (c) { case COMP_COMPRESS: cmd << "compress"; break; case COMP_GZIP: cmd << "gzip"; break; case COMP_BZ2: cmd << "bzip2"; break; default: errh->error(...
false
false
false
false
false
0
getFlagsByName(const char *theName, Fl_Menu_Item *currentMenu, int menuSize) { int i, theFlags = -1; if (currentMenu == 0) currentMenu = dynamicMenu; if (menuSize == 0) menuSize = size(); for (i = 0 ; i < menuSize ; i++) if ((currentMenu[i].label() != 0) && (strcmp(currentMenu[...
false
false
false
false
false
0
contact_record_cb_new (ECalBackendContacts *cbc, ECalBackendSExp *sexp, gboolean as_string) { ContactRecordCB *cb_data = g_new (ContactRecordCB, 1); cb_data->cbc = cbc; cb_data->sexp = sexp; cb_data->as_string = as_string; cb_data->result = NULL; return cb_data; }
false
false
false
false
false
0
unknownFieldMsg(emf_ObjectData_X* object_data, bool is_fatal) { UserInterface* gui = theControlCenter->getGui(); strstream strm; if ( is_fatal ) { strm << "***ERROR: Unknown field name ("; } else { strm << "***WARNING: Unknown field name ("; } strm << object_data->field_name << ") when read...
false
false
false
false
false
0
process_state_for_insn_equiv_partition (state_t state) { arc_t arc; arc_t *insn_arcs_array = XCNEWVEC (arc_t, description->insns_num); /* Process insns of the arcs. */ for (arc = first_out_arc (state); arc != NULL; arc = next_out_arc (arc)) insn_arcs_array [arc->insn->insn_reserv_decl->insn_num] = arc; ...
false
false
false
false
false
0
first(RegionList *input, int num) { /* It would be cool, if i just could truncate the input list. * Too bad that checking for if i just could is too complicated */ RegionList *result; ListIterator i; Region r; SGREPDATA(input); result=new_region_list(sgrep); start_region_search(input,&...
false
false
false
false
false
0
qexp_func_defined (Bonobo_ServerInfo * si, QueryExpr * e, QueryContext * qctx) { QueryExprConst retval, v1; v1 = qexp_evaluate (si, e->u.function_value.arguments->data, qctx); retval.value_known = TRUE; retval.type = CONST_BOOLEAN; retval.u.v_boolean = v1.value_known ? TRUE : FALSE; retval.needs_free = FALSE...
false
false
false
false
false
0
AssGVar ( UInt gvar, Obj val ) { Obj cops; /* list of internal copies */ Obj * copy; /* one copy */ UInt i; /* loop variable */ Char * ...
false
false
false
false
false
0
fillBuf(int pos, int len) { int c; if (pos < 0 || len < 0 || len > (int)sizeof(buf) || pos > INT_MAX - (int)sizeof(buf)) { return gFalse; } if (pos < bufPos) { return gFalse; } // if requested region will not fit in the current buffer... if (pos + len > bufPos + (int)sizeof(buf)) { //...
false
false
false
false
false
0
tn3270e_request(void) { int tt_len, tb_len; char *tt_out; char *t; tt_len = strlen(termtype); if (try_lu != CN && *try_lu) tt_len += strlen(try_lu) + 1; tb_len = 5 + tt_len + 2; tt_out = Malloc(tb_len + 1); t = tt_out; t += sprintf(tt_out, "%c%c%c%c%c%s", IAC, SB, TELOPT_TN3270E, TN3270E_OP_DEVICE_TYP...
false
false
false
false
false
0
table_share_hash_get_key(const uchar *entry, size_t *length, my_bool) { const PFS_table_share * const *typed_entry; const PFS_table_share *share; const void *result; typed_entry= reinterpret_cast<const PFS_table_share* const *> (entry); DBUG_ASSERT(typed_entry != NULL); ...
false
false
false
false
false
0
gda_models_provider_open_connection (GdaServerProvider *provider, GdaConnection *cnc, GdaQuarkList *params, G_GNUC_UNUSED GdaQuarkList *auth, G_GNUC_UNUSED guint *task_id, GdaServerProviderAsyncCallback async_cb, G_GNUC_UNUSED gpointer cb_data) { g_return_val_if_fail (GDA_IS_MODELS_PROVIDER ...
false
false
false
false
false
0
pm80x_deinit(void) { /* * workaround: clear the dependency between pm800 and pm805. * would remove it after HW chip fixes the issue. */ if (g_pm80x_chip->companion) g_pm80x_chip->companion = NULL; else g_pm80x_chip = NULL; return 0; }
false
false
false
false
false
0
sbitmap_zero (sbitmap bmap) { memset (bmap->elms, 0, SBITMAP_SIZE_BYTES (bmap)); if (bmap->popcount) memset (bmap->popcount, 0, bmap->size * sizeof (unsigned char)); }
false
false
false
false
false
0
wlc_phy_stf_chain_set(struct brcms_phy_pub *pih, u8 txchain, u8 rxchain) { struct brcms_phy *pi = container_of(pih, struct brcms_phy, pubpi_ro); pi->sh->phytxchain = txchain; if (ISNPHY(pi)) wlc_phy_rxcore_setstate_nphy(pih, rxchain); pi->pubpi.phy_corenum = (u8)hweight8(pi->sh->phyrxchain); }
false
false
false
false
false
0
fetchSvAttrib(SV *attribs, char *key) { dTHX; if (attribs) { SV **svp; if ((svp = hv_fetch((HV*) SvRV(attribs), key, strlen(key), 0)) != NULL) { return newSVsv(*svp); } } return NULL; }
false
false
false
false
false
0
purchase_dlg_reset( PurchaseDlg *pdlg ) { lbox_set_items( pdlg->nation_lbox, get_purchase_nations() ); lbox_set_items( pdlg->uclass_lbox, get_purchase_unit_classes() ); pdlg->cur_nation = lbox_select_first_item( pdlg->nation_lbox ); if (pdlg->cur_nation == NULL) /* list box empty */ pdlg->cur_nation = cur_playe...
false
false
false
false
false
0
ircd_running (void) { int pid; if (file_exists(IRCDPID_PATH)) { pid = read_pid(IRCDPID_PATH); if (pid > 0) { return(verify_pid(pid) == 1); } else { return(-1); } } return(0); }
false
false
false
false
false
0
finishpcall (lua_State *L, int status, lua_KContext extra) { if (status != LUA_OK && status != LUA_YIELD) { /* error? */ lua_pushboolean(L, 0); /* first result (false) */ lua_pushvalue(L, -2); /* error message */ return 2; /* return false, msg */ } else return lua_gettop(L) - (int)extra; /* r...
false
false
false
false
false
0
libeval_25add_load_path(ScmObj *SCM_FP, int SCM_ARGCNT, void *data_) { ScmObj path_scm; const char * path; ScmObj afterp_scm; ScmObj afterp; ScmObj SCM_SUBRARGS[3]; int SCM_i; SCM_ENTER_SUBR("%add-load-path"); if (SCM_ARGCNT >= 3 && !SCM_NULLP(SCM_ARGREF(SCM_ARGCNT-1))) Scm_Error("too many arg...
false
false
false
false
false
0
g_time_format (struct tm *self, const gchar* format) { gchar* result = NULL; gchar* _tmp0_ = NULL; gchar* buffer; gint buffer_length1; gint _buffer_size_; gchar* _tmp1_; gint _tmp1__length1; const gchar* _tmp2_; gchar* _tmp3_; gint _tmp3__length1; gchar* _tmp4_; g_return_val_if_fail (format != NULL, NULL); ...
false
false
false
false
false
0
pf_key_v2_register_sa_seq(u_int8_t *spi, size_t sz, u_int8_t proto, struct sockaddr *dst, int dstlen, u_int32_t seq) { struct pf_key_v2_sa_seq *node = 0; node = malloc(sizeof *node); if (!node) goto cleanup; memset(node, '0', sizeof *node); node->spi = malloc(sz); if (!node->spi) goto cleanup; node->dst...
false
true
false
true
false
1
trackpoint_write(struct ps2dev *ps2dev, unsigned char loc, unsigned char val) { if (ps2_command(ps2dev, NULL, MAKE_PS2_CMD(0, 0, TP_COMMAND)) || ps2_command(ps2dev, NULL, MAKE_PS2_CMD(0, 0, TP_WRITE_MEM)) || ps2_command(ps2dev, NULL, MAKE_PS2_CMD(0, 0, loc)) || ps2_command(ps2dev, NULL, MAKE_PS2_...
false
false
false
false
false
0
IoMessage_assertArgCount_receiver_(IoMessage *self, int n, IoObject *receiver) { if (List_size(DATA(self)->args) < n) { IoState_error_(IOSTATE, self, "[%s %s] requires %i arguments\n", IoObject_name(receiver), CSTRING(DATA(self)->name), n); } }
false
false
false
false
false
0
arm_split_compare_and_swap (rtx operands[]) { rtx rval, mem, oldval, newval, scratch; enum machine_mode mode; enum memmodel mod_s, mod_f; bool is_weak; rtx label1, label2, x, cond; rval = operands[0]; mem = operands[1]; oldval = operands[2]; newval = operands[3]; is_weak = (operands[4] != const0_rt...
false
false
false
false
false
0
lrc_attr_add(CONNECTION *c, DBH *dbh, char **arglist) { int rc; globus_rls_attr_type_t atype; char *val; if (!arglist[0] || !arglist[1] || !arglist[2] || !arglist[3]) { rrpc_error(c, GLOBUS_RLS_BADARG, ""); return; } atype = atoi(arglist[2]); if (atype == globus_rls_attr_type_str && !argl...
false
false
false
false
false
0
menubar_visible_changed(property_t prop) { GtkWidget *widget; gboolean visible; widget = gui_main_window_lookup("menu_menubar_visible"); gui_prop_get_boolean_val(prop, &visible); gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(widget), visible); widget = gui_main_window_lookup("menubar_main"); /* ...
false
false
false
false
false
0
add_account_verbose(char *contact, eb_account *ea, int verbosity) { struct relocate_account_data *rad; struct contact *c = find_contact_by_nick(contact); eb_account *account; if (ea->ela) account = find_account_with_ela(ea->handle, ea->ela); else account = find_account_by_handle(ea->handle, ea->service_id); ...
false
false
false
false
false
0
denali_irq_init(struct denali_nand_info *denali) { uint32_t int_mask; int i; /* Disable global interrupts */ denali_set_intr_modes(denali, false); int_mask = DENALI_IRQ_ALL; /* Clear all status bits */ for (i = 0; i < denali->max_banks; ++i) iowrite32(0xFFFF, denali->flash_reg + INTR_STATUS(i)); denali_ir...
false
false
false
false
false
0
idxFirst(Cursor & cur) const { switch (v_align_) { case 't': cur.idx() = 0; break; case 'b': cur.idx() = (nrows() - 1) * ncols(); break; default: cur.idx() = ((nrows() - 1) / 2) * ncols(); } cur.pos() = 0; return true; }
false
false
false
false
false
0
folder_set_message_flags (CamelFolder *folder, const gchar *uid, CamelMessageFlags flags, CamelMessageFlags set) { CamelMessageInfo *info; gint res; g_return_val_if_fail (folder->summary != NULL, FALSE); info = camel_folder_summary_get ...
false
false
false
false
false
0
write_internal_format(FILE *out) { pos_format = PSEDIT_POS_FORMAT; size_format = PSEDIT_SIZE_FORMAT; color_format = PSEDIT_COLOR_FORMAT; text_format = PSEDIT_TEXT_FORMAT_PRINT; glyph_format = PSEDIT_GLYPH_FORMAT; tag_format = PSEDIT_TAG_FORMAT; for (int i = 1; i < pse->get_max_pages(); i++) { if (pse->g...
false
false
false
false
false
0
handleFightSocket() { switch( _socket->getCla2() ) { case C_FIGHT_INIT: handleInit(); break; case C_FIGHT_CREATURE: break; case C_FIGHT_LORD: handleOpponent(); break; case C_FIGHT_CELL: handleCell(); break; case C_FIGHT_UNIT: handleNewUnit(); break; case C_FIGHT_MODUNIT: break; case C_FIGHT_...
false
false
false
false
false
0
k_bc_init (enum blockcipher_e cipher) { enum k_error_e err = K_ESUCCESS; struct k_bc_t* c = 0; c = k_calloc(1, sizeof(struct k_bc_t)); if (!c) { err = K_ENOMEM; goto k_bcmode_init_err; } c->blockcipher = bc_get_by_id(cipher); if (!c->blockcipher) { err = K_ENOCIPHER; goto k_bcmode_init_err; } if (!c->...
false
false
false
false
false
0
oss_getattro(oss_audio_t *self, PyObject *nameobj) { char *name = ""; PyObject * rval = NULL; if (PyUnicode_Check(nameobj)) name = _PyUnicode_AsString(nameobj); if (strcmp(name, "closed") == 0) { rval = (self->fd == -1) ? Py_True : Py_False; Py_INCREF(rval); } else if (...
false
false
false
false
false
0
command_pause (int unitnum, int paused) { struct cdunit *cdu = unitisopen (unitnum); if (!cdu) return -1; int old = cdu->cdda_paused; cdu->cdda_paused = paused; return old; }
false
false
false
false
false
0
getDescendantIndexes(const QModelIndex &parent) { QModelIndexList list; const int column = 0; for(int row = 0; row < m_model->rowCount(parent); ++row) { QModelIndex idx = m_model->index(row, column, parent); list << idx; list << getDescendantIndexes(idx); } return list; }
false
false
false
false
false
0
eio_dent_cmp (const eio_dirent *a, const eio_dirent *b) { return a->score - b->score ? a->score - b->score /* works because our signed char is always 0..100 */ : a->inode < b->inode ? -1 : a->inode > b->inode ? 1 : 0; }
false
false
false
false
false
0
List(const char* PluginID, const char* param, ostream* os) { vector<string> vlist; if(!ListAsVector(PluginID,param, vlist)) *os << PluginID << " is not a recognized plugin type. Those with instances of sub-types loaded are:" << endl; copy(vlist.begin(), vlist.end(), std::ostream_iterator<string>(*os, "\n")); ...
false
false
false
false
false
0
f_printf(argvars, rettv) typval_T *argvars; typval_T *rettv; { rettv->v_type = VAR_STRING; rettv->vval.v_string = NULL; #ifdef HAVE_STDARG_H /* only very old compilers can't do this */ { char_u buf[NUMBUFLEN]; int len; char_u *s; int saved_did_emsg = did_emsg; char *fmt; /* Get the requir...
false
false
false
false
false
0
mx_window_allocation_changed_cb (ClutterActor *actor, ClutterActorBox *box, ClutterAllocationFlags flags, MxWindow *window) { MxPadding padding; gboolean from_toolbar; MxWindowPrivate...
false
false
false
false
false
0
SetConfigDefaults(int bSet) { int i; void *var_ptr = NULL; for(i = 0; ConfigVars[i].var_name[0] != 0; i++) { if(strcmp(ConfigVars[i].var_type,"%s") == 0) { if(ConfigVars[i].Flags & CON_FLG_BASED_VAR) { if(ConfigPass == 0) { // Prior to first pass, class variables haven't...
false
false
false
true
false
1
gst_avdtp_sink_start(GstBaseSink *basesink) { GstAvdtpSink *self = GST_AVDTP_SINK(basesink); gint sk; gint err; GST_INFO_OBJECT(self, "start"); self->data = g_new0(struct bluetooth_data, 1); self->stream = NULL; self->stream_caps = NULL; self->mp3_using_crc = -1; self->channel_mode = -1; if (self->transpo...
false
false
false
false
false
0
ptaGetLinearLSF(PTA *pta, l_float32 *pa, l_float32 *pb, NUMA **pnafit) { l_int32 n, i; l_float32 factor, sx, sy, sxx, sxy, val; l_float32 *xa, *ya; PROCNAME("ptaGetLinearLSF"); if (!pta) return ERROR_INT("pta not defined", procName, ...
false
false
false
true
false
1
vlog_msgf(int fd, int lf, const char* fmt, va_list ap, int with_errno) { int level = LOG_PRI(lf); char buf[1024]; if (level_ < level) { return 0; } if (fd > -1) { if (dprintf(fd, "%s;", flty_[level]) < 0) { return -1; } if (vdprintf(fd, ...
true
true
false
false
true
1
es_ttf_renderUTF8Shaded(sdl_data *sd, int len, char *buff) { char *text, *bp, *start; int sendlen; TTF_Font *font; SDL_Surface *surface; SDL_Color fgcolor, bgcolor; bp = buff; // read input // note: note: see note on parameter ordering in es_ttf_renderTextSolid PO...
false
false
false
false
true
1
screenshot_save_to_file (ScreenshotApplication *self) { GFile *target_file; if (self->priv->dialog != NULL) screenshot_dialog_set_busy (self->priv->dialog, TRUE); target_file = g_file_new_for_uri (self->priv->save_uri); if (self->priv->should_overwrite) { g_file_replace_async (target_file, ...
false
false
false
false
false
0
pop_arguments (tree method_type) { function_args_iterator fnai; tree type; vec<tree, va_gc> *args = NULL; int arity; FOREACH_FUNCTION_ARGS (method_type, type, fnai) { /* XXX: leaky abstraction. */ if (type == void_type_node) break; vec_safe_push (args, type); } arity = ...
false
false
false
false
false
0
do_message_scan() { DB_MSG_FROM_HOST mfh; char buf[256]; bool found=false; int retval; sprintf(buf, "where handled=0"); while (1) { retval = mfh.enumerate(buf); if (retval) { if (retval != ERR_DB_NOT_FOUND) { log_messages.printf(MSG_DEBUG, ...
false
false
false
false
false
0
nm_supplicant_interface_get_ifname (NMSupplicantInterface *self) { g_return_val_if_fail (self != NULL, NULL); g_return_val_if_fail (NM_IS_SUPPLICANT_INTERFACE (self), NULL); return NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self)->dev; }
false
false
false
false
false
0
event(uint8_t buf[], uint16_t message_id, const char *event_name, const char *data, int ttl, EventType::Enum event_type) { uint8_t *p = buf; *p++ = 0x50; // non-confirmable, no token *p++ = 0x02; // code 0.02 POST request *p++ = message_id >> 8; *p++ = message_id & 0xff; *p++ = 0xb1; // one-byt...
false
false
false
false
false
0
operator=(const Theorem& th) { // Handle self-assignment if(this == &th) return *this; if(d_thm == th.d_thm) return *this; long tmp = th.d_thm; // Increase the refcount on th if (tmp & 0x1) { TheoremValue* tv = (TheoremValue*) (tmp & (~(0x1))); DebugAssert(tv->d_refcount > 0, ...
false
false
false
false
false
0
wi_ip_version(wi_string_t *ip) { struct sockaddr_in sa_in; struct sockaddr_in6 sa_in6; if(wi_string_contains_string(ip, WI_STR("."), 0)) { if(inet_pton(AF_INET, wi_string_cstring(ip), &sa_in.sin_addr) > 0) return WI_IP_IPV4; } else if(wi_string_contains_string(ip, WI_STR(":"), 0)) { if(inet_pton(AF_INET6...
false
false
false
false
false
0
runOnBasicBlock(BasicBlock &BB) { if (skipOptnoneFunction(BB)) return false; AA = &getAnalysis<AAResultsWrapperPass>().getAAResults(); IRBuilder<true, TargetFolder> TheBuilder( BB.getContext(), TargetFolder(BB.getModule()->getDataLayout())); Builder = &TheBuilder; DenseMap<const Value *, SmallVec...
false
false
false
false
false
0
nlmclnt_cancel(struct nlm_host *host, int block, struct file_lock *fl) { struct nlm_rqst *req; int status; dprintk("lockd: blocking lock attempt was interrupted by a signal.\n" " Attempting to cancel lock.\n"); req = nlm_alloc_call(host); if (!req) return -ENOMEM; req->a_flags = RPC_TASK_ASYNC; nlmc...
false
false
false
false
false
0
isSafeToMoveRegClassDefs(const TargetRegisterClass *RC) const { // FIXME: Return false for x87 stack register classes for now. We can't // allow any loads of these registers before FpGet_ST0_80. return !(RC == &X86::CCRRegClass || RC == &X86::RFP32RegClass || RC == &X86::RFP64RegClass || RC == &X86::RF...
false
false
false
false
false
0
disk_flush_events(struct gendisk *disk, unsigned int mask) { struct disk_events *ev = disk->ev; if (!ev) return; spin_lock_irq(&ev->lock); ev->clearing |= mask; if (!ev->block) mod_delayed_work(system_freezable_power_efficient_wq, &ev->dwork, 0); spin_unlock_irq(&ev->lock); }
false
false
false
false
false
0
brasero_metadata_stop_pipeline (GstElement *pipeline) { GstState state; GstStateChangeReturn change; change = gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_NULL); change = gst_element_get_state (pipeline, &state, NULL, GST_MSECOND); /* better wait for the state change to be comple...
false
false
false
false
false
0
DateCalc_Blank(charptr *target, Z_int count) { while (count-- > 0) *(*target)++ = ' '; *(*target) = '\0'; }
false
false
false
false
false
0
lgetxattrs_stub (XDR *xdr_in) { guestfs_int_xattr_list *r; struct guestfs_lgetxattrs_args args; const char *path; /* The caller should have checked before calling this. */ if (! optgroup_linuxxattrs_available ()) { reply_with_error_errno (ENOTSUP, "feature '%s' is not available in this\n" "...
false
false
false
false
false
0
putQChemGuessOptionsInfoInTextEditor() { if(GTK_TOGGLE_BUTTON (buttonMixed)->active) gabedit_text_insert (GABEDIT_TEXT(text), NULL, NULL, NULL, " scf_guess_mix 5\n",-1); }
false
false
false
false
false
0
prot_autoc_write_82599(struct ixgbe_hw *hw, u32 autoc, bool locked) { s32 ret_val = 0; /* Blocked by MNG FW so bail */ if (ixgbe_check_reset_blocked(hw)) goto out; /* We only need to get the lock if: * - We didn't do it already (in the read part of a read-modify-write) * - LESM is enabled. */ if (!lock...
false
false
false
false
false
0
isl_upoly_cst_reduce(__isl_keep struct isl_upoly_cst *cst) { isl_int gcd; isl_int_init(gcd); isl_int_gcd(gcd, cst->n, cst->d); if (!isl_int_is_zero(gcd) && !isl_int_is_one(gcd)) { isl_int_divexact(cst->n, cst->n, gcd); isl_int_divexact(cst->d, cst->d, gcd); } isl_int_clear(gcd); }
false
false
false
false
false
0
Check(bool check_meta) { // simply check that the file can be resolved DataStatus r = Resolve(true); if (r) return r; return DataStatus(DataStatus::CheckError, r.GetErrno(), r.GetDesc()); }
false
false
false
false
false
0
TCSP_LoadManuMaintPub_Internal(TCS_CONTEXT_HANDLE hContext, /* in */ TCPA_NONCE antiReplay, /* in */ UINT32 PubKeySize, /* in */ BYTE * PubKey, /* in */ TCPA_DIGEST * checksum) /* out */ { TSS_RESULT result; UINT32 paramSize; UINT64 offset = 0; BYTE txBlob[TSS_TPM_TXBLOB_SIZE...
false
false
false
false
false
0
camel_internet_address_find_address (CamelInternetAddress *addr, const gchar *address, const gchar **namep) { struct _address *a; gint i, len; g_assert (CAMEL_IS_INTERNET_ADDRESS (addr)); len = ((CamelAddress *) addr)->addresses->len; for ...
false
false
false
false
false
0
FetchStorage(const struct sess *sp, ssize_t sz) { ssize_t l; struct storage *st; st = VTAILQ_LAST(&sp->obj->store, storagehead); if (st != NULL && st->len < st->space) return (st); l = fetchfrag; if (l == 0) l = sz; if (l == 0) l = params->fetch_chunksize * 1024LL; st = STV_alloc(sp, l); if (st == NULL...
false
false
false
false
false
0
wait_not_in_use() /* leaves fides_mutex set */ { lock(); while (m_in_use) { unlock(); bmicrosleep(0, 200); /* wait */ lock(); } }
false
false
false
false
false
0
format_one(std::ostream& os, const option_description& opt, unsigned first_column_width, unsigned line_length) { stringstream ss; ss << " " << opt.format_name() << ' ' << opt.format_parameter(); // Don't use ss.rdbuf() since g++ 2.96 is ...
false
false
false
false
false
0
sil164_get_hw_state(struct intel_dvo_device *dvo) { int ret; unsigned char ch; ret = sil164_readb(dvo, SIL164_REG8, &ch); if (ret == false) return false; if (ch & SIL164_8_PD) return true; else return false; }
false
false
false
false
false
0
blame_renderer_query_tooltip_cb (GtkSourceGutterRenderer *renderer, GtkTextIter *iter, GdkRectangle *area, gint x, gint y, ...
false
false
false
false
false
0
ShowInstanceMarker(DisplayOrErase,Layer,Pointer) int Layer; int DisplayOrErase; struct o *Pointer; { struct t *TGen; char Type; int DX,DY,X,Y; if(Not Parameters.kpShowInstanceMarkers) return; /*Mark reference point of symbol call */ X = Y = 0; CDInitTGen(Pointer,&TGen); loop { ...
false
false
false
false
false
0
rqs_match_host_scope(lList *scope, const char *name, lList *master_hgroup_list, bool is_xscope) { lListElem *ep; DENTER(TOP_LAYER, "rqs_match_host_scope"); if (lGetElemStr(scope, ST_name, "*")) { DRETURN(true); } if (sge_is_pattern(name) || is_hgroup_name(name)) { DRETURN(rqs_match_use...
false
false
false
false
false
0
Swig_register_module(const char *n, ModuleFactory f) { Module *m = new Module(n, f); m->next = modules; modules = m; }
false
false
false
false
false
0
_e2p_pack_yes (E2_PackDlgRunTime *rt) { static gchar *cmd_str [MAXTYPES] = { //these command strings are in same order as enum //NOTE that %%f is converted to %f when the command is constructed with g_strdup_printf () ">tar cvf - %%f | gzip - > \"%s\"", //run in separate shell ">tar cvf - %%f | bzip2 - > \"%s\"...
false
false
false
false
false
0
AllocateNearest_ (size_t *pixelsNP, GUIS *guiSP) { static size_t elementsN; static size_t struct_size; static size_t mem_size; static NearestAtomS *nearest_atomSP; /* Prepare the parameters which define the size of memory chunk: */ elementsN = (size_t) guiSP->main_win_free_area_width * (size_t) guiSP->main...
false
false
false
false
false
0
PrintSelf(std::ostream & os, Indent indent) const { Superclass::PrintSelf(os, indent); os << indent << "Chain code 2D: " << GetChainCodeAsString() << std::endl; }
false
false
false
false
false
0
connect_pppoatm(void) { int fd; struct atm_qos qos; system ("/sbin/modprobe -q pppoatm"); if (!device_got_set) no_device_given_pppoatm(); fd = socket(AF_ATMPVC, SOCK_DGRAM, 0); if (fd < 0) fatal("failed to create socket: %m"); memset(&qos, 0, sizeof qos); qos.txtp.traffic_class = qos.rxtp.traffic_class = ...
false
false
false
false
false
0
generateSelect2 (Tree sig, Tree sel, Tree s1, Tree s2, int priority) { string var = getFreshID("q"); string expsel = CS(sel, 0); string exps1 = CS(s1, 0); string exps2 = CS(s2, 0); string ltqSelDef; ltqSelDef += subst("$0(t) = \n", var); ltqSelDef += "\\left\\{\\begin{array}{ll}\n"; ltqSelDef += subst("$...
false
false
false
false
false
0
doFinalization(Module &M) { const DataLayout &DL = getDataLayout(); bool isPPC64 = DL.getPointerSizeInBits() == 64; PPCTargetStreamer &TS = static_cast<PPCTargetStreamer &>(*OutStreamer->getTargetStreamer()); if (!TOC.empty()) { MCSectionELF *Section; if (isPPC64) Section = OutStreamer->...
false
false
false
false
false
0
eval_tskassign_rhsexpr(register struct xstk_t *xsp, register int32 lhsreal, register int32 lhswid, register int32 rhsreal, register int32 rhssign) { if (lhsreal) { /* think passing packed bit does not work on all compilers ? */ if (!rhsreal) __cnv_stk_fromreg_toreal(xsp, rhssign); } else { /* hand...
false
false
false
false
false
0
lookChar() { if (src.abort) return EOF; return *current; }
false
false
false
false
false
0
rideSelected() { bool wasActive = active; active = amVisible(); if (!wasActive && active) replot(); }
false
false
false
false
false
0
generateKey(SECKEYPublicKey** publicKey, char* tokenName) { SECKEYPrivateKey* privateKey = NULL; PK11RSAGenParams params; unsigned char *rand_buffer = NULL; PK11SlotInfo *slot; /* Add the secure info to the context before we create the key. */ /* Do it here so that we can zero it immediately...
false
false
false
false
false
0