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
find( const char *context, const char *sourceText, const char *comment ) const { QMap<MetaTranslatorMessage, int>::const_iterator it = mm.constFind(MetaTranslatorMessage(context, sourceText, comment, QString(), 0)); return (it == mm.constEnd() ? MetaTranslatorMessage() : it.key()); }
false
false
false
false
false
0
cmd_put_list_op(gx_device_clist_writer * cldev, cmd_list * pcl, uint size) { byte *dp = cldev->cnext; if (size + cmd_headroom > cldev->cend - dp) { if ((cldev->error_code = cmd_write_buffer(cldev, cmd_opv_end_run)) != 0 || (size + cmd_headroom > cldev->cend - cldev->cnext)) { ...
false
false
false
false
false
0
Flush() { HandleScope scope; Local<Value> cb = handle_->Get(on_headers_sym); if (!cb->IsFunction()) return; Handle<Value> argv[2] = { CreateHeaders(), url_.ToString() }; Local<Value> r = Local<Function>::Cast(cb)->Call(handle_, 2, argv); if (r.IsEmpty()) got_exce...
false
false
false
false
false
0
fill_actions_from_index (MonoImage *image, guint32 token, MonoDeclSecurityActions* actions, guint32 id_std, guint32 id_noncas, guint32 id_choice) { MonoBoolean result = FALSE; MonoTableInfo *t; guint32 cols [MONO_DECL_SECURITY_SIZE]; int index = mono_metadata_declsec_from_index (image, token); int i; t = &imag...
false
false
false
false
false
0
GMT_chol_recover (double *a, double *d, GMT_LONG nr, GMT_LONG n, GMT_LONG nerr, GMT_LONG donly) { /* Given a, a symmetric positive definite matrix of row dimension nr, and size n >= abs(nerr), one uses GMT_chol_dcmp() to attempt to find b, a lower triangular Cholesky decomposition of a, so that b*b' = a. If a is (...
false
false
false
false
false
0
directory_command_should_use_begindir(const or_options_t *options, const tor_addr_t *addr, int or_port, uint8_t router_purpose, int anonymized_connection) { if (!or_port) return 0; /* We don't know an...
false
false
false
false
false
0
go (const char *thing) { if (thing[0] == '/') { rb_audiocd_info_get (thing, NULL, (GAsyncReadyCallback)audiocd_info_cb, NULL); } else { const char *includes[] = { "artist-credits", NULL }; rb_musicbrainz_lookup ("release", thing, includes, NULL, (GAsyncReadyCallback) release_cb, NULL); } return FALSE; }
false
false
false
false
false
0
get (igzstream& file) { u_int16 i, j; string tstr; clear (); // Load mapobjects i << file; for (; i; i--) { mapobject * tobj = new mapobject; tstr << file; tobj->load (tstr); insert_mapobject (tobj, nbr_of_mapobjects (), tstr.c_str ()); } ...
false
false
false
false
false
0
setSeekPercentage(int percentage) { m_SeekTime.clear(); m_SeekPercentage = percentage > 95 ? 95 : percentage; }
false
false
false
false
false
0
HandleListInfo(Ref<ListInfo>& list_info, Ref<FileSet>& set) { if(!list_info) return; if(!list_info->Done()) return; if(list_info->Error()) { eprintf("mirror: %s\n",list_info->ErrorText()); stats.error_count++; transfer_count-=root_transfer_count; set_state(FINISHING); ...
false
false
false
false
false
0
seen_tval(int tval) { int i; for (i = 1; i < z_info->k_max; i++) { object_kind *k_ptr = &k_info[i]; /* Skip empty objects, unseen objects, and incorrect tvals */ if (!k_ptr->name) continue; if (!k_ptr->everseen) continue; if (k_ptr->tval != tval) continue; return TRUE; } return FALSE; }
false
false
false
false
false
0
getBoundary() const { return getFactory()->createGeometryCollection(NULL); }
false
false
false
false
false
0
kick_disconnected_devices() { usb_handle *usb; adb_mutex_lock(&usb_lock); // kick any devices in the device list that were not found in the device scan for(usb = handle_list.next; usb != &handle_list; usb = usb->next){ if (usb->mark == 0) { usb_kick(usb); } else { ...
false
false
false
false
false
0
Do(const Spectrum& in, Spectrum& out) { if (!mConfig.GetPreserveOuts()) { out = in; //TODO big cludge for streaming } DataArray& inMag = in.GetMagBuffer(); DataArray& outMag = out.GetMagBuffer(); int spectrumSize = in.GetSize(); mMag.Resize(spectrumSize); mMag.SetSize(spectrumSize); //control is supposed...
false
false
false
false
false
0
cyttsp_disable(struct cyttsp *ts) { int error; error = ttsp_send_command(ts, CY_LOW_POWER_MODE); if (error) return error; disable_irq(ts->irq); return 0; }
false
false
false
false
false
0
search_cb (GrlSource *source, guint browse_id, GrlMedia *media, guint remaining, gpointer user_data, const GError *error) { guint i; GrlRelatedKeys *url_info; if (error) { g_error ("Search operation failed. Reason: %s", error->message); } if (media) { /* Look through all availabl...
false
false
false
false
false
0
parse_irda_frame(int type, GNetBuf *buf, int len, GString *str) { /* Captured time (more or less always Rx/Tx time) */ print_time(curr_time, str); if (config_print_diff) { print_diff_time(curr_time, prev_time, str); /* Swap */ tmp_time = prev_time; prev_time = curr_time; curr_time = tmp_time; } /* Fu...
false
false
false
false
false
0
write_stream_flags(int fd) { int i, flags; tweaked_append = append_mode == 1; tweaked_append_verify = append_mode == 2; #ifdef ICONV_OPTION tweaked_iconv = iconv_opt != NULL; #endif /* Start the batch file with a bitmap of data-stream-affecting * flags. */ for (i = 0, flags = 0; flag_ptr[i]; i++) { if (*fla...
false
false
false
false
false
0
test_readable_symbol(symbol_t *symbol) { if ((symbol->info.rinfo->modes & (0x1 << src_mode)) == 0) { snprintf(errbuf, sizeof(errbuf), "Register %s unavailable in source reg mode %d", symbol->name, src_mode); stop(errbuf, EX_DATAERR); } if (symbol->info.rinfo->mode == WO) { stop("Write Only register sp...
false
false
false
false
false
0
gst_rtp_mp4g_pay_parse_audio_config (GstRtpMP4GPay * rtpmp4gpay, GstBuffer * buffer) { GstMapInfo map; guint8 objectType = 0; guint8 samplingIdx = 0; guint8 channelCfg = 0; GstBitReader br; gst_buffer_map (buffer, &map, GST_MAP_READ); gst_bit_reader_init (&br, map.data, map.size); /* any object t...
false
false
false
false
false
0
nlmsvc_decode_reboot(struct svc_rqst *rqstp, __be32 *p, struct nlm_reboot *argp) { if (!(p = xdr_decode_string_inplace(p, &argp->mon, &argp->len, SM_MAXSTRLEN))) return 0; argp->state = ntohl(*p++); memcpy(&argp->priv.data, p, sizeof(argp->priv.data)); p += XDR_QUADLEN(SM_PRIV_SIZE); return xdr_argsize_check(rqs...
false
true
false
false
false
1
linenoiseAddCompletion(linenoiseCompletions *lc, const char *str) { size_t len = strlen(str); char *copy, **cvec; copy = malloc(len+1); if (copy == NULL) return; memcpy(copy,str,len+1); cvec = realloc(lc->cvec,sizeof(char*)*(lc->len+1)); if (cvec == NULL) { free(copy); retur...
false
false
false
false
false
0
miteQueryAdd(gageQuery queryScl, gageQuery queryVec, gageQuery queryTen, gageQuery queryMite, gageItemSpec *isp) { static const char me[]="miteQueryAdd"; if (NULL == isp->kind) { /* nothing to add */ } else if (gageKindScl == isp->kind) { GAGE_QUERY_ITEM_ON(queryScl, isp->item);...
false
false
false
false
false
0
test_alloc_two (void) { gpointer p, p2; gboolean ret; p2 = gcr_secure_memory_alloc (4); g_assert(p2 != NULL); g_assert_cmpint (IS_ZERO, ==, find_non_zero (p2, 4)); memset (p2, 0x67, 4); p = gcr_secure_memory_alloc (16200); g_assert (p != NULL); g_assert_cmpint (IS_ZERO, ==, find_non_zero (p, 16200)); mems...
false
false
false
false
false
0
OnPanelPopupMenu(wxContextMenuEvent& WXUNUSED(event)) { if (m_pPanel->GetListCtrl()->GetSelectedItemCount() > 0) { wxMenu *menu = new wxMenu; menu->Append(idContextRemove, _T("Remove"), _T("")); m_pPanel->GetListCtrl()->PopupMenu(menu); } }
false
false
false
false
false
0
gncBillTermCreate (QofBook *book) { GncBillTerm *term; if (!book) return NULL; term = g_object_new (GNC_TYPE_BILLTERM, NULL); qof_instance_init_data(&term->inst, _GNC_MOD_NAME, book); term->name = CACHE_INSERT (""); term->desc = CACHE_INSERT (""); term->discount = gnc_numeric_zero (); a...
false
false
false
false
false
0
property_refresh_no_app(property_t *prop) { g_assert(prop != NULL); g_assert(prop->apwal != NULL); g_assert(prop->apwal->selected_app == NULL); TRACE("%s", ""); // set the frame insensitive so the user won't be able to modify the data. gtk_widget_set_sensitive(prop->apwal->property_frame, FALSE); // bloc...
false
false
false
false
false
0
initroman(VOID_A) { int i, n; if (romanlist) return; if (!(romanlist = (romantable *)malloc(sizeof(origromanlist)))) return; memcpy((char *)romanlist, (char *)origromanlist, sizeof(origromanlist)); for (n = 0; n < ROMANLISTSIZ; n++) { for (i = 0; i < R_MAXKANA; i++) { if (!romanlist[n].code[i]) continue; ...
true
true
false
false
false
1
deque_reverse(dequeobject *deque, PyObject *unused) { block *leftblock = deque->leftblock; block *rightblock = deque->rightblock; Py_ssize_t leftindex = deque->leftindex; Py_ssize_t rightindex = deque->rightindex; Py_ssize_t n = (deque->len)/2; Py_ssize_t i; PyObject *tmp; for (i=0 ; i<...
false
false
false
false
false
0
mailmime_extract_boundary(struct mailmime_content * content_type) { char * boundary; boundary = mailmime_content_param_get(content_type, "boundary"); /* XXX - this should be unquoted properly, should use mailimf_quoted_string_parse() */ if (boundary != NULL) { int len; char * new_boundary; l...
false
false
false
false
false
0
characterProcessing(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft, LEUnicode *&outChars, LEGlyphStorage &glyphStorage, LEErrorCode &success) { if (LE_FAILURE(success)) { return 0; } if (chars == NULL || offset < 0 || count < 0 || max < 0 || offs...
false
false
false
false
false
0
merge_useless_child(hwloc_topology_t topology, hwloc_obj_t *pparent) { hwloc_obj_t parent = *pparent, child, *pchild, ios; int replacechild = 0, replaceparent = 0; for_each_child_safe(child, parent, pchild) merge_useless_child(topology, pchild); child = parent->first_child; if (!child) /* There are ...
false
false
false
false
false
0
mmove(But *but, int x, int y) { Txtin *ti = but->iPacket; ButWin *win = but->win; ButEnv *env = win->env; int newMousePress; bool rightSide; if (!(but->flags & BUT_PRESSABLE)) return(BUTOUT_CAUGHT); if (!ti->mouseInBut) { ti->mouseInBut = TRUE; butEnv_setCursor(env, but, butCur_text); ...
false
false
false
false
false
0
isBinaryOp(char_type c) { return support::contains("+-<>=/*", static_cast<char>(c)); }
false
false
false
false
false
0
_rtl92ee_enable_fw_download(struct ieee80211_hw *hw, bool enable) { struct rtl_priv *rtlpriv = rtl_priv(hw); u8 tmp; if (enable) { rtl_write_byte(rtlpriv, REG_MCUFWDL, 0x05); tmp = rtl_read_byte(rtlpriv, REG_MCUFWDL + 2); rtl_write_byte(rtlpriv, REG_MCUFWDL + 2, tmp & 0xf7); } else { tmp = rtl_read_byte(r...
false
false
false
false
false
0
getlargest(long *discnumnuc) { /* find the largest in array numnuc */ long i, largest; largest = 0; for (i = (long)zero; i <= (long)seven; i++) if (discnumnuc[i] > largest) largest = discnumnuc[i]; return largest; }
false
false
false
false
false
0
audio_update(Audio *a,Model *m) { model_foreach_object(m,do_audio_update,a); if (a->music != NULL && !Mix_PlayingMusic()) { a->music_track++; Mix_FreeMusic(a->music); a->music = audio_loadmusic(a->music_track); if (a->music != NULL) { Mix_PlayMusic(a->music,1); } } }
false
false
false
false
false
0
pmbus_find_attributes(struct i2c_client *client, struct pmbus_data *data) { int ret; /* Voltage sensors */ ret = pmbus_add_sensor_attrs(client, data, "in", voltage_attributes, ARRAY_SIZE(voltage_attributes)); if (ret) return ret; /* Current sensors */ ret = pmbus_add_sensor_attrs(client, data, "...
false
false
false
false
false
0
compileInits(Interpreter &interp, const Environment &env, const BoundVarList &initVars, size_t initIndex, int stackPos, const InsnPtr &next) { if (initIndex >= inits_.size()) return next; InsnPtr tem = compileInits(interp, env, initVars, initIndex + 1, stackPos + 1, next)...
false
false
false
false
false
0
readRideInformationBlock(RideFile* rideFile, const QByteArray& block) { // year = block[0-2] qint16 year = readShortFromByteArray(block); qint16 month = readShortFromByteArray(block.mid(2)); qint16 day = readShortFromByteArray(block.mid(6)); qint16 hour = readShortFromByteArray(block.mid(8)); qi...
false
false
false
false
false
0
krb5_auth(void *instance, REQUEST *request) { int r; krb5_data tgtname = { 0, KRB5_TGS_NAME_SIZE, KRB5_TGS_NAME }; krb5_creds kcreds; krb5_ccache ccache; char cache_name[L_tmpnam + 8]; krb5_context context = *((rlm_krb5_t *)instance)->context...
true
true
false
false
true
1
channel_set(int num) { if (wi_set_channel(_state.s_wi, num) == -1) err(1, "wi_set_channel()"); _state.s_chan = num; }
false
false
false
false
false
0
hnj_hyphen_rhmin(int utf8, const char *word, int word_size, char * hyphens, char *** rep, int ** pos, int ** cut, int rhmin) { int i = 0; int j; // ignore numbers for (j = word_size - 1; j > 0 && word[j] <= '9' && word[j] >= '0'; j--) i--; for (j = word_size - 1; i < rhmin && j > 0; j--) { ...
false
false
false
false
false
0
on_window_enter_notify (GtkWidget * widget, GdkEventCrossing * event, gpointer func_data) { // when enter from the left side of the menu,don't close the menu. if ((event->x>=Skin->face.menu.x[0])&&(event->x<Skin->face.menu.x[0]+Skin->face.menu.w)&&(event->y >=Skin->face.menu.y[0])&&(event->y <Skin->face.menu.y[0...
false
false
false
false
false
0
xc_send_i2c_data(struct xc4000_priv *priv, u8 *buf, int len) { struct i2c_msg msg = { .addr = priv->i2c_props.addr, .flags = 0, .buf = buf, .len = len }; if (i2c_transfer(priv->i2c_props.adap, &msg, 1) != 1) { if (priv->ignore_i2c_write_errors == 0) { printk(KERN_ERR "xc4000: I2C write failed (len=%i)\...
false
false
false
false
false
0
cheese_preferences_dialog_set_new_available_camera_device (CheesePreferencesDialog* self, GtkTreeIter* iter) { GtkTreeIter new_iter = {0}; GtkTreeIter _tmp0_ = {0}; GtkListStore* _tmp1_ = NULL; gboolean _tmp2_ = FALSE; GtkComboBox* _tmp5_ = NULL; GtkTreeIter _tmp6_ = {0}; g_return_if_fail (self != NULL); g_retu...
false
false
false
false
false
0
generate_key( int bits, int char_length ) { if ( ! mt_initialized() ) initialize_with_rand(); int i; if ( bits % char_length != 0 ) { printf( "Invalid number of bits: %d (not divisible by %d)\n", bits, char_length ); printf( "Rounding down to %d-bit key...\n", (bits / char_length) * char_leng...
false
true
false
false
false
1
gimmix_disconnect (MpdObj *mo) { if (mo != NULL || mpd_check_connected(mo)) { mpd_free (mo); } return; }
false
false
false
false
false
0
copyKillDeadInfo(const MachineInstr *MI) { for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) { const MachineOperand &MO = MI->getOperand(i); if (!MO.isReg() || (!MO.isKill() && !MO.isDead())) continue; for (unsigned j = 0, ee = getNumOperands(); j != ee; ++j) { MachineOperand &MOp = ...
false
false
false
false
false
0
descriptionEntry() { QLineEdit * lineEdit = qobject_cast<QLineEdit *>(sender()); if (lineEdit != NULL && lineEdit->isModified()) { changeConnector(); lineEdit->setModified(false); } }
false
false
false
false
false
0
output(void *data, Query *query) { TableDownComm *table = _is_downtime ? g_table_downtimes : g_table_comments; query->outputBeginList(); data = shiftPointer(data); // points to host or service if (data) { bool first = true; bool found_match = false; for (map<pair<unsigned lo...
false
false
false
false
false
0
is_atom( list_t *list ) { return list && list->val && list->val != NIL && list->val != LIST; }
false
false
false
false
false
0
pdecode(void){ unsigned char encoded; unsigned char pair[3]; pair[2] = '\0'; while ((encoded = getchar()) != '\0'){ if ((encoded == '\n')){ break; } if(encoded >= 255){ printf("NN"); } else { decode2chars(encoded, pair); putchar(pair[0]); putc...
true
true
false
false
true
1
add_varying(int slot, const glsl_type *type, const char *name, const char *name_as_gs_input) { switch (state->stage) { case MESA_SHADER_GEOMETRY: this->per_vertex_in.add_field(slot, type, name); /* FALLTHROUGH */ case M...
false
false
false
false
false
0
srpt_alloc_ioctx_ring(struct srpt_device *sdev, int ring_size, int ioctx_size, int dma_size, enum dma_data_direction dir) { struct srpt_ioctx **ring; int i; WARN_ON(ioctx_size != sizeof(struct srpt_recv_ioctx) && ioctx_size != sizeof(struct srpt_send_ioctx)); ring = kmalloc(ring_size * sizeof(ring[0]), ...
false
false
false
false
false
0
mdjvu_match_patterns(mdjvu_pattern_t ptr1, mdjvu_pattern_t ptr2, int32 dpi, mdjvu_matcher_options_t options) { Options *opt; int result; if (options) opt = (Options *) options; else opt = (Options *) mdjvu_matcher_options_create(); result = compare_patterns(ptr1,...
false
false
false
false
false
0
put_clause_to_ibuf(Ibuffer ibuf, Topform c) { /* id is_formula weight number-of-justs justs lits/atts [atomflags] */ ibuf_write(ibuf, c->id); ibuf_write(ibuf, c->is_formula); ibuf_write(ibuf, c->weight); put_just_to_ibuf(ibuf, c->justification); /* literals and attributes */ { Term t = topform_to_te...
false
false
false
false
false
0
nemo_window_sync_zoom_widgets (NemoWindow *window) { NemoWindowSlot *slot; NemoView *view; GtkActionGroup *action_group; GtkAction *action; gboolean supports_zooming; gboolean can_zoom, can_zoom_in, can_zoom_out; NemoZoomLevel zoom_level; slot = nemo_window_get_active_slot (window); view = slot->content_view;...
false
false
false
false
false
0
apply(ast_expr *e) { if (e->get_nodetype() == AST_EXPR_BUILTIN) { ast_expr_builtin * be = (ast_expr_builtin*) e; gm_builtin_def* def = be->get_builtin_def(); switch (def->get_method_id()) { case GM_BLTIN_TOP_DRAND: // rand function case...
false
false
false
false
false
0
InvalidateKill(unsigned Reg, const TargetRegisterInfo* TRI, BitVector &RegKills, std::vector<MachineOperand*> &KillOps) { if (RegKills[Reg]) { KillOps[Reg]->setIsKill(false); // KillOps[Reg] might be a def of a super-register. ...
false
false
false
false
false
0
LineToPC(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) { JSScript *script; int32 i; uintN lineno; jsbytecode *pc; if (argc == 0) { JS_ReportErrorNumber(cx, my_GetErrorMessage, NULL, JSSMSG_LINE2PC_USAGE); return JS_FALSE; } script = JS_GetScriptedCaller...
false
false
false
false
false
0
SaveSettings(wxCommandEvent & WXUNUSED(event)) { int i(ChooseSettings(_("Save current settings as:"))); if (i >= 0) { EffectReverb::Params savedParams(mParams); TransferDataFromWindow(); mEffect.SaveSettings(i, &mParams); mParams = savedParams; SetTitle(mEffect.SettingsName(i...
false
false
false
false
false
0
obj_check_acl_access(acl_chk_list_hdr_t *acl_access, struct mem_obj *obj, struct request *rq) { acl_chk_list_hdr_t *curr = acl_access; while(curr) { if ( obj_check_acl_list((acl_chk_list_t*)curr, obj, rq) == TRUE ) { return(TRUE); } curr = curr->next_list; } return(FALSE); }
false
false
false
false
false
0
add_user_to_host(Host* host,const gchar *username, const gchar* password, const gchar *dir) { gint i; if(host->nusers == 0) { host->nusers = 1; host->users = g_malloc(sizeof(User)); host->users[0].username = g_strdup(username); if(password) host->users[0].password = g_strdup(password); else host->u...
false
false
false
false
false
0
e_gadcon_client_menu_set(E_Gadcon_Client *gcc, E_Menu *m) { E_Menu *ret; E_OBJECT_CHECK_RETURN(gcc, NULL); E_OBJECT_TYPE_CHECK_RETURN(gcc, E_GADCON_CLIENT_TYPE, NULL); ret = gcc->menu; if (ret) e_menu_post_deactivate_callback_set(ret, NULL, NULL); gcc->menu = m; if (gcc->gadcon->shelf) gcc->...
false
false
false
false
false
0
ipmi_oem_setup(struct ipmi_intf * intf, char * oemtype) { struct ipmi_oem_handle * oem; int rc = 0; if (oemtype == NULL || strncmp(oemtype, "help", 4) == 0 || strncmp(oemtype, "list", 4) == 0) { ipmi_oem_print(); return -1; } for (oem=ipmi_oem_list; oem->name != NULL; oem++) { if (strncmp(oemtype, oe...
false
false
false
false
false
0
setopt(B *b, unsigned char *parsed_name) { OPTIONS *o; int x; unsigned char *pieces[26]; for (x = 0; x!=26; ++x) pieces[x] = NULL; for (o = options; o; o = o->next) if (rmatch(o->name_regex, parsed_name)) { if(o->contents_regex) { P *p = pdup(b->bof); if (pmatch(pieces,o->contents_regex,strlen((cha...
true
true
false
false
false
1
xlp_spi_sysctl_setup(struct xlp_spi_priv *xspi) { int cs; for (cs = 0; cs < XLP_SPI_MAX_CS; cs++) xlp_spi_sysctl_write(xspi, XLP_SPI_SYSCTRL, XLP_SPI_SYS_RESET << cs); xlp_spi_sysctl_write(xspi, XLP_SPI_SYSCTRL, XLP_SPI_SYS_PMEN); }
false
false
false
false
false
0
goa_smtp_auth_plain_finalize (GObject *object) { GoaSmtpAuthPlain *auth = GOA_SMTP_AUTH_PLAIN (object); g_clear_object (&auth->provider); g_clear_object (&auth->object); g_free (auth->domain); g_free (auth->username); g_free (auth->password); G_OBJECT_CLASS (goa_smtp_auth_plain_parent_class)->finalize (...
false
false
false
false
false
0
updateInternalTopIndexes(int start, int offset) { updateInternalIndexes(QModelIndex(), start, offset); QHash<QPersistentModelIndex, int> updates; { SourceIndexProxyRowMapping::right_iterator it = m_mappedFirstChildren.rightLowerBound(start); const SourceIndexProxyRowMapping::right_iterator ...
false
false
false
false
false
0
get_owner_list( int (*cb_func)(const char *, void *), const char *c, const char *mailbox_owner, void *arg) { char *a; int rc; const char *p, *q; a=malloc(sizeof("user=")+strlen(c)); if (!a) return -1; strcat(strcpy(a, "user="), c); rc=(*cb_func)(a, arg); if (rc == 0 && strcmp(a, mailbox_owner)...
false
true
false
false
true
1
race_find_head_statement_containing_statement_helper( statement* curr, /*!< Pointer to current statement to check */ statement* to_find /*!< Pointer to statement to find */ ) { PROFILE(RACE_FIND_HEAD_STATEMENT_CONTAINING_STATEMENT_HELPER); bool retval = FALSE; /* Return value for this function */ if( (cu...
false
false
false
false
false
0
formatDoubleSmallAware(double x, char *buf, int bufSize, int prec, GBool trim, char **p, int *len) { double absX = fabs(x); if (absX >= 0.1) { formatDouble(x, buf, bufSize, prec, trim, p, len); } else { while (absX < 0.1 && prec < MAXIMUM_DOUBLE_PREC) { absX = absX * 10; prec++; ...
false
false
false
false
false
0
table_get_strs(HTable table, char *field, char *dflt, int *err) { SField *f; char *s; int e; if (! table) { if (err) *err = 1; return dflt; } if (table->stat_buf) { free(table->stat_buf); table->stat_buf = NULL; } f = find_field(table, field...
false
false
false
false
false
0
finalize_header (msgdomain_list_ty *mdlp) { /* If the generated PO file has plural forms, add a Plural-Forms template to the constructed header. */ { bool has_plural; size_t i, j; has_plural = false; for (i = 0; i < mdlp->nitems; i++) { message_list_ty *mlp = mdlp->item[i]->mess...
false
true
false
false
false
1
rtx_cost (rtx x, enum rtx_code outer_code ATTRIBUTE_UNUSED) { int i, j; enum rtx_code code; const char *fmt; int total; if (x == 0) return 0; /* Compute the default costs of certain things. Note that targetm.rtx_costs can override the defaults. */ code = GET_CODE (x); switch (code) { ...
false
false
false
false
false
0
git_repository_is_empty(git_repository *repo) { git_reference *head, *branch; int error; error = git_reference_lookup(&head, repo, "HEAD"); if (error < GIT_SUCCESS) return error; if (git_reference_type(head) != GIT_REF_SYMBOLIC) return GIT_EOBJCORRUPTED; return git_reference_resolve(&branch, head) == GIT_S...
false
false
false
false
false
0
setpos(unsigned addr) { if (addr >= size) throw MemEx("Address is out of bounds", pos); pos = addr; }
false
false
false
false
false
0
nouveau_vga_fini(struct nouveau_drm *drm) { struct drm_device *dev = drm->dev; bool runtime = false; if (nouveau_runtime_pm == 1) runtime = true; if ((nouveau_runtime_pm == -1) && (nouveau_is_optimus() || nouveau_is_v1_dsm())) runtime = true; vga_switcheroo_unregister_client(dev->pdev); if (runtime && nouve...
false
false
false
false
false
0
grl_filesystem_source_search (GrlSource *source, GrlSourceSearchSpec *ss) { RecursiveOperation *operation; GrlFilesystemSource *fs_source; GRL_DEBUG (__FUNCTION__); fs_source = GRL_FILESYSTEM_SOURCE (source); operation = recursive_operation_new (); operation->on_...
false
false
false
false
false
0
write_random_seed(void *data, int len) { int fd; char *fname; fname = make_filename(INDEX_RANDSEED, NULL); /* * Don't truncate the random seed file if it already exists; if * something goes wrong half way through writing it, it would * be better to leave the old data there than to leave ...
false
false
false
false
true
1
ml_crypt_prepare(mfp, offset, reading) memfile_T *mfp; off_t offset; int reading; { buf_T *buf = mfp->mf_buffer; char_u salt[50]; int method; char_u *key; char_u *seed; if (reading && mfp->mf_old_key != NULL) { /* Reading back blocks with the previous key/method/seed. */ met...
false
false
false
false
false
0
nfs_readdir_add_to_array(struct nfs_entry *entry, struct page *page) { struct nfs_cache_array *array = nfs_readdir_get_array(page); struct nfs_cache_array_entry *cache_entry; int ret; if (IS_ERR(array)) return PTR_ERR(array); cache_entry = &array->array[array->size]; /* Check that this entry lies within the ...
false
false
false
false
false
0
DeleteFixup(rbtree_t *tree, rbnode_t *X, rbnode_t *Parent) { /************************************* * maintain red-black tree balance * * after deleting node X * *************************************/ while (X != tree->Root && X->Color == Black) { if (X == Parent->Left) { rbnode_t *W = Paren...
false
false
false
false
false
0
TestByteBlockInit(CuTest* tc) { struct ByteBlock* blockp = byteblock_new(); for (int y=0;y<size;y++) { for (int x=0;x<size;x++) { CuAssertIntEquals(tc, 0, blockp->data[y][x]); } } byteblock_del(blockp); }
false
false
false
false
false
0
relation_open(Oid relationId, LOCKMODE lockmode) { Relation r; Assert(lockmode >= NoLock && lockmode < MAX_LOCKMODES); /* Get the lock before trying to open the relcache entry */ if (lockmode != NoLock) LockRelationOid(relationId, lockmode); /* The relcache does all the real work... */ r = RelationIdGetRelat...
false
false
false
true
false
1
ocores_i2c_resume(struct device *dev) { struct ocores_i2c *i2c = dev_get_drvdata(dev); if (!IS_ERR(i2c->clk)) { unsigned long rate; int ret = clk_prepare_enable(i2c->clk); if (ret) { dev_err(dev, "clk_prepare_enable failed: %d\n", ret); return ret; } rate = clk_get_rate(i2c->clk) / 1000; if (r...
false
false
false
false
false
0
close_connection(struct connection *cn) { if (cn->connection_state == HC_FREE) abort(); if (cn->nread || cn->nwritten || cn->logged == 0) { ++stats.nrequests; log_request(cn->r); } --stats.nconnections; if (debug) log_d("close_connection: %d", cn->fd); close(cn->fd); if (cn->rfd != -1) { close(cn->rfd)...
false
false
false
false
false
0
k5_ad_externalize(krb5_context kcontext, krb5_authdata_context context, krb5_flags flags, krb5_octet **buffer, size_t *lenremain) { int i; krb5_error_code code; krb5_int32 ad_count = 0; krb5_octet *bp; size_t remain; bp = *...
false
false
false
false
false
0
compute_padding_count(int count, int k_radix, int n_exchanges){ bool fpadding = false; size_t dsize; int i, pad_count=0, kpow; /* is padding required */ dsize = count; kpow = 1; for ( i=0; i < n_exchanges; i++) { if (dsize % k_radix) { fpadding = true; } ...
false
false
false
false
false
0
gnomesharp_canvas_item_base_draw (GnomeCanvasItem *item, GdkDrawable *drawable, int x, int y, int width, int height) { GnomeCanvasItemClass *parent = g_type_class_peek_parent (G_OBJECT_GET_CLASS (item)); if (parent->draw) (*parent->draw) (item, drawable, x, y, width, height); }
false
false
false
false
false
0
poly128_iteration(const uint128 *key, const uint128 *m, uint128 *y) { const uint64_t maxwordrange_msw = 0xffffffff00000000u; mul_mod_p128(key, y, y); if(m->v[0] >= maxwordrange_msw) { sum_mod_p128(&marker_p128, y, y); mul_mod_p128(key, y, y); /* Calculate dif = (m - offset) */ uint12...
false
false
false
false
false
0
cbf_free_node (cbf_node *node) { unsigned int count; void *memblock; void *vchild; /* Check the arguments */ if (!node) return CBF_ARGUMENT; /* Check for a category */ if (node->type == CBF_CATEGORY) { unsigned int column; for (column = 0; column < node->chi...
false
false
false
false
false
0
sbp_count_se_tpg_luns(struct se_portal_group *tpg) { struct se_lun *lun; int count = 0; rcu_read_lock(); hlist_for_each_entry_rcu(lun, &tpg->tpg_lun_hlist, link) count++; rcu_read_unlock(); return count; }
false
false
false
false
false
0
cpulist_create(char *str, size_t len, cpu_set_t *set, size_t setsize) { size_t i; char *ptr = str; int entry_made = 0; size_t max = cpuset_nbits(setsize); for (i = 0; i < max; i++) { if (CPU_ISSET_S(i, setsize, set)) { int rlen; size_t j, run = 0; entry_made = 1; for (j = i + 1; j < max; j++) { ...
false
false
false
false
false
0
generic_factory(const std::string & name, int no) { Operation::Generic obj; obj->setType(name, no); return obj; }
false
false
false
false
false
0
cb_parse_request(ev_loop_t *loop, int fd, EV_TYPE events) { //printf("in read\n"); char tmp[1024]; while(read(fd, tmp, 1024) > 0); int ret; ret = ev_io_stop(loop, fd, EV_READ); ret = ev_io_register(loop, fd, EV_WRITE, cb_do_response, NULL); if (ret == -1) { close(fd); } retur...
false
false
false
false
false
0
max_mon_load(mtmp) register struct monst *mtmp; { register long maxload; /* Base monster carrying capacity is equal to human maximum * carrying capacity, or half human maximum if not strong. * (for a polymorphed player, the value used would be the * non-polymorphed carrying capacity instead of max/half max). ...
false
false
false
false
false
0
setVer(PlasmaVer pv, bool force) { if (fPlasmaVer == PlasmaVer::pvUnknown || force) fPlasmaVer = pv; }
false
false
false
false
false
0
count_lines(int startPos, int endPos, bool startPosIsLineStart) { int retLines, retPos, retLineStart, retLineEnd; #ifdef DEBUG printf("Fl_Text_Display::count_lines(startPos=%d, endPos=%d, startPosIsLineStart=%d\n", startPos, endPos, startPosIsLineStart); #endif // DEBUG /* If we're not wra...
false
false
false
false
false
0