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
msdos_cmp(const struct dentry *parent, const struct dentry *dentry, unsigned int len, const char *str, const struct qstr *name) { struct fat_mount_options *options = &MSDOS_SB(parent->d_sb)->options; unsigned char a_msdos_name[MSDOS_NAME], b_msdos_name[MSDOS_NAME]; int error; error = msdos_format_name(name->name...
false
false
false
false
false
0
getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) { // Find the arguments from the closest context. if (propertyName == exec->propertyNames().arguments) { slot.setCustom(this, argumentsGetter); return true; } // Compute length of parameters. if ...
false
false
false
false
false
0
command_machinetags_getPredicates(flickcurl* fc, int argc, char *argv[]) { const char *nspace = NULL; int per_page = 10; int page = 0; flickcurl_tag_predicate_value** tag_pvs = NULL; if(argc >1) { nspace = argv[1]; if(argc >2) { per_page = parse_page_param(argv[2]); if(argc >3) { ...
false
false
false
false
false
0
lcrt_ssh_on_button_properties_clicked(GtkButton *button, gpointer user_data) { struct lcrt_qconnect *lqconnect = (struct lcrt_qconnect *)user_data; struct lcrt_ssh_if *lssh = (struct lcrt_ssh_if *)lqconnect->private_data; GtkTreeIter iter; GtkTreeModel *model; GtkTreeView *treeview = GTK_TREE_VIEW (...
false
false
false
false
false
0
calculate_dimm_size(struct i5000_pvt *pvt) { struct i5000_dimm_info *dinfo; int slot, channel, branch; char *p, *mem_buffer; int space, n; /* ================= Generate some debug output ================= */ space = PAGE_SIZE; mem_buffer = p = kmalloc(space, GFP_KERNEL); if (p == NULL) { i5000_printk(KERN_ER...
false
false
false
false
false
0
acct_gather_profile_fini(void) { int rc = SLURM_SUCCESS, i; if (!g_context) return SLURM_SUCCESS; slurm_mutex_lock(&g_context_lock); if (!g_context) goto done; init_run = false; for (i=0; i < PROFILE_CNT; i++) { switch (i) { case PROFILE_ENERGY: acct_gather_energy_fini(); break; case PROFILE_...
true
true
false
false
false
1
updateRange() { int min = trans->getMin( trans->getDstContainer(), false ); int max; if ( trans->getMax( trans->getDstContainer(), true ) * 3 < trans->getMax( trans->getDstContainer(), false )) max = trans->getMax( trans->getDstContainer(), true ); else ...
false
false
false
false
false
0
initialize_hash_table() { int i; hash_tab = reinterpret_cast<hash_element **> (calloc(NUM_HASH_ENTRIES,sizeof(hash_element *))); if ( hash_tab == NULL ) alloc_error(const_cast<char*>("hash_tab")); for ( i = 0; i < NUM_HASH_ENTRIES; i++ ) hash_tab[i] = NULL; }
false
false
false
false
false
0
anthy_print_candidate(struct cand_ent *ce) { int mod = (ce->score % 1000); int seg_score = 0; if (ce->mw) { seg_score = ce->mw->score; } anthy_putxstr(&ce->str); printf(":("); /*if (ce->nr_words == 1) {printf("%d,", ce->elm[0].id); }*/ if (ce->flag & CEF_OCHAIRE) { putchar('o'); } if (ce...
false
false
false
false
false
0
gst_webvtt_enc_chain (GstPad * pad, GstObject * parent, GstBuffer * buf) { GstWebvttEnc *webvttenc = GST_WEBVTT_ENC (parent); GstClockTime ts, dur = GST_SECOND; GstBuffer *new_buffer; GstMapInfo map_info; GstFlowReturn ret; GString *s; gsize buf_size; if (!webvttenc->pushed_header) { const char *he...
false
false
false
false
false
0
button_set_use_markup (GdHeaderButton *self, gboolean use_markup) { GdHeaderButtonPrivate *priv = GET_PRIVATE (self); if (priv->use_markup != use_markup) { priv->use_markup = use_markup; rebuild_child (self); g_object_notify (G_OBJECT (self), "use-markup"); ...
false
false
false
false
false
0
log_heap_freeze(Relation reln, Buffer buffer, TransactionId cutoff_xid, OffsetNumber *offsets, int offcnt) { xl_heap_freeze xlrec; XLogRecPtr recptr; XLogRecData rdata[2]; /* Caller should not call me on a temp relation */ Assert(!reln->rd_istemp); xlrec.node = reln->rd_node; xlrec.block = BufferGetBlo...
false
false
false
false
false
0
gdome_xml_doc_createComment (GdomeDocument *self, GdomeDOMString *data, GdomeException *exc) { Gdome_xml_Document *priv = (Gdome_xml_Document *)self; xmlNode *result = NULL; g_return_val_if_fail (priv != NULL, NULL); g_return_val_if_fail (GDOME_XML_IS_DOC (priv), NULL); g_return_val_if_fail (data != NULL, NULL); ...
false
false
false
false
false
0
DistoRefine(VP8EncIterator* const it, int try_both_i4_i16) { const int is_i16 = (it->mb_->type_ == 1); score_t best_score = MAX_COST; if (try_both_i4_i16 || is_i16) { int mode; int best_mode = -1; for (mode = 0; mode < NUM_PRED_MODES; ++mode) { const uint8_t* const ref = it->yuv_p_ + VP8I16Mode...
false
false
false
false
false
0
ho_recognize_nikud_array_in (const ho_bitmap * m_nikud, const ho_bitmap * m_mask, double *array_in) { double height; double width; double top; double bottom; double top_left; double top_mid; double top_right; double mid_left; double mid_right; double bottom_left; double bottom_mid; double bot...
false
false
false
false
false
0
init_route(int connection, int stop) { if (result.prev_stop[connection][stop] == -1) return; struct segment *seg = (struct segment *)G_calloc(1, sizeof(struct segment)); int prev_conn = result.prev_conn[connection][stop]; seg->next = head.next; head.next = seg; seg->route = result.prev_route[...
false
false
false
false
false
0
tag_make_ref_len(TAGSTRING *buf, int maxlen, uint32 id128_1, uint32 id128_2, uint32 id128_3, uint32 id128_4, const char *string, int strlen) { if (maxlen <= (signed)sizeof (ht_tag_sel)) return tag_error(buf, maxlen); if (maxlen <= (signed)sizeof (ht_tag_sel)+strlen) { strlen = maxlen - sizeof (ht_tag_sel) - 1; } ...
false
false
false
false
false
0
test_core_strmap__2(void) { khiter_t pos; int i; char *str; git_strmap *table = git_strmap_alloc(); cl_assert(table != NULL); insert_strings(table, 20); cl_assert(git_strmap_exists(table, "aaaaaaaaa")); cl_assert(git_strmap_exists(table, "ggggggggg")); cl_assert(!git_strmap_exists(table, "aaaaaaaab")); cl_a...
false
false
false
false
false
0
ipw2100_wx_reset(struct net_device *dev, struct iw_request_info *info, union iwreq_data *wrqu, char *extra) { struct ipw2100_priv *priv = libipw_priv(dev); if (priv->status & STATUS_INITIALIZED) schedule_reset(priv); return 0; }
false
false
false
false
false
0
on_repository_loaded (GitgRepository *repository, GitgWindow *window) { gchar *msg = g_strdup_printf (_ ("Loaded %d revisions in %.2fs"), gtk_tree_model_iter_n_children (GTK_TREE_MODEL(window->priv->repository), NULL), g_timer_elapse...
false
false
false
false
false
0
type_aa_dmi_decode(const struct dmi_header *header, void *d) { struct hotkey_function_type_aa *type_aa; /* We are looking for OEM-specific Type AAh */ if (header->type != 0xAA) return; has_type_aa = true; type_aa = (struct hotkey_function_type_aa *) header; pr_info("Function bitmap for Communication Button: ...
false
false
false
false
false
0
tabCounts(int& top, int& bottom, int& left, int& right) { top = bottom = left = right = 0; foreach(TraceItemView* v, _tabs) { switch(v->position()) { case TraceItemView::Top: top++; break; case TraceItemView::Bottom: bottom++; break; case TraceItemView::Left: left++; break;...
false
false
false
false
false
0
camel_imapx_command_add (CamelIMAPXCommand *ic, const gchar *format, ...) { va_list ap; g_return_if_fail (CAMEL_IS_IMAPX_COMMAND (ic)); if (format != NULL && *format != '\0') { va_start (ap, format); camel_imapx_command_addv (ic, format, ap); va_end (ap); } ...
false
false
false
false
false
0
account_id_handler (xmlNodePtr node, gpointer act_pdata) { struct account_pdata *pdata = act_pdata; GncGUID *guid; guid = dom_tree_to_guid(node); g_return_val_if_fail(guid, FALSE); xaccAccountSetGUID(pdata->account, guid); g_free(guid); return TRUE; }
false
false
false
false
false
0
GVL_set_focus_center_map(int id) { float center[3]; geovol *gvl; G_debug(3, "GS_set_focus_center_map"); gvl = gvl_get_vol(id); if (gvl) { center[X] = (gvl->xmax - gvl->xmin) / 2.; center[Y] = (gvl->ymax - gvl->ymin) / 2.; center[Z] = (gvl->zmax - gvl->zmin) / 2.; GS_set_focus(center); } ...
false
false
false
false
false
0
kmVec2AreEqual(const kmVec2* p1, const kmVec2* p2) { return ( (p1->x < p2->x + kmEpsilon && p1->x > p2->x - kmEpsilon) && (p1->y < p2->y + kmEpsilon && p1->y > p2->y - kmEpsilon) ); }
false
false
false
false
false
0
CDB___db_addpage(dbc, hp, indxp) DBC *dbc; PAGE **hp; db_indx_t *indxp; { DB *dbp; PAGE *newpage; int ret; dbp = dbc->dbp; if ((ret = CDB___db_new(dbc, P_DUPLICATE, &newpage)) != 0) return (ret); if (DB_LOGGING(dbc)) { if ((ret = CDB___db_addpage_log(dbp->dbenv, dbc->txn, &LSN(*hp), 0, dbp->log_fil...
false
false
false
false
false
0
L69() {register object *base=vs_base; register object *sup=base+VM69; VC69 vs_reserve(VM69); ihs_check; {object V223; check_arg(1); V223=(base[0]); vs_top=sup; goto TTL; TTL:; base[1]=symbol_function(((object)VV[293])); base[2]= symbol_function(((object)VV[294])); base[4]=symbol_function(((object)VV[224])); ...
false
false
false
false
false
0
gretl_matrix_row_mean (const gretl_matrix *m, int *err) { gretl_matrix *s = gretl_matrix_sum(m, 0, err); if (s != NULL) { int i; for (i=0; i<m->rows; i++) { s->val[i] /= m->cols; } } return s; }
false
false
false
false
false
0
Document_name(Document *self) { if (iks_type(self->doc) != IKS_TAG) { PyErr_SetString(PyExc_TypeError, "Text nodes have no tag name"); return NULL; } return Py_BuildValue("s", iks_name(self->doc)); }
false
false
false
false
false
0
deleteTH (pTable, key) pTH pTable; char *key; { long indice = 0; pElemTH pEl; long co = 0; indice = hashTH (key) % pTable->length; do { if (co++ > MAX_CALLS) { reAllocTH (pTable); return (deleteTH (pTable, key)); } pEl = (pTable->pElem) + indice; if (pEl->value != EMPT...
false
false
false
false
false
0
charset_extractfile(index_search_text_receiver_t receiver, void* rock, int uid, const char *msg_base, size_t len, int charset, int encoding) { struct convert_rock *input, *tobuffer; struct buf *out; size_t i; /* Initialize character set mapping */ if (charset < 0 || charset >= chartables_n...
false
false
false
false
false
0
GdipDeletePen (GpPen *pen) { if (!pen) return InvalidParameter; if (pen->dash_count != 0 && pen->own_dash_array) { GdipFree (pen->dash_array); pen->dash_count = 0; pen->dash_array = NULL; } if (pen->own_brush && pen->brush) { GdipDeleteBrush (pen->brush); pen->brush = NULL; } ...
false
false
false
false
false
0
bdc_udc_wakeup(struct usb_gadget *gadget) { struct bdc *bdc = gadget_to_bdc(gadget); unsigned long flags; u8 link_state; u32 uspc; int ret = 0; dev_dbg(bdc->dev, "%s() bdc->devstatus=%08x\n", __func__, bdc->devstatus); if (!(bdc->devstatus & REMOTE_WAKE_ENABLE)) return -EOPNOTSUPP; spin_lock_irqsave(...
false
false
false
false
false
0
autohelperowl_attackpat351(int trans, int move, int color, int action) { int a, B; UNUSED(color); UNUSED(action); a = AFFINE_TRANSFORM(609, trans, move); B = AFFINE_TRANSFORM(610, trans, move); return !somewhere(OTHER_COLOR(color), 0, 1, a) || (countlib(B) <= 6); }
false
false
false
false
false
0
xfs_quota_enable( struct super_block *sb, unsigned int uflags) { struct xfs_mount *mp = XFS_M(sb); if (sb->s_flags & MS_RDONLY) return -EROFS; if (!XFS_IS_QUOTA_RUNNING(mp)) return -ENOSYS; return xfs_qm_scall_quotaon(mp, xfs_quota_flags(uflags)); }
false
false
false
false
false
0
write_model_abox( File, X, Y, Dx, Dy ) FILE *File; long X; long Y; long Dx; long Dy; { (void)fprintf( File, "(AB : %.2f, %.2f %.2f, %.2f in micron);\n", (float)X / RDS_UNIT, (float)Y / RDS_UNIT, (float)(X + Dx) / RDS_UNIT, ...
false
false
false
false
false
0
generic_phoenix_dec(unsigned int *value, const unsigned int lng) { unsigned int i; for(i=0;(i<lng)&&(value[i]!=VAL_STOP);i++) value[i]=rcl8n(value[i],i+1); }
false
false
false
false
false
0
summary_header_to_db (CamelFolderSummary *s, GError **error) { CamelFolderSummaryClass *folder_summary_class; struct _CamelFIRecord *fir; /* Chain up to parent's summary_header_to_db() method. */ folder_summary_class = CAMEL_FOLDER_SUMMARY_CLASS (camel_local_summary_parent_class); fir = fold...
false
false
false
false
false
0
imsp_renameabook(fbuf, cp, tag, id, host) fbuf_t *fbuf; command_t *cp; char *tag, *host; auth_id *id; { char *name, *newname, *user; user = auth_username(auth_level(id) >= AUTH_USER ? id : NULL); if ((name = copy_astring(fbuf, 1)) == NULL || (newname = copy_astring(fbuf, 1)) == NULL || fb...
false
false
false
false
false
0
st_nci_i2c_request_resources(struct i2c_client *client) { struct st_nci_nfc_platform_data *pdata; struct st_nci_i2c_phy *phy = i2c_get_clientdata(client); int r; pdata = client->dev.platform_data; if (pdata == NULL) { nfc_err(&client->dev, "No platform data\n"); return -EINVAL; } /* store for later use */ ...
false
false
false
false
false
0
default_oc_freeobj(struct objcore *oc) { struct object *o; CAST_OBJ_NOTNULL(o, oc->priv, OBJECT_MAGIC); oc->priv = NULL; oc->methods = NULL; STV_Freestore(o); STV_free(o->objstore); }
false
false
false
false
false
0
CdAddDelTime(double begEtm, long nDel, CdDeltaTime delTime, CdTimeType timeType, long baseYear, double *endEtm) { double delHours; long delMonths, delYears; CdTime bhtime, ehtime; extern void Cde2h(double etime, CdTimeType timeType, long baseYear, CdTime *htime); extern void Cdh2e(CdTime *htime, double *eti...
false
false
false
false
false
0
URLcmp(u1, u2) URLParts *u1, *u2; { if (strcasecmp(u1->scheme, u2->scheme) == 0 && strcasecmp(u1->hostname, u2->hostname) == 0 && u1->port == u2->port && strcasecmp(u1->filename, u2->filename) == 0) { return(0); } return(-1); }
false
false
false
false
false
0
mov_read_mvhd(MOVContext *c, ByteIOContext *pb, MOVAtom atom) { int version = get_byte(pb); /* version */ get_be24(pb); /* flags */ if (version == 1) { get_be64(pb); get_be64(pb); } else { get_be32(pb); /* creation time */ get_be32(pb); /* modification time */ } ...
false
false
false
false
false
0
cma_pernet_idr(struct net *net, enum rdma_port_space ps) { struct cma_pernet *pernet = cma_pernet(net); switch (ps) { case RDMA_PS_TCP: return &pernet->tcp_ps; case RDMA_PS_UDP: return &pernet->udp_ps; case RDMA_PS_IPOIB: return &pernet->ipoib_ps; case RDMA_PS_IB: return &pernet->ib_ps; default: retur...
false
false
false
false
false
0
cmd_getacl(const char *tag, const char *name) { char mailboxname[MAX_MAILBOX_BUFFER]; int r, access; char *acl; char *rights, *nextid; r = (*imapd_namespace.mboxname_tointernal)(&imapd_namespace, name, imapd_userid, mailboxname); if (!r) { r = mlookup(tag, name, mailboxname, NULL,...
true
true
false
false
true
1
map(const QString & name) const { for (int i = 0; i < _maps.size(); i++) { if(_maps.at(i).name() == name) return _maps.at(i); } return CSVMap(); }
false
false
false
false
false
0
Fsum() { struct vector *vec; truc *ptr; long res; int flg; int len; if(*FLAGPTR(argStkPtr) != fVECTOR) { error(sumsym,err_vect,*argStkPtr); return(brkerr()); } vec = (struct vector *)TAddress(argStkPtr); len = vec->len; ptr = &(vec->ele0); flg = chknums(sumsy...
false
false
false
false
false
0
setBinWidthFromSlider() { if (bactive) return; setBin(binWidthSlider->value() * getDelta()); }
false
false
false
false
false
0
canonicalizeVector(IntegerVector const &v)const { /* Polynomial f=vectorToPolynomial(PolynomialRing(Q,v.size()),v); f=division(f,basis,LexicographicTermOrder()); IntegerVector ret=polynomialToVector(f); */ IntegerVector ret2=basis2.canonicalize(integerVectorToFieldVector(v,Q)).primitive(); // assert((re...
false
false
false
false
false
0
get_dirlist(char *dirname, int dlen, int flags) { struct file_list *dirlist; char dirbuf[MAXPATHLEN]; int save_recurse = recurse; int save_xfer_dirs = xfer_dirs; int save_prune_empty_dirs = prune_empty_dirs; int senddir_fd = flags & GDL_IGNORE_FILTER_RULES ? -2 : -1; if (dlen < 0) { dlen = strlcpy(dirbuf, dir...
false
false
false
false
false
0
cafebabe_code_attribute_deinit(struct cafebabe_code_attribute *a) { free(a->exception_table); for (uint16_t i = 0; i < a->attributes.count; ++i) cafebabe_attribute_info_deinit(&a->attributes.array[i]); free(a->attributes.array); }
false
false
false
false
false
0
WriteMolecule(OBBase* pOb, OBConversion* pConv) { OBMol* pmol = dynamic_cast<OBMol*>(pOb); if(pmol==NULL) return false; //Define some references so we can use the old parameter names ostream &ofs = *pConv->GetOutStream(); OBMol &mol = *pmol; unsigned int i; char buffer[BUFF_SIZE]; ...
false
false
false
false
false
0
mosquitto_connect_bind(struct mosquitto *mosq, const char *host, int port, int keepalive, const char *bind_address) { int rc; rc = _mosquitto_connect_init(mosq, host, port, keepalive, bind_address); if(rc) return rc; pthread_mutex_lock(&mosq->state_mutex); mosq->state = mosq_cs_new; pthread_mutex_unlock(&mosq->s...
false
false
false
false
false
0
_set_bool(const char *name, int *target, PyObject *src, int dflt) { if (src == NULL) *target = dflt; else *target = PyObject_IsTrue(src); return 0; }
false
false
false
false
false
0
read_done_cb (GObject *source_object, GAsyncResult *res, gpointer user_data) { GError *error = NULL; GError *wc_error = NULL; OperationData *op_data = (OperationData *) user_data; GrlShoutcastSource *source = GRL_SHOUTCAST_SOURCE (op_data->source); gboolean cache; gchar *content ...
false
false
false
false
false
0
multipath_handler(vector strvec) { struct mpentry * mpe; mpe = alloc_mpe(); if (!mpe) return 1; if (!vector_alloc_slot(conf->mptable)) { free_mpe(mpe); return 1; } vector_set_slot(conf->mptable, mpe); return 0; }
false
false
false
false
false
0
brasero_setting_get_integer (GKeyFile *file, const gchar *group_name, const gchar *key) { GError *error = NULL; gint int_value; int_value = g_key_file_get_integer (file, group_name, key, &error); if (!int_value && error) { g_error_free (error); return -...
false
false
false
false
false
0
test_diff_diffiter__iterate_all(void) { git_repository *repo = cl_git_sandbox_init("status"); git_diff_options opts = GIT_DIFF_OPTIONS_INIT; git_diff_list *diff = NULL; diff_expects exp = {0}; size_t d, num_d; opts.context_lines = 3; opts.interhunk_lines = 1; opts.flags |= GIT_DIFF_INCLUDE_IGNORED | GIT_DIFF_I...
false
false
false
false
false
0
mve_encode_0x2 (GstMveEncoderData * enc, const guint16 * src, GstMveApprox * apx) { /* copy block from 2 frames ago using a motion vector (1 byte) */ if (enc->mve->quick_encoding || enc->mve->second_last_frame == NULL) return MVE_APPROX_MAX_ERROR; apx->error = mve_try_vector (enc, src, (guint16 *) ...
false
false
false
false
false
0
sfip_node_freelist ( sfip_node_t *root ) { sfip_node_t *node; if ( !root ) return; for ( node = root; node; node = root ) { root = root->next; sfip_node_free(node); } }
false
false
false
false
false
0
scrollable_get_adjustments (StScrollable *scrollable, StAdjustment **hadjustment, StAdjustment **vadjustment) { StBoxLayoutPrivate *priv; priv = (ST_BOX_LAYOUT (scrollable))->priv; if (hadjustment) *hadjustment = priv->hadjustment; if (vadjustment)...
false
false
false
false
false
0
gt_seqpos_classifier_position_is_inside_feature( GtSeqposClassifier *seqpos_classifier, unsigned long i, bool *inside, bool *end_of_annotation, GtError *err) { int had_err = 0; GtRange next_specified_ft_range = { GT_UNDEF_ULONG, GT_UNDEF_ULONG }; if (i == 0) { had_err = gt_seqpos_classifier_next_spe...
false
false
false
false
false
0
EndOfTwoDimList(struct TwoDimList *list) /* bool */ /* returns true if the leftmost list variable has cycled */ /* i.e. rounds is > 0 for the first is-2d list item */ { struct TwoDimList *lp, *tp = NULL; int i = 0, done = true; for (lp = list; lp != NULL; lp=lp->next) { if (lp->is2d) { ...
false
false
false
false
false
0
GetLowestScale(char **& list,int i) { CPLString req; double scale=-1; int position=-1; while (NULL!=list[i]) { double tscale=Scale(list[i]); if (tscale>=scale) { scale=tscale; position=i; } i++; } if (position>-1) { ...
false
false
false
false
false
0
RCS_putadmin (RCSNode *rcs, FILE *fp) { fprintf (fp, "%s\t%s;\n", RCSHEAD, rcs->head ? rcs->head : ""); if (rcs->branch) fprintf (fp, "%s\t%s;\n", RCSBRANCH, rcs->branch); fputs ("access", fp); if (rcs->access) { char *p, *s; s = xstrdup (rcs->access); for (p = strtok (s, " \n\t"); p != NULL; p...
false
false
true
false
true
1
ap_abstract1_expand(ap_manager_t* man, bool destructive, ap_abstract1_t* a, ap_var_t var, ap_var_t* tvar, size_t size) { ap_dim_t dim; ap_dimperm_t perm; ap_environment_t* nenv; ap_abstract0_t* value; ap_abstract1_t res; /* particular case */ if (size==0){ res = des...
false
false
false
false
false
0
show_clip() { SHOW_ALL_NL; fprintf(stderr, "\tpoint clip is %s\n", (clip_points) ? "ON" : "OFF"); if (clip_lines1) fputs("\tdrawing and clipping lines between inrange and outrange points\n", stderr); else fputs("\tnot drawing lines between inrange and outrange points\n", stderr); if (clip_lines...
false
false
false
false
false
0
httpHeaderHas(const HttpHeader * hdr, http_hdr_type id) { assert(hdr); assert_eid(id); assert(id != HDR_OTHER); debug(55, 7) ("%p lookup for %d\n", hdr, id); return CBIT_TEST(hdr->mask, id); }
false
false
false
false
false
0
unexpected_intr(int irq, ide_hwif_t *hwif) { u8 stat = hwif->tp_ops->read_status(hwif); if (!OK_STAT(stat, ATA_DRDY, BAD_STAT)) { /* Try to not flood the console with msgs */ static unsigned long last_msgtime, count; ++count; if (time_after(jiffies, last_msgtime + HZ)) { last_msgtime = jiffies; printk...
false
false
false
false
false
0
KernelSinc(const float x) { if (x == 0.0) return(1.0); return((float)sin(PI*x)/(PI*x)); }
false
false
false
false
false
0
docg3_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct mtd_info *mtd; struct resource *ress; void __iomem *base; int ret, floor; struct docg3_cascade *cascade; ret = -ENXIO; ress = platform_get_resource(pdev, IORESOURCE_MEM, 0); if (!ress) { dev_err(dev, "No I/O memory resource ...
false
false
false
false
false
0
_kf_gammap(double s, double z) { double sum, x; int k; for (k = 1, sum = x = 1.; k < 100; ++k) { sum += (x *= z / (s + k)); if (x / sum < KF_GAMMA_EPS) break; } return exp(s * log(z) - z - kf_lgamma(s + 1.) + log(sum)); }
false
false
false
false
false
0
vmw_fifo_wait_noirq(struct vmw_private *dev_priv, uint32_t bytes, bool interruptible, unsigned long timeout) { int ret = 0; unsigned long end_jiffies = jiffies + timeout; DEFINE_WAIT(__wait); DRM_INFO("Fifo wait noirq.\n"); for (;;) { prepare_to_wait(&dev_priv->fifo_queue, &__wait, (int...
false
false
false
false
false
0
compare_vals( Modifications *m1, Modifications *m2 ) { int i, j; struct berval *bv1, *bv2; if ( m2->sml_nvalues ) { bv2 = m2->sml_nvalues; bv1 = m1->sml_nvalues; } else { bv2 = m2->sml_values; bv1 = m1->sml_values; } for ( j=0; j<m2->sml_numvals; j++ ) { for ( i=0; i<m1->sml_numvals; i++ ) { if ( !b...
false
false
false
false
false
0
handle_unit_disband(struct player *pplayer, int unit_id) { struct city *pcity; struct unit *punit = player_unit_by_number(pplayer, unit_id); if (NULL == punit) { /* Probably died or bribed. */ log_verbose("handle_unit_disband() invalid unit %d", unit_id); return; } if (unit_has_type_flag(punit, ...
false
false
false
false
false
0
get_lang_number (void) { const char *language_string = lang_hooks.name; if (strcmp (language_string, "GNU C") == 0) return N_SO_C; else if (strcmp (language_string, "GNU C++") == 0) return N_SO_CC; else if (strcmp (language_string, "GNU F77") == 0) return N_SO_FORTRAN; else if (strcmp (language_s...
false
false
false
false
false
0
stac9460_mic_sw_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); unsigned char val; int id; id = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); if (id == 0) val = stac9460_get(ice, STAC946X_GENERAL_PURPOSE); else val = stac946...
false
false
false
false
false
0
asn1_parse_algorithmIdentifier(chunk_t blob, int level0, chunk_t *parameters) { asn1_parser_t *parser; chunk_t object; int objectID; int alg = OID_UNKNOWN; parser = asn1_parser_create(algorithmIdentifierObjects, blob); parser->set_top_level(parser, level0); while (parser->iterate(parser, &objectID, &object)) ...
false
false
false
false
false
0
gth_input_num_of_gen_seqs(GthInput *input, GT_UNUSED unsigned long filenum) { gt_assert(input); gt_assert(input->gen_file_num == filenum); return gth_seq_con_num_of_seqs(input->gen_seq_con); }
false
false
false
false
false
0
H5Sselect_none(hid_t spaceid) { H5S_t *space; /* Dataspace to modify selection of */ herr_t ret_value = SUCCEED; /* return value */ FUNC_ENTER_API(FAIL) H5TRACE1("e", "i", spaceid); /* Check args */ if(NULL == (space = (H5S_t *)H5I_object_verify(spaceid, H5I_DATAS...
false
false
false
false
false
0
share_diff(const struct work *work) { bool new_best = false; double d64, s64; uint64_t ret; d64 = truediffone; s64 = le256todouble(work->hash); if (unlikely(!s64)) s64 = 0; ret = round(d64 / s64); cg_wlock(&control_lock); if (unlikely(ret > best_diff)) { new_best = true; best_diff = ret; suffix_stri...
false
false
false
false
false
0
canvas_new(GtkDrawingArea *drawing_area) { gpaint_canvas *canvas = 0; gpaint_drawing *drawing = 0; GdkDrawable *d = GTK_WIDGET(drawing_area)->window; GdkGC *gc; GdkColor black; GdkColor white; /* Create the gc from the drawing area window. */ gc = gdk_gc_new(d); g_assert(gc); ...
false
false
false
false
false
0
lad_sm_check_inner_block_inner(Block *dst, Block *src) { Block *bpt; Boolean b; for (bpt = dst; bpt != NULL; bpt = bpt->next) { b = lad_sm_check_inner_block(bpt, src); if (b) { return TRUE; } if (bpt->inner != NULL) { b = lad_sm_check_inner_block_inner(bpt->inner, src); if (b) { r...
false
false
false
false
false
0
writeXMLToStream(XMLSerializer& xml_stream) const { // output Imageset tag xml_stream.openTag("Imageset") .attribute("Name", d_name) .attribute("Imagefile", d_textureFilename); if (d_nativeHorzRes != DefaultNativeHorzRes) xml_stream.attribute("NativeHorzRes", PropertyHelp...
false
false
false
false
false
0
text_editor_select_completion (TextEditor *te) { TextEditorCell *iter; gint position; gint autoc_sel; autoc_sel = (gint) scintilla_send_message (SCINTILLA (te->scintilla), SCI_AUTOCGETCURRENT, 0, 0); scintilla_send_message (SCINTILLA (te->scintilla), SCI_AUTOCCANCEL, 0, 0); g_...
false
false
false
false
false
0
gst_signal_processor_chain (GstPad * pad, GstBuffer * buffer) { GstSignalProcessor *self; self = GST_SIGNAL_PROCESSOR (gst_pad_get_parent (pad)); GST_LOG_OBJECT (self, "chain(%s:%s, %p) : p_in=%u, p_out=%u", GST_DEBUG_PAD_NAME (pad), buffer, self->pending_in, self->pending_out); gst_signal_processor_pe...
false
false
false
false
false
0
has_point ( int x, int y // Relative to origin of shape. ) { if (!rle) // 8x8 flat? { return x >= -xleft && x < xright && y >= -yabove && y < ybelow; } uint8 *in = data; // Point to data. int scanlen; while ((scanlen = Read2(in)) != 0) { // Get length of scan line. int encoded = sc...
false
false
false
false
false
0
i9xx_setup_backlight(struct intel_connector *connector, enum pipe unused) { struct drm_device *dev = connector->base.dev; struct drm_i915_private *dev_priv = dev->dev_private; struct intel_panel *panel = &connector->panel; u32 ctl, val; ctl = I915_READ(BLC_PWM_CTL); if (IS_GEN2(dev) || IS_I915GM(dev) || IS_I945...
false
false
false
false
false
0
check_condition (LexState *ls, int c, const char *msg) { if (!c) luaK_error(ls, msg); }
false
false
false
false
false
0
find_ext_mic_pin(struct hda_codec *codec) { struct alc_spec *spec = codec->spec; struct auto_pin_cfg *cfg = &spec->gen.autocfg; hda_nid_t nid; unsigned int defcfg; int i; for (i = 0; i < cfg->num_inputs; i++) { if (cfg->inputs[i].type != AUTO_PIN_MIC) continue; nid = cfg->inputs[i].pin; defcfg = snd_hda...
false
false
false
false
false
0
str_table_to_msg(GHashTable* hash_table) { struct ha_msg* hash_msg; if ( NULL == hash_table) { return NULL; } hash_msg = ha_msg_new(5); g_hash_table_foreach(hash_table, pair_to_msg, hash_msg); return hash_msg; }
false
false
false
false
false
0
fm_realloc(void *ptr, size_t req_size) { Fm_mem_src *src; frame_errmsg = NULL; if (ptr == NULL) return(fm_malloc(req_size)); /* This is equivalent to free(3). */ if (req_size == 0) return(NULL); if (top_frame == NULL) src = NULL; else src = top_frame->src; return(mem_realloc(NULL, src, ptr, req_...
false
false
false
false
false
0
getAll(const std::string& id) const { if(id == "GROUP") return groups_; if(id == "VO") return vos_; return std::list<std::string>(); }
false
false
false
false
false
0
verbose(mychan_t *mychan, const char *fmt, ...) { va_list ap; char buf[BUFSIZE]; if (mychan->chan == NULL) return; va_start(ap, fmt); vsnprintf(buf, BUFSIZE, fmt, ap); va_end(ap); if ((MC_VERBOSE | MC_FORCEVERBOSE) & mychan->flags) notice(chansvs.nick, mychan->name, "%s", buf); else if (MC_VERBOSE_OPS & ...
true
true
false
false
true
1
_mx_stylable_get_style_string (MxStylable *stylable) { GType type_id; gchar *cstring; GString *string; const gchar *type, *id, *class, *pseudo_class; ClutterActor *actor; ClutterActor *parent; /* Create a string that contains all the properties of a * Stylable that can be matched against in the CSS. ...
false
false
false
false
false
0
evaluate_target_status(ctlr_info_t *h, CommandList_struct *cmd, int *retry_cmd) { unsigned char sense_key; unsigned char status_byte, msg_byte, host_byte, driver_byte; int error_value; *retry_cmd = 0; /* If we get in here, it means we got "target status", that is, scsi status */ status_byte = cmd->err_info->S...
false
false
false
false
false
0
gst_gdk_pixbuf_chain (GstPad * pad, GstBuffer * buf) { GstGdkPixbuf *filter; GstFlowReturn ret = GST_FLOW_OK; GError *error = NULL; GstClockTime timestamp; guint8 *data; guint size; filter = GST_GDK_PIXBUF (gst_pad_get_parent (pad)); timestamp = GST_BUFFER_TIMESTAMP (buf); if (GST_CLOCK_TIME_IS_VAL...
false
false
false
false
false
0
webx_dialog_crop_changed (GtkWidget *widget, GdkRectangle *crop, WebxDialog *dlg) { g_return_if_fail (WEBX_DIALOG (dlg)); if (! webx_pipeline_crop (WEBX_PIPELINE (dlg->pipeline), crop->width, crop->height, ...
false
false
false
false
false
0