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
add_standard_iv_candidates (struct ivopts_data *data) { add_standard_iv_candidates_for_size (data, INT_TYPE_SIZE); /* The same for a double-integer type if it is still fast enough. */ if (BITS_PER_WORD >= INT_TYPE_SIZE * 2) add_standard_iv_candidates_for_size (data, INT_TYPE_SIZE * 2); }
false
false
false
false
false
0
OnMouseMove() { if (this->CurrentMode != VTKISRBP_SELECT) { //if not in rubber band mode, let the parent class handle it this->Superclass::OnMouseMove(); return; } if (!this->Interactor || !this->Moving) { return; } this->EndPosition[0] = this->Interactor->GetEventPosition()[0];...
false
false
false
false
false
0
protect() const { return key_->name == "overbrace" || key_->name == "underbrace" || key_->name == "overleftarrow" || key_->name == "overrightarrow" || key_->name == "overleftrightarrow" || key_->name == "underleftarrow" || key_->name == "underrightarrow" || key_->name == "underleftrightarrow"; ...
false
false
false
false
false
0
comparable_array_range_semnode(Array_range_semnode *rng1, Array_range_semnode *rng2) { return (equal_array_range_semnode(rng1, rng2) || ((!have_unknown_array_range_semnode_one_dim(rng1) && !have_unknown_array_range_semnode_one_dim(rng2)) &&...
false
false
false
false
false
0
atoi2(const char *n) { uint32_t retval=0; int i,m; if (n==NULL) return(0); m=strcspn(n,"."); for (i=0;i<m;i++) retval+=(n[i]-48)*pow(10,m-i-1); return(retval); }
false
false
false
false
false
0
ves_icall_System_Threading_ThreadPool_GetMaxThreadsNative (gint32 *worker_threads, gint32 *completion_port_threads) { if (!worker_threads || !completion_port_threads) return; mono_lazy_initialize (&status, initialize); *worker_threads = threadpool->limit_worker_max; *completion_port_threads = threadpool->limit_...
false
false
false
false
false
0
wm831x_buckv_get_voltage_sel(struct regulator_dev *rdev) { struct wm831x_dcdc *dcdc = rdev_get_drvdata(rdev); if (dcdc->dvs_gpio && dcdc->dvs_gpio_state) return dcdc->dvs_vsel; else return dcdc->on_vsel; }
false
false
false
false
false
0
setFromString(char const *strval) { vector<string> val; StringUtil::stringtok(val, strval); //clear old values m_value.clear(); std::string v; for (size_t i = 0; i < val.size(); i++) { v = FbTk::StringUtil::toLower(val[i]); if (v == "maximize") m_value.push_back(WinB...
false
false
false
false
false
0
ndarray_item(NDArrayObject *self, Py_ssize_t index) { ndbuf_t *ndbuf = self->head; Py_buffer *base = &ndbuf->base; char *ptr; if (base->ndim == 0) { PyErr_SetString(PyExc_TypeError, "invalid indexing of scalar"); return NULL; } ptr = ptr_from_index(base, index); if (ptr == ...
false
false
false
false
false
0
get_value() const { bool success = false; sharedptr<const LayoutItem_Field> layout_item = sharedptr<const LayoutItem_Field>::cast_dynamic(get_layout_item()); return Conversions::parse_value(m_glom_type, get_text(), layout_item->get_formatting_used().m_numeric_format, success); }
false
false
false
false
false
0
getMouseContext(UT_sint32 xPos, UT_sint32 yPos) { xxx_UT_DEBUGMSG(("layout view mouse pos x %d pos y %d \n",xPos,yPos)); EV_EditMouseContext emc = _getMouseContext(xPos,yPos); if (isAnnotationPreviewActive() && (emc != EV_EMC_HYPERLINK)) { // kill the annotation preview popup UT_DEBUGMSG(("getMouseContext: Del...
false
false
false
false
false
0
ima_calc_file_hash_tfm(struct file *file, struct ima_digest_data *hash, struct crypto_shash *tfm) { loff_t i_size, offset = 0; char *rbuf; int rc, read = 0; SHASH_DESC_ON_STACK(shash, tfm); shash->tfm = tfm; shash->flags = 0; hash->length = crypto_shash_digestsize(tfm); rc = crypto_shash_init(sha...
false
true
false
false
true
1
setgroups (size_t n, const gid_t *groups) { return INLINE_SETXID_SYSCALL (setgroups32, 2, n, groups); }
false
false
false
false
false
0
GetComponentSize(IOComponentType componentType) const { switch ( componentType ) { case UCHAR: return sizeof( unsigned char ); case CHAR: return sizeof( char ); case USHORT: return sizeof( unsigned short ); case SHORT: return sizeof( short ); case UINT: return siz...
false
false
false
false
false
0
getColor(Guchar *x, GfxColor *color) { int maxPixel, i; maxPixel = (1 << bits) - 1; for (i = 0; i < nComps; ++i) { color->c[i] = dblToCol(decodeLow[i] + (x[i] * decodeRange[i]) / maxPixel); } }
false
false
false
false
false
0
gst_tag_xmp_writer_remove_schema (GstTagXmpWriter * config, const gchar * schema) { GstTagXmpWriterData *data; GSList *iter = NULL; g_return_if_fail (GST_IS_TAG_XMP_WRITER (config)); data = gst_tag_xmp_writer_get_data (config); GST_TAG_XMP_WRITER_DATA_LOCK (data); for (iter = data->schemas; iter; ite...
false
false
false
false
false
0
skip_to_arg (va_list *va, ArgType *types, EelPrintfHandler *custom_handlers, int n) { int i; for (i = 0; i < n; i++) { skip_argv (va, types[i], custom_handlers); } }
false
false
false
false
false
0
siena_probe_nic(struct efx_nic *efx) { struct siena_nic_data *nic_data; efx_oword_t reg; int rc; /* Allocate storage for hardware specific data */ nic_data = kzalloc(sizeof(struct siena_nic_data), GFP_KERNEL); if (!nic_data) return -ENOMEM; nic_data->efx = efx; efx->nic_data = nic_data; if (efx_farch_fpga_...
false
false
false
false
false
0
invalidate_base_positions() { if (root_loop) { SEC_base_part *start_part = root_loop->get_fixpoint_strand(); SEC_base_part *part = start_part; do { part->get_region()->invalidate_base_count(); part = part->next(); } while (part != start_part); ...
false
false
false
false
false
0
findFirstEqualType(DumpableObjectType type, DumpableObject **objs, int numObjs) { int i; for (i = 0; i < numObjs; i++) if (objs[i]->objType == type) return i; return -1; }
false
false
false
false
false
0
cb_buffer_destroy (buffer_t *buffer) { int i = 0; if (buffer) { if (buffer->cb) { for (i = 0; i < buffer->used_len ; i++) { GF_FREE (buffer->cb[i]); } GF_FREE (buffer->cb); ...
false
false
false
false
false
0
unity_internal_default_scope_dbus_impl_get_channel_by_id (UnityInternalDefaultScopeDBusImpl* self, const gchar* channel_id, GError** error) { UnityInternalScopeChannel* result = NULL; UnityInternalScopeChannel* channel = NULL; GHashTable* _tmp0_ = NULL; const gchar* _tmp1_ = NULL; gconstpointer _tmp2_ = NULL; Uni...
false
false
false
false
false
0
_create_internal_glue_resources(void *data) { Render_Engine *re = (Render_Engine *)data; Render_Engine_GL_Resource *rsc; rsc = calloc(1, sizeof(Render_Engine_GL_Resource)); if (!rsc) return NULL; #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) // EGL int context_attrs[3]; contex...
false
false
false
false
false
0
capitalize (const string& str) { string ret = str; if (!str.empty()) { /* XXX not unicode safe */ ret[0] = toupper (str[0]); } return ret; }
false
false
false
false
false
0
expando_find(const char *key) { if (key[1] != '\0') return g_hash_table_lookup(expandos, key); else return CHAR_EXPANDO(*key); }
false
false
false
false
false
0
is_empty(dns_db_t *db, dns_dbversion_t *ver, dns_dbnode_t *node) { dns_rdatasetiter_t *rdsiter = NULL; isc_result_t result; result = dns_db_allrdatasets(db, node, ver, 0, &rdsiter); check_result(result, "dns_db_allrdatasets()"); result = dns_rdatasetiter_first(rdsiter); dns_rdatasetiter_destroy(&rdsiter); if (r...
false
false
false
false
false
0
handlerClass(std::ostream& ostr, const std::string& base, const std::string& ctorArg) { std::string exprt(_page.get("page.export", "")); if (!exprt.empty()) exprt += ' '; ostr << "class " << exprt << _class << ": public " << base << "\n"; ostr << "{\n"; ostr << "public:\n"; if (!ctorArg.empty()) { ostr << "\t...
false
false
false
false
false
0
_sbast_cache_add(sbcast_cred_t *sbcast_cred) { int i; uint32_t sig_num = 0; struct sbcast_cache *new_cache_rec; /* Using two bytes at a time gives us a larger number * and reduces the possibility of a duplicate value */ for (i = 0; i < sbcast_cred->siglen; i += 2) { sig_num += (sbcast_cred->signature[i] << 8)...
false
false
false
false
false
0
exec_assign_expr(PLpgSQL_execstate *estate, PLpgSQL_datum *target, PLpgSQL_expr *expr) { Datum value; bool isnull; Oid valtype; int32 valtypmod; /* * If first time through, create a plan for this expression, and then see * if we can pass the target variable as a read-write parameter to the * expre...
false
false
false
false
false
0
serverLogin(std::string url, std::string pwd, myServerLoginCallback *loginPrompt) { myServer::Callback login_callback; if (loginPrompt) { loginPrompt->myCallback= &login_callback; } mail::account::openInfo loginInfo; loginInfo.url=url; loginInfo.pwd=pwd; myServer::find_cert_by_url(url, loginInfo...
false
false
false
false
false
0
update_technology_property(DBusMessageIter *arg, void *user_data) { struct connman_technology *technology = user_data; const char *name, *value; if (cui_dbus_get_basic(arg, DBUS_TYPE_STRING, &name) != 0) return FALSE; dbus_message_iter_next(arg); if (g_strcmp0(name, "Name") == 0) { cui_dbus_get_basic_varian...
false
false
false
false
false
0
gda_sql_builder_set_where (GdaSqlBuilder *builder, GdaSqlBuilderId cond_id) { g_return_if_fail (GDA_IS_SQL_BUILDER (builder)); g_return_if_fail (builder->priv->main_stmt); SqlPart *p = NULL; if (cond_id > 0) { p = get_part (builder, cond_id, GDA_SQL_ANY_EXPR); if (!p) return; } switch (builder->priv->mai...
false
false
false
false
false
0
printLdStCode(const MCInst *MI, int OpNum, raw_ostream &O, const char *Modifier) { if (Modifier) { const MCOperand &MO = MI->getOperand(OpNum); int Imm = (int) MO.getImm(); if (!strcmp(Modifier, "volatile")) { if (Imm) O << ".volatile"; } else if (!st...
false
false
false
false
false
0
writeSceneBlendFactor(const SceneBlendFactor sbf) { switch (sbf) { case SBF_DEST_ALPHA: writeValue("dest_alpha"); break; case SBF_DEST_COLOUR: writeValue("dest_colour"); break; case SBF_ONE: writeValue("one"); ...
false
false
false
false
false
0
gf_odf_write_isom_iod(GF_BitStream *bs, GF_IsomInitialObjectDescriptor *iod) { GF_Err e; u32 size; if (! iod) return GF_BAD_PARAM; e = gf_odf_size_descriptor((GF_Descriptor *)iod, &size); if (e) return e; e = gf_odf_write_base_descriptor(bs, iod->tag, size); if (e) return e; gf_bs_write_int(bs, iod->objectDe...
false
false
false
false
false
0
_cb_contents(void *data, void *data2 __UNUSED__) { E_Config_Dialog_Data *cfdata; E_Shelf *es; if (!(cfdata = data)) return; es = e_widget_ilist_selected_data_get(cfdata->o_list); if (!es) return; if (!es->gadcon->config_dialog) { e_int_gadcon_config_shelf(es->gadcon); e_object_de...
false
false
false
false
false
0
glyph_names(Vector<PermString> &gnames) const { int n = nglyphs(); gnames.resize(n); for (int i = 0; i < n; i++) gnames[i] = glyph_name(i); }
false
false
false
false
false
0
is_dir(const char *path) { struct stat st; if (stat(path, &st) >= 0) return S_ISDIR(st.st_mode); return -errno; }
false
false
false
false
false
0
cx25840_audio_s_ctrl(struct v4l2_ctrl *ctrl) { struct v4l2_subdev *sd = to_sd(ctrl); struct cx25840_state *state = to_state(sd); struct i2c_client *client = v4l2_get_subdevdata(sd); switch (ctrl->id) { case V4L2_CID_AUDIO_VOLUME: if (state->mute->val) set_volume(client, 0); else set_volume(client, state...
false
false
false
false
false
0
resetRW (graph_t * g) { node_t* n; for (n = agfstnode(g); n; n = agnxtnode(g,n)) { if (ND_other(n).list) { double tmp = ND_rw(n); ND_rw(n) = ND_mval(n); ND_mval(n) = tmp; } } }
false
false
false
false
false
0
readUWGCG(struct ReadSeqVars *V) { char *si; char *sptr; int done; V->seqlen = 0; /*writeseq: " %s Length: %d (today) Check: %d ..\n" */ /*drop above or ".." from id*/ if ((si = strstr(V->buf," Length: ")) != NULL) *si = 0; else if ((si = strstr(V->buf,"..")) != NULL) *si = 0; if ((...
false
false
false
false
false
0
ipa_note_param_call (struct cgraph_node *node, int param_index, gimple stmt, bool polymorphic) { struct cgraph_edge *cs; cs = cgraph_edge (node, stmt); cs->indirect_info->param_index = param_index; cs->indirect_info->anc_offset = 0; cs->indirect_info->polymorphic = polymorphic; if (polymorphic) ...
false
false
false
false
false
0
dash_m2ts_event_check_pat(GF_M2TS_Demuxer *ts, u32 evt_type, void *par) { GF_TSSegmenter *ts_seg = (GF_TSSegmenter*)ts->user; GF_M2TS_PES_PCK *pck; switch (evt_type) { case GF_M2TS_EVT_PAT_REPEAT: ts_seg->has_seen_pat = 1; break; case GF_M2TS_EVT_PMT_FOUND: { u32 i, count; GF_M2TS_Program *pro...
false
false
false
false
false
0
s_mp_grow(mp_int *mp, mp_size min) { if(min > ALLOC(mp)) { mp_digit *tmp; /* Set min to next nearest default precision block size */ min = MP_ROUNDUP(min, s_mp_defprec); if((tmp = s_mp_alloc(min, sizeof(mp_digit))) == NULL) return MP_MEM; s_mp_copy(DIGITS(mp), tmp, USED(mp)); #if MP_CR...
false
false
false
false
false
0
nm_device_mobile_refresh_ui (NetDeviceMobile *device_mobile) { const char *str; gboolean is_connected; GString *status; GtkListStore *liststore; GtkWidget *widget; guint speed = 0; NetDeviceMobilePrivate *priv = device_mobile->priv; NMClient *client; ...
false
false
false
false
false
0
uninit_environment (gpointer data) { guint i; if (published_environ) { for (i = 0; i < published_environ->len; ++i) g_free (g_array_index (published_environ, gchar*, i)); g_array_free (published_environ, TRUE); } published_environ = NULL; if (watch_destroy_notify && watch_user_data) (watch_destroy_noti...
false
false
false
false
false
0
cljc_print_page(gx_device_printer * pdev, FILE * prn_stream) { gs_memory_t *mem = pdev->memory; uint raster = gx_device_raster((gx_device *)pdev, false); int i; int worst_case_comp_size = raster + (raster / 8) + 1; byte *data = 0; byte *cdata = 0; byte *prow = 0; int code = 0; /* al...
false
false
false
false
false
0
compact_series (const DATASET *dset, int i, int oldn, int startskip, int min_startskip, int compfac, CompactMethod method) { const double *src = dset->Z[i]; double *x; int lead = startskip - min_startskip; int to_weekly = (compfac >= 5 && compfac <= 7); int t, idx; #if DB_DEBUG ...
false
false
false
false
false
0
flookup(id) char *id; { register struct fentry *ptr; ptr = fhash[FHasher(id)]; while (ptr != NULL && ptr->name != id) { ptr = ptr->blink; } return ptr; }
false
false
false
false
false
0
asn1PE_H245OpenLogicalChannelAck_reverseLogicalChannelParameters (OOCTXT* pctxt, H245OpenLogicalChannelAck_reverseLogicalChannelParameters* pvalue) { int stat = ASN_OK; ASN1BOOL extbit; ASN1OpenType openType; OOCTXT lctxt; /* extension bit */ extbit = (ASN1BOOL)(pvalue->m.replacementForPresent); ...
false
false
false
false
false
0
prism2_ioctl_giwaplist(struct net_device *dev, struct iw_request_info *info, struct iw_point *data, char *extra) { struct hostap_interface *iface; local_info_t *local; struct sockaddr *addr; struct iw_quality *qual; iface = netdev_priv(dev); local = iface->local; if (local->iw_mode != IW_MODE_MASTE...
false
true
false
false
false
1
sk_address_is_local(SockAddr addr) { if (addr->superfamily == UNRESOLVED) return 0; /* we don't know; assume not */ else if (addr->superfamily == UNIX) return 1; else { #ifndef NO_IPV6 return sockaddr_is_loopback(addr->ais->ai_addr); #else struct in_addr a; SockAddrStep step; STAR...
false
false
false
false
false
0
xml_markup_network(int tab, int action) { static int markup_state = CLOSE_XML_MARKUP; if (action == markup_state) return; markup_state = action; if (action == OPEN_XML_MARKUP) { /* Open markup */ xprintf(tab, "<network per=\"second\">"); } else { /* Close markup */ xprintf(tab, "</network>"); } }
false
false
false
false
false
0
addCompileUnit(DICompileUnit *CU) { if (!CU) return false; if (!NodesSeen.insert(CU).second) return false; CUs.push_back(CU); return true; }
false
false
false
false
false
0
irq_domain_alloc_irqs_parent(struct irq_domain *domain, unsigned int irq_base, unsigned int nr_irqs, void *arg) { /* irq_domain_alloc_irqs_recursive() has called parent's alloc() */ if (irq_domain_is_auto_recursive(domain)) return 0; domain = domain->parent; if (domain) return irq_domain_alloc_irqs_r...
false
false
false
false
false
0
webauth_krb5_get_principal(struct webauth_context *ctx, struct webauth_krb5 *kc, char **principal, enum webauth_krb5_canon canon) { if (kc->princ == NULL) { wai_error_set(ctx, WA_ERR_INVALID_CONTEXT, "Kerberos context not initialize...
false
false
false
false
false
0
merge_divs(__isl_take isl_aff *aff, int a, int b) { unsigned off = isl_local_space_offset(aff->ls, isl_dim_div); if (isl_int_is_zero(aff->v->el[1 + off + b])) return aff; aff->v = isl_vec_cow(aff->v); if (!aff->v) return isl_aff_free(aff); isl_int_add(aff->v->el[1 + off + a], aff->v->el[1 + off + a], ...
false
false
false
false
false
0
onGo() { QDomElement iq_ = createIQ ( doc(), "set", "", id() ); QDomElement query = doc()->createElement ( "query" ); query.setAttribute ( "xmlns",PRIVACY_NS ); iq_.appendChild ( query ); QDomElement e; if ( changeDefault_ ) { //kDebug() << "Changing default privacy list."; e = doc()->createElement ( "defaul...
false
false
false
false
false
0
ho_next(struct irs_ho *this) { struct pvt *pvt = (struct pvt *)this->private; struct hostent *ho = &pvt->host; char *body; size_t bodylen; int code; char text[256]; if (irs_irp_connection_setup(pvt->girpdata, &pvt->warned) != 0) { return (NULL); } if (irs_irp_send_command(pvt->girpdata, "gethostent") != 0)...
false
false
false
false
false
0
toggle_font_attr (WBCGtk *wbcg, GtkToggleAction *act, GnmStyleElement t, unsigned true_val, unsigned false_val) { WorkbookControl *wbc = WORKBOOK_CONTROL (wbcg); GnmStyle *new_style; unsigned val; /* If the user did not initiate this action ignore it. * This happens whenever the ui updates and the current ce...
false
false
false
false
false
0
gt_pbs_score_func(unsigned long edist, unsigned long offset, unsigned long alilen, unsigned long trnalen, unsigned long trna_offset) { double penalties; if (edist == 0 || offset == 0) penalties = 1.0; else penalties = (double) edist * (double...
false
false
false
false
false
0
imFileClear(imFile* ifile) { // can not reset compression and image_count ifile->is_new = 0; ifile->attrib_table = 0; ifile->line_buffer = 0; ifile->line_buffer_size = 0; ifile->line_buffer_extra = 0; ifile->line_buffer_alloc = 0; ifile->convert_bpp = 0; ifile->switch_type = 0; ifile->width = 0;...
false
false
false
false
false
0
copy(const Bezier * other) { if (other == NULL) { m_isEmpty = true; return; } m_cp0 = other->m_cp0; m_cp1 = other->m_cp1; m_endpoint0 = other->m_endpoint0; m_endpoint1 = other->m_endpoint1; m_isEmpty = other->m_isEmpty; m_drag_cp0 = other->m_drag_cp0; }
false
false
false
false
false
0
__ecereDestructor___ecereNameSpace__ecere__gui__dialogs__FileDialog(struct __ecereNameSpace__ecere__com__Instance * this) { struct __ecereNameSpace__ecere__gui__dialogs__FileDialog * __ecerePointer___ecereNameSpace__ecere__gui__dialogs__FileDialog = (struct __ecereNameSpace__ecere__gui__dialogs__FileDialog *)(this ? ((...
false
false
false
true
true
1
IReadBlock( int nBlockXOff, int nBlockYOff, void * pImage ) { PDFDataset *poGDS = (PDFDataset *) poDS; if (poGDS->aiTiles.size() ) { if ( IReadBlockFromTile(nBlockXOff, nBlockYOff, pImage) == CE_None ) { return C...
false
false
false
false
false
0
PutPngFile(char *png, double height_goal, double width_goal, double scale, double baseline) { FILE *fp; double xres,yres; char *s; uint32_t w_pixels, h_pixels, b; uint32_t w_twips, h_twips; uint16_t sx, sy; int bad_res; diagnostics(WARNING,"Encoding '%s'",png); GetPngSize(...
false
false
false
false
true
1
ddb_input_avail(struct ddb_input *input) { struct ddb *dev = input->port->dev; u32 idx, off, stat = input->stat; u32 ctrl = ddbreadl(DMA_BUFFER_CONTROL(input->nr)); idx = (stat >> 11) & 0x1f; off = (stat & 0x7ff) << 7; if (ctrl & 4) { printk(KERN_ERR "IA %d %d %08x\n", idx, off, ctrl); ddbwritel(input->stat...
false
false
false
false
false
0
exist_regs_in_elf_notes(struct task_context *tc) { if ((tc->task == tt->panic_task) || (is_task_active(tc->task) && (nd->num_prstatus_notes > 1) && (tc->processor < nd->num_prstatus_notes))) return TRUE; else return FALSE; }
false
false
false
false
false
0
MSG_WriteDeltaUsercmd (sizebuf_t *buf, usercmd_t *from, usercmd_t *cmd) { int bits; // // send the movement message // bits = 0; if (cmd->angles[0] != from->angles[0]) bits |= CM_ANGLE1; if (cmd->angles[1] != from->angles[1]) bits |= CM_ANGLE2; if (cmd->angles[2] != from->angles[2]) bits |= CM...
false
false
false
false
false
0
reporting_create_new_ar_record(lList **answer_list, const lListElem *ar, u_long32 report_time) { bool ret = true; rep_buf_t *buf = &reporting_buffer[REPORTING_BUFFER]; const char *owner = lGetString(ar, AR_owner); DENTER(TOP_LAYER, "reporting_...
false
false
false
false
false
0
CommandShowVariation(char *UNUSED(sz)) { if (ms.gs != GAME_NONE) outputf(_("You are playing: %s\n"), gettext(aszVariations[ms.bgv])); outputf(_("Default variation is: %s\n"), gettext(aszVariations[bgvDefault])); }
false
false
false
false
false
0
parse_authenticate_header(struct hdr_field *authenticate) { void **parsed; struct authenticate_body *auth_body; parsed = &(authenticate->parsed); while(*parsed == NULL) { auth_body = pkg_malloc(sizeof(struct authenticate_body)); if (auth_body == NULL) { LM_ERR("oom\n"); return -1; } ...
false
false
false
false
false
0
finalizeBundle(MachineBasicBlock &MBB, MachineBasicBlock::instr_iterator FirstMI) { MachineBasicBlock::instr_iterator E = MBB.instr_end(); MachineBasicBlock::instr_iterator LastMI = std::next(FirstMI); while (LastMI != E && LastMI->isInsideBundle()) ++LastMI; finalizeBundle(MBB, FirstMI...
false
false
false
false
false
0
pkg_archiveLibrary(const char *targetDir, const char *version, UBool reverseExt) { int32_t result = 0; char cmd[LARGE_BUFFER_MAX_SIZE]; /* If the shard object suffix and the final object suffix is different and the final object suffix and the * archive file suffix is the same, then the final library n...
false
false
false
false
false
0
validate(LaTeXFeatures & features) const { if (commandname() == "vref" || commandname() == "vpageref") features.require("varioref"); else if (commandname() == "prettyref") features.require("prettyref"); else if (commandname() == "eqref") features.require("amsmath"); }
false
false
false
false
false
0
session_dispose (GObject *object) { CamelSessionPrivate *priv; priv = CAMEL_SESSION_GET_PRIVATE (object); g_hash_table_remove_all (priv->services); if (priv->junk_filter != NULL) { g_object_unref (priv->junk_filter); priv->junk_filter = NULL; } /* Chain up to parent's dispose() method. */ G_OBJECT_CLASS ...
false
false
false
false
false
0
IMUL_AXEwR(bxInstruction_c *i) { Bit16s op1_16 = AX; Bit16s op2_16 = BX_READ_16BIT_REG(i->rm()); Bit32s product_32 = ((Bit32s) op1_16) * ((Bit32s) op2_16); Bit16u product_16l = (product_32 & 0xFFFF); Bit16u product_16h = product_32 >> 16; /* now write product back to destination */ AX = product_16l; ...
false
false
false
false
false
0
backsql_merge_from_tbls( backsql_srch_info *bsi, struct berval *from_tbls ) { if ( BER_BVISNULL( from_tbls ) ) { return LDAP_SUCCESS; } if ( !BER_BVISNULL( &bsi->bsi_from.bb_val ) ) { char *start, *end; struct berval tmp; ber_dupbv_x( &tmp, from_tbls, bsi->bsi_op->o_tmpmemctx ); for ( start = tmp.bv_va...
false
false
false
false
false
0
parse_selector(char const *arg) { if (nocase_strbegins(arg, "PSL2:") || nocase_strbegins(arg, "EPS2:") || nocase_strbegins(arg, "EPS:") || nocase_strbegins(arg, "PS2:") || nocase_strbegins(arg, "PS:") || nocase_strbegins(arg, "PSL1:") || nocase_strbegins(arg, "PSLC...
false
false
false
false
false
0
get_player_ranks(game_tp g, int ranking_array[]) { int i; for (i = 0; i < g->n_players; i++) { ranking_array[i] = i; get_best_player_hand(g, i); } _current_game = g; qsort(ranking_array, g->n_players, sizeof(int), playercmp); }
false
false
false
false
false
0
Set(vtkInformation* info) { if (info->GetRequest() != this) { if (info->GetRequest()) { vtkGenericWarningMacro("Setting request key when one is already set. Current request is " << info->GetRequest()->GetName() << " while setting " << this->GetName() << "\n"); } info->SetRequest(this); ...
false
false
false
false
false
0
ext4_inline_data_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo, int *has_inline, __u64 start, __u64 len) { __u64 physical = 0; __u64 inline_len; __u32 flags = FIEMAP_EXTENT_DATA_INLINE | FIEMAP_EXTENT_NOT_ALIGNED | FIEMAP_EXTENT_LAST; int error = 0; struct ext4_iloc iloc; down_re...
false
false
false
false
false
0
add_history_temporary(char *input) { if (!input || !*input) return; if (last_hist_is_temp) { history_rem(history_length); last_hist_is_temp = 0; } last_hist_offset = -1; add_history(input); last_hist_is_temp = 1; }
false
false
false
false
false
0
arguments (ACE_Array<ACE_CString> & args) const { ACE::IOS::CString_IStream sis (this->args_); int ch = sis.get (); while (ch != eof_) { // skip whitespace while (ACE_OS::ace_isspace (ch)) ch = sis.get (); if (ch != eof_) { ...
false
false
false
false
false
0
gtsquery_compress(PG_FUNCTION_ARGS) { GISTENTRY *entry = (GISTENTRY *) PG_GETARG_POINTER(0); GISTENTRY *retval = entry; if (entry->leafkey) { TSQuerySign *sign = (TSQuerySign *) palloc(sizeof(TSQuerySign)); retval = (GISTENTRY *) palloc(sizeof(GISTENTRY)); *sign = makeTSQuerySign(DatumGetTSQuery(entry->ke...
false
false
false
false
false
0
debug_msg(const char *format, ...) { if (debug_level > 1 && format) { va_list ap; va_start(ap, format); vfprintf(stderr, format, ap); fprintf(stderr,"\n"); va_end(ap); } return; }
false
false
false
false
true
1
i40e_set_rx_mode(struct net_device *netdev) #else static void i40e_set_rx_mode(struct net_device *netdev) #endif { struct i40e_netdev_priv *np = netdev_priv(netdev); struct i40e_mac_filter *f, *ftmp; struct i40e_vsi *vsi = np->vsi; struct netdev_hw_addr *uca; struct netdev_hw_addr *mca; struct netdev_hw_addr *ha;...
false
false
false
false
false
0
saveToTextFile( const std::string &filename, bool APPEND ) { MRPT_START CFileOutputStream f; if( !f.open(filename,APPEND) ) THROW_EXCEPTION( "[CFeatureList::saveToTextFile] ERROR: File could not be open for writing" ); f.printf( "%% Dump of mrpt::vision::CFeatureList. Each line format is:\n" "%% ID TYPE X ...
false
false
false
false
false
0
readMeshFile() { UserInterface* gui = theControlCenter->getGui(); Timer timer; strstream strm; ecif_modelDimension model_dim; timer.start(); gui->showMsg("Reading the mesh ..."); reset(strm); strm << "*** " << infileName << ends; gui->showMsg(strm.str(), 1); // No success or interrupted // ...
false
false
false
false
false
0
un_quote(char *cts) { int i = strlen(cts); if (*cts == '"') { *(cts+i-1) = 0; cts = cts + 1; } return cts; }
false
false
false
false
false
0
do_cmd_destroy(cmd_code code, cmd_arg args[]) { object_type *o_ptr; int item = args[0].item; if (!item_is_available(item, NULL, USE_INVEN | USE_EQUIP | USE_FLOOR)) { msg("You do not have that item to ignore it."); return; } o_ptr = object_from_item_idx(item); if ((item >= INVEN_WIELD) && cursed_p(o_ptr->f...
false
false
false
false
false
0
count_rows(struct window *window, position_t start, position_t end) { unsigned rows = 0, bytes, max_rows = window->rows + 1; for (rows = 0; start < end && rows < max_rows; rows++, start += bytes) if (!(bytes = find_row_bytes(window->view, start, 0, window->columns))) break; return rows; }
false
false
false
false
false
0
filterAcceptsRow(int row, const QModelIndex& p) const { QStringList strs; const QAbstractItemModel* m = this->sourceModel(); QModelIndex idx = m->index(row, 0, p); // if there are no children, get strings for column 0 and 1 if(!m->hasChildren(idx)) { strs.append(m->data(idx).toStrin...
false
false
false
false
false
0
pushback_token() { m_pushback_tokens.push_back(TokenAndPos(m_token, m_token_start, m_space_before)); m_token_has_pushback++; }
false
false
false
false
false
0
mn_logit_prediction (const gretl_matrix *Xt, const double *b, const gretl_matrix *yvals) { double *eXtb = NULL; double St, pj, pmax; int i, j, k, m, nx; int pidx = 0; nx = gretl_vector_get_length(Xt); m = gretl_vector_get_length(yvals); eXtb = malloc(m * sizeof *eXtb); if...
false
true
false
false
true
1
UpdateEscortAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) { return; } if (m_uiShootTimer < uiDiff) { m_uiShootTimer = 1000; if (!m_creature->CanReachWithMeleeAttack(m_creature->getV...
false
false
false
false
false
0
search_engine_start_real (NautilusSearchEngine *engine) { engine->details->providers_running = 0; engine->details->providers_finished = 0; engine->details->providers_error = 0; engine->details->restart = FALSE; DEBUG ("Search engine start real"); g_object_ref (engine); #ifdef ENABLE_TRACKER nautilus_search_p...
false
false
false
false
false
0
compare_pnp_id(struct pnp_id *pos, const char *id) { if (!pos || !id || (strlen(id) != 7)) return 0; if (memcmp(id, "ANYDEVS", 7) == 0) return 1; while (pos) { if (memcmp(pos->id, id, 3) == 0) if (compare_func(pos->id, id) == 1) return 1; pos = pos->next; } return 0; }
false
false
false
false
false
0
get_special_key_code(name) char_u *name; { char_u *table_name; char_u string[3]; int i, j; /* * If it's <t_xx> we get the code for xx from the termcap */ if (name[0] == 't' && name[1] == '_' && name[2] != NUL && name[3] != NUL) { string[0] = name[2]; string[1] = name[3]; ...
false
false
false
false
false
0
drbd_destroy_device(struct kref *kref) { struct drbd_device *device = container_of(kref, struct drbd_device, kref); struct drbd_resource *resource = device->resource; struct drbd_peer_device *peer_device, *tmp_peer_device; del_timer_sync(&device->request_timer); /* paranoia asserts */ D_ASSERT(device, device->o...
false
false
false
false
false
0