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
taos_als_cal_target_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t len) { struct iio_dev *indio_dev = dev_to_iio_dev(dev); struct tsl2583_chip *chip = iio_priv(indio_dev); int value; if (kstrtoint(buf, 0, &value)) return -EINVAL; if (value) chip->taos_settings.als_cal_targe...
false
false
false
false
false
0
cmd_cmdsize(vector_t *strvec) { unsigned int i; int size = 0; vector_t *descvec; desc_t *desc; for (i = 0; i < vector_active (strvec); i++) { if ((descvec = vector_slot (strvec, i)) != NULL) { if ((vector_active (descvec)) == 1 && (desc = vector_slot (descvec, 0)) != NULL) { if (desc->cmd == NULL ...
false
false
false
false
false
0
netxen_nic_pci_mem_access_direct(struct netxen_adapter *adapter, u64 off, u64 *data, int op) { void __iomem *addr, *mem_ptr = NULL; resource_size_t mem_base; int ret; u32 start; spin_lock(&adapter->ahw.mem_lock); ret = adapter->pci_set_window(adapter, off, &start); if (ret != 0) goto unlock; if (NX_IS_RE...
false
false
false
false
false
0
writeXML(STD_NAMESPACE ostream &stream, const size_t flags) const { OFString tmpString; /* iterate over all list items */ OFListConstIterator(ItemStruct *) iter = ItemList.begin(); const OFListConstIterator(ItemStruct *) last = ItemList.end(); ...
false
false
false
false
false
0
print_los(object *op) { int x, y; char buf[MAP_CLIENT_X*2+20], buf2[10]; snprintf(buf, sizeof(buf), "[fixed] "); for (x = 0; x < op->contr->socket.mapx; x++) { snprintf(buf2, sizeof(buf2), "%2d", x); strncat(buf, buf2, sizeof(buf)-strlen(buf)-1); } draw_ext_info(NDI_UNIQUE, 0,...
false
false
false
false
false
0
operator+(const double f) const { char buf[30]; sprintf(buf, "%f", f); const int s_length = ::strlen(buf); GStr newstring; newstring.replace_data(length() + s_length); ::memcpy(newstring.chrs(), chars(), length()); ::memcpy(&(newstring.chrs())[length()], buf, s_length); return newstring;...
false
false
false
false
false
0
recursive_lock_destroy(pTHX_ recursive_lock_t *lock) { MUTEX_DESTROY(&lock->mutex); COND_DESTROY(&lock->cond); }
false
false
false
false
false
0
PerlIOScalar_pushed(pTHX_ PerlIO * f, const char *mode, SV * arg, PerlIO_funcs * tab) { IV code; PerlIOScalar *s = PerlIOSelf(f, PerlIOScalar); /* If called (normally) via open() then arg is ref to scalar we are * using, otherwise arg (from binmode presumably) is either NULL * or the _name_ ...
false
false
false
false
false
0
load_float(UnpicklerObject *self) { PyObject *value; char *endptr, *s; Py_ssize_t len; double d; if ((len = _Unpickler_Readline(self, &s)) < 0) return -1; if (len < 2) return bad_readline(); errno = 0; d = PyOS_string_to_double(s, &endptr, PyExc_OverflowError); if (...
false
false
false
false
false
0
type_eqv_(jl_value_t *a, jl_value_t *b) { if (a == b) return 1; if (jl_is_typector(a)) a = (jl_value_t*)((jl_typector_t*)a)->body; if (jl_is_typector(b)) b = (jl_value_t*)((jl_typector_t*)b)->body; if (jl_is_typevar(a)) { if (jl_is_typevar(b)) { return type_eqv_(((jl_tvar_t*)a)->ub, ...
false
false
false
false
false
0
ECPGtrans(int lineno, const char *connection_name, const char *transaction) { PGresult *res; struct connection *con = ecpg_get_connection(connection_name); if (!ecpg_init(con, connection_name, lineno)) return (false); ecpg_log("ECPGtrans line %d action = %s connection = %s\n", lineno, transaction, con ? con->...
false
false
false
false
false
0
find_nested_options(struct isl_args *args, void *opt, struct isl_args *wanted) { int i; struct isl_options *options; if (args == wanted) return opt; for (i = 0; args->args[i].type != isl_arg_end; ++i) { struct isl_arg *arg = &args->args[i]; void *child; if (arg->type != isl_arg_child) continue; if...
false
false
false
false
false
0
rinoo_http_destroy(t_http *http) { if (http->request.buffer != NULL) { buffer_destroy(http->request.buffer); http->request.buffer = NULL; } if (http->response.buffer != NULL) { buffer_destroy(http->response.buffer); http->response.buffer = NULL; } rinoo_http_headers_flush(&http->request.headers); rinoo_ht...
false
false
false
false
false
0
addSpell(uint32 spell_id, ActiveStates active /*= ACT_DECIDE*/, PetSpellState state /*= PETSPELL_NEW*/, PetSpellType type /*= PETSPELL_NORMAL*/) { SpellEntry const* spellInfo = sSpellStore.LookupEntry(spell_id); if (!spellInfo) { // do pet spell book cleanup if (state == PETSPELL_UNCHANGED) ...
false
false
false
false
false
0
getselectedjob_chk(const ULONG priv) { const Hashspq *result = getselectedjob(); const struct spq *rj; if (!result) { doerror(Job_seg.njobs != 0? 314: 315); /* {No job selected} {No jobs to select} */ return NULL; } rj = &result->j; /* Set priv to 0 if no check required */ if (priv) { if (!(...
false
false
false
false
false
0
pppoe_seq_next(struct seq_file *seq, void *v, loff_t *pos) { struct pppoe_net *pn = pppoe_pernet(seq_file_net(seq)); struct pppox_sock *po; ++*pos; if (v == SEQ_START_TOKEN) { po = pppoe_get_idx(pn, 0); goto out; } po = v; if (po->next) po = po->next; else { int hash = hash_item(po->pppoe_pa.sid, po->p...
false
false
false
false
false
0
_job_timed_out(struct job_record *job_ptr) { xassert(job_ptr); if (job_ptr->details) { time_t now = time(NULL); job_ptr->end_time = now; job_ptr->time_last_active = now; job_ptr->job_state = JOB_TIMEOUT | JOB_COMPLETING; build_cg_bitmap(job_ptr); job_ptr->exit_code = MAX(job_ptr...
false
false
false
false
false
0
ar9003_hw_get_max_edge_power(struct ar9300_eeprom *eep, u16 freq, int idx, bool is2GHz) { u16 twiceMaxEdgePower = MAX_RATE_POWER; u8 *ctl_freqbin = is2GHz ? &eep->ctl_freqbin_2G[idx][0] : &eep->ctl_freqbin_5G[idx][0]; u16 num_edges = is2GHz ? AR9300_NUM_BAND_EDGES_2G : AR9300_NUM_BAND_EDGES_5G; unsigned ...
false
false
false
false
false
0
console_init(void) { #ifdef VT_OPENQRY int vtno; #endif char *s; s = getenv("CONSOLE"); if (!s) s = getenv("console"); if (s) { int fd = open(s, O_RDWR | O_NONBLOCK | O_NOCTTY); if (fd >= 0) { dup2(fd, STDIN_FILENO); dup2(fd, STDOUT_FILENO); xmove_fd(fd, STDERR_FILENO); } dbg_message(L_LOG, "co...
false
false
false
false
true
1
AppendString(const char* str) { int i = 0; while (str[i] != '\0' && cursor_ + i < end_) { cursor_[i] = str[i]; ++i; } cursor_ += i; }
false
false
false
false
false
0
cmd_rescope_name (WorkbookControl *wbc, GnmNamedExpr *nexpr, Sheet *scope) { CmdRescopeName *me; g_return_val_if_fail (wbc != NULL, TRUE); g_return_val_if_fail (nexpr != NULL, TRUE); g_return_val_if_fail (!expr_name_is_placeholder (nexpr), TRUE); expr_name_ref (nexpr); me = g_object_new (CMD_RESCOPE_NAME_TYPE,...
false
false
false
false
false
0
Markup () { ostringstream oss; switch (parenthesis) { case 0: oss << "("; break; case 1: oss << "["; break; case 2: oss << "{"; break; } list<FormulaElt *>::iterator i, end = children.end(); for (i = children.begin (); i != end; i++) { oss << (*i)->Markup (); } switch (parenthesis) { ...
false
false
false
false
false
0
playlist3_message_close(Playlist3MessagePlugin * self) { /* reset */ widget_added = FALSE; if (self->priv->error_visible) { self->priv->error_visible = FALSE; g_source_remove(self->priv->timeout_callback); if (pl3_xml) { GtkWidget *event = GTK_WIDGET(gtk_builder_get_object(pl3_xml, "error_event")); g...
false
false
false
false
false
0
ompi_io_ompio_full_print_queue(int queue_type){ int ret = OMPI_SUCCESS; print_queue *q=NULL; ret = ompi_io_ompio_set_print_queue(&q, queue_type); assert ( ret != OMPI_ERROR); if (q->count < QUEUESIZE) return 0; else return 1; }
false
false
false
true
false
1
gt_bsPrint(FILE *fp, constBitString str, BitOffset offset, BitOffset numBits) { uint32_t accum = 0; unsigned bitsLeft = numBits, bitTop = offset%bitElemBits, bitsInAccum = 0; size_t elemStart = offset/bitElemBits; const BitElem *p = str + elemStart; char buf[sizeof (accum) * CHAR_BIT]; int io...
true
true
false
false
false
1
generate_type_encode (const Symbol *s) { fprintf (codefile, "int ASN1CALL\n" "encode_%s(unsigned char *p HEIMDAL_UNUSED_ATTRIBUTE, size_t len HEIMDAL_UNUSED_ATTRIBUTE," " const %s *data, size_t *size)\n" "{\n", s->gen_name, s->gen_name); switch (s->type->type) { case TInteger: c...
false
false
false
false
false
0
snd_timer_hw_open(snd_timer_t **handle, const char *name, int dev_class, int dev_sclass, int card, int device, int subdevice, int mode) { int fd, ver, tmode, ret; snd_timer_t *tmr; struct sndrv_timer_select sel; *handle = NULL; tmode = O_RDONLY; if (mode & SND_TIMER_OPEN_NONBLOCK) tmode |= O_NONBLOCK; fd = ...
false
false
false
false
false
0
pmon(gn_data *data, struct gn_statemachine *state) { gn_error error; /* Initialise the code for the GSM interface. */ error = gn_gsm_initialise(state); if (error != GN_ERR_NONE) { fprintf(stderr, _("GSM/FBUS init failed! (Unknown model?). Quitting.\n")); return error; } while (1) { usleep(50000); } re...
false
false
false
false
true
1
operator()(Actor* self, bool force) { if (self->getExp() >= 1 && self->getHealth() < self->getMaxHealth()) { self->addExp(-1); self->hurt(-3); self->msgs.push_back("You feel a bit better."); return true; } return false; }
false
false
false
false
false
0
q_add(const char *str) { if (str) q_add_length(str, strlen(str)); }
false
false
false
false
false
0
init_values(const XAP_EncodingManager* that) { const char * ucs4i = ucs4Internal (); const char * naten = that->getNativeEncodingName (); iconv_handle_N2U = UT_iconv_open (ucs4i, naten); if (!UT_iconv_isValid(iconv_handle_N2U)) { UT_DEBUGMSG(("WARNING: UT_iconv_open(%s,%s) failed!\n",ucs4i,naten)); } iconv...
false
false
false
false
false
0
isakmp_attr_print(const u_char *p, const u_char *ep) { u_int16_t *q; int totlen; u_int32_t t; q = (u_int16_t *)p; if (p[0] & 0x80) totlen = 4; else totlen = 4 + EXTRACT_16BITS(&q[1]); if (ep < p + totlen) { printf("[|attr]"); return ep + 1; } printf("("); t = EXTRACT_16BITS(&q[0]) & 0x7fff; printf(...
false
false
false
false
false
0
CvtStringToGridType(dpy, args, num_args, from, to, data) Display *dpy; XrmValuePtr args; Cardinal *num_args; XrmValuePtr from, to; XtPointer *data; { static unsigned char grid_type; String start = from->addr; if (*num_args != 0) XtAppWarningMsg( XtDisplayToApplicationContext(dpy), ...
false
false
false
false
false
0
make_oper_cache_key(ParseState *pstate, OprCacheKey *key, List *opname, Oid ltypeId, Oid rtypeId, int location) { char *schemaname; char *opername; /* deconstruct the name list */ DeconstructQualifiedName(opname, &schemaname, &opername); /* ensure zero-fill for stable hashing */ MemSet(key, 0, sizeof...
false
false
false
false
false
0
bisho_pane_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec) { BishoPane *pane = BISHO_PANE (object); switch (property_id) { case PROP_SERVICE: { GtkTextBuffer *buffer; GtkTextIter end; char *s; pane->info = g_value_get...
false
false
false
false
false
0
gspca_dev_probe(struct usb_interface *intf, const struct usb_device_id *id, const struct sd_desc *sd_desc, int dev_size, struct module *module) { struct usb_device *dev = interface_to_usbdev(intf); /* we don't handle multi-config cameras */ if (dev->descriptor.bNumConfigurations != 1) { pr_err("%04x:%04x ...
false
false
false
false
false
0
format_template_member_free (TemplateMember *member) { g_return_if_fail (member != NULL); if (member->mstyle) { gnm_style_unref (member->mstyle); member->mstyle = NULL; } g_free (member); }
false
false
false
false
false
0
GetFloatArray(float** pfData) { if (*pfData == NULL) *pfData = new float[4*m_iSize.area()]; RenderTransferFunction(); memcpy(*pfData, m_pColorData->GetDataPointer(), 4*sizeof(float)*m_iSize.area()); }
false
false
false
false
false
0
pm8001_set_phy_profile_single(struct pm8001_hba_info *pm8001_ha, u32 phy, u32 length, u32 *buf) { u32 tag, opc; int rc, i; struct set_phy_profile_req payload; struct inbound_queue_table *circularQ; memset(&payload, 0, sizeof(payload)); rc = pm8001_tag_alloc(pm8001_ha, &tag); if (rc) PM8001_INIT_DBG(pm8001_...
false
false
false
false
false
0
check_change(void) {int n=0; if(!lines_match())return; print_where=true; do {changing=true;/*39:*/ #line 560 "common.w" {if(++change_line,!input_ln(change_file)) {loc= &buffer[0];err_print("! Change file ended before @y"); change_limit=change_buffer;changing=false;return; } if(limit> &buffer[1]&&buffer[0]=='@') if(bu...
false
false
false
false
false
0
ms_biff_bof_data_new (BiffQuery *q) { MsBiffBofData *ans = g_new (MsBiffBofData, 1); if (q->length >= 4) { /* Determine type from BOF */ switch (q->opcode) { case BIFF_BOF_v0: ans->version = MS_BIFF_V2; break; case BIFF_BOF_v2: ans->version = MS_BIFF_V3; break; case BIFF_BOF_v4: ans->version = MS_BIFF_V4;...
false
false
false
false
false
0
check_printable(char *id, int maxlen) { static char buffer[MAX_IDLEN]; char *idval,*bufval; int i = 0; memset(buffer,'\0',MAX_IDLEN); if(maxlen > MAX_IDLEN) maxlen = MAX_IDLEN; bufval = buffer; for(idval = id; idval && (i < maxlen - 1); ++idval,++bufval,++i) if(!isprint(*id...
true
true
false
false
false
1
snic_fwcq_cmpl_handler(struct snic *snic, int io_cmpl_work) { unsigned int num_ent = 0; /* number cq entries processed */ unsigned int cq_idx; unsigned int nent_per_cq; struct snic_misc_stats *misc_stats = &snic->s_stats.misc; for (cq_idx = snic->wq_count; cq_idx < snic->cq_count; cq_idx++) { nent_per_cq = vnic...
false
false
false
false
false
0
configure(Vector<String> &conf, ErrorHandler *errh) { String arg; _incremental = _unshift_ip_addr = false; if (Args(conf, this, errh) .read_mp("FIELD", AnyArg(), arg) .read("INCREMENTAL", _incremental) .read("UNSHIFT_IP_ADDR", _unshift_ip_addr) .complete() < 0) return -1; const char *end = IPField:...
false
false
false
false
false
0
suspend_activities(bool called_from_worker) { #ifdef DEBUG_BOINC_API char log_buf[256]; fprintf(stderr, "%s suspend_activities() called from %s\n", boinc_msg_prefix(log_buf, sizeof(log_buf)), called_from_worker?"worker thread":"timer thread" ); #endif #ifdef _WIN32 static vector<int> pid...
false
false
false
false
false
0
H5B2_test_decode(const uint8_t *raw, void *nrecord, void *_ctx) { H5B2_test_ctx_t *ctx = (H5B2_test_ctx_t *)_ctx; /* Callback context structure */ FUNC_ENTER_NOAPI_NOINIT_NOERR /* Sanity check */ HDassert(ctx); H5F_DECODE_LENGTH_LEN(raw, *(hsize_t *)nrecord, ctx->sizeof_size); FUNC_LEA...
false
false
false
false
false
0
intel_logical_ring_alloc_request_extras(struct drm_i915_gem_request *request) { int ret = 0; request->ringbuf = request->ctx->engine[request->engine->id].ringbuf; if (i915.enable_guc_submission) { /* * Check that the GuC has space for the request before * going any further, as the i915_add_request() call ...
false
false
false
false
false
0
ajFileNewOutNameDirS(const AjPStr name, const AjPDirout dir) { AjPFile thys; ajDebug("ajFileNewOutNameDirS('%S' '%S')\n", dir->Name, name); AJNEW0(thys); if(!dir) { #ifdef WIN32 if(ajStrMatchC(name, "/dev/null")) thys->fp = fopen("NUL", "wb"); else #endif /* WIN32 */ ...
false
false
false
false
true
1
restore_node_features(int recover) { int i; struct node_record *node_ptr; for (i=0, node_ptr=node_record_table_ptr; i<node_record_count; i++, node_ptr++) { if (node_ptr->weight != node_ptr->config_ptr->weight) { error("Node %s Weight(%u) differ from slurm.conf", node_ptr->name, node_ptr->weight...
false
false
false
false
false
0
paintEvent(QPaintEvent * event) { // unbreak painting QToolButton::paintEvent(event); // draw mark if (m_markOpacity > 0.0 && !m_markPixmap.isNull()) { QPainter p(this); if (m_markOpacity < 1.0) p.setOpacity(m_markOpacity); p.drawPixmap(width() - m_markPixmap.width()...
false
false
false
false
false
0
DtsSetInputFormat( HANDLE hDevice, BC_INPUT_FORMAT *pInputFormat ) { DTS_LIB_CONTEXT *Ctx = NULL; uint32_t videoAlgo = BC_VID_ALGO_H264; uint32_t ScaledWidth = 0; DTS_GET_CTX(hDevice,Ctx); Ctx->VidParams.MediaSubType = pInputFormat->mSubtype; Ctx->VidParams.WidthInPixels = pInputFormat->width; Ctx-...
false
false
false
false
false
0
Forward (Event& e) { if (IsAChild(e.target)) { e.target->Handle(e); } else { Handle(e); } }
false
false
false
false
false
0
emi_pending_smsmessage(SMSCenter *smsc) { char *tmpbuff; int n = 0; /* time_t timenow; */ /* Block until we have a connection */ guarantee_link(smsc); /* If we have MO-message, then act (return 1) */ if (memorybuffer_has_rawmessage(smsc, 52, 'O') > 0 || memorybuffer_has_rawmessage...
false
false
false
false
false
0
mv_alloc_request(struct usb_ep *_ep, gfp_t gfp_flags) { struct mv_req *req = NULL; req = kzalloc(sizeof *req, gfp_flags); if (!req) return NULL; req->req.dma = DMA_ADDR_INVALID; INIT_LIST_HEAD(&req->queue); return &req->req; }
false
false
false
false
false
0
ReadInOneItem(char *ItemPointer, char *ItemsSectionEnd, item *TargetItem) { init_item(TargetItem); char *iname = ReadAndMallocStringFromData(ItemPointer, ITEM_NAME_STRING, "\""); TargetItem->type = GetItemIndexByName(iname); free(iname); ReadValueFromString(ItemPointer, ITEM_POS_X_STRING, "%f", &(TargetItem->pos...
false
false
false
false
false
0
handle_print_numeric(const char *token, char *line) { const char *value; char *st; value = strtok_r(line, " \t\n", &st); if (value && ( (strcasecmp(value, "yes") == 0) || (strcasecmp(value, "true") == 0) || (*value == '1') )) { netsnmp_ds_set_int(NETSNMP_DS_LIBRARY_ID, N...
false
false
false
false
false
0
ClearAnimObj(void) { register anim_t *obj; /* Leggo la lista al contrario per cancellare correttamente tutto */ for (obj = (anim_t *) DrawList.pTailPred; obj->node.mpPrev; obj = (anim_t *) obj->node.mpPrev) { if (obj->bg) { bltchunkybitmap(obj->bg, 0, 0, main_bitmap, obj->x_ba...
false
false
false
false
false
0
vg_rule_add_tool (VgRule *rule, const char *tool) { VgTool *tail, *n; n = g_new (VgTool, 1); n->next = NULL; n->name = vg_strdup (tool); tail = (VgTool *) &rule->tools; while (tail->next != NULL) tail = tail->next; tail->next = n; }
false
false
false
false
false
0
flute_freq_free(flute_freq_susp_type susp) { deleteInstrument(susp->myflute); sound_unref(susp->breath_env); sound_unref(susp->freq_env); ffree_generic(susp, sizeof(flute_freq_susp_node), "flute_freq_free"); }
false
false
false
false
false
0
item_set_info_free (gpointer data) { item_set_info_args *args = data; g_assert (data); g_free (args->path); if (args->session) gkr_session_unref (args->session); gnome_keyring_item_info_free (args->info); g_slice_free (item_set_info_args, args); }
false
false
false
false
false
0
str_char (lua_State *L) { int n = lua_gettop(L); /* number of arguments */ int i; luaL_Buffer b; luaL_buffinit(L, &b); for (i=1; i<=n; i++) { int c = luaL_checkint(L, i); luaL_argcheck(L, uchar(c) == c, i, "invalid value"); luaL_putchar(&b, uchar(c)); } luaL_pushresult(&b); return 1; }
false
false
false
false
false
0
ibvs_cpu_write( IN ibvs_t* const p_ibvs, IN uint16_t lid, IN uint8_t size, IN uint8_t cpu_traget_size, IN uint32_t data[], IN uint32_t address) { ib_api_status_t status; osm_madw_t *p_madw_arr[1]; ib_vs_t res_mad; OSM_LOG_ENTER(&(IbisObj.log)); __ibvs_prep_ext_port_access_mad( p_...
false
false
false
false
false
0
_tenEMBimodalIterate(tenEMBimodalParm *biparm) { static const char me[]="_tenEMBimodalIterate"; double om1, os1, om2, os2, of1, m1, s1, m2, s2, f1; /* copy old values */ om1 = biparm->mean1; os1 = biparm->stdv1; of1 = biparm->fraction1; om2 = biparm->mean2; os2 = biparm->stdv2; /* find new values, a...
false
false
false
false
false
0
loc_buildplace( Figure ) schfig_list *Figure; { scpcol_list *Column; scpcol_list *MaxColumn; MaxColumn = loc_buildplacefirst( Figure ); for ( Column = MaxColumn; Column->NEXT; Column = Column->NEXT ) { loc_buildplaceout( Figure, Column, Column->NEXT ); } HEAD_SCPCOL = (scpcol_list *)revers...
false
false
false
false
false
0
locate_sos_marker() { int c; c = process_markers(); if (c == M_EOI) { return JPGD_FALSE; } else if (c != M_SOS) { stop_decoding(JPGD_UNEXPECTED_MARKER); } read_sos_marker(); return JPGD_TRUE; }
false
false
false
false
false
0
ximageutil_xcontext_clear (GstXContext * xcontext) { g_return_if_fail (xcontext != NULL); if (xcontext->caps != NULL) gst_caps_unref (xcontext->caps); if (xcontext->par) { g_value_unset (xcontext->par); g_free (xcontext->par); } XCloseDisplay (xcontext->disp); g_free (xcontext); }
false
false
false
false
false
0
setup_ikconfig(char *config) { char *ent, *tokptr; struct ikconfig_list *new; ikconfig_all = calloc(1, sizeof(struct ikconfig_list) * IKCONFIG_MAX); if (!ikconfig_all) { error(WARNING, "cannot calloc for ikconfig entries.\n"); return 0; } ent = strtok_r(config, "\n", &tokptr); while (ent) { while (white...
false
false
false
false
false
0
kvp_frame_set_slot_path_gslist (KvpFrame *frame, const KvpValue *new_value, GSList *key_path) { if (!frame || !key_path) return; while (TRUE) { const char *key = key_path->data; KvpValue *value; if (!key) r...
false
false
false
false
false
0
onMouseButtonDown(MouseEventArgs& e) { // default processing (this is now essential as it controls event firing). Window::onMouseButtonDown(e); if (e.button == LeftButton) { if (isSizingEnabled()) { // get position of mouse as co-ordinates local to this window. Point localPos(CoordConverter::screenToWind...
false
false
false
false
false
0
bfa_cb_sfp_show(struct bfa_sfp_s *sfp) { bfa_trc(sfp, sfp->lock); if (sfp->cbfn) sfp->cbfn(sfp->cbarg, sfp->status); sfp->lock = 0; sfp->cbfn = NULL; }
false
false
false
false
false
0
gst_ring_buffer_debug_spec_buff (GstRingBufferSpec * spec) { GST_DEBUG ("acquire ringbuffer: buffer time: %" G_GINT64_FORMAT " usec", spec->buffer_time); GST_DEBUG ("acquire ringbuffer: latency time: %" G_GINT64_FORMAT " usec", spec->latency_time); GST_DEBUG ("acquire ringbuffer: total segments: %d", ...
false
false
false
false
false
0
SyfFsmGetMustangOut( FsmFigure ) fsmfig_list *FsmFigure; { syfinfo *SyfInfo; long *OutWeightArray; fsmout_list *ScanOut; fsmstate_list *ScanState; fsmlocout_list *ScanLocout; long NumberState; long NumberOut; long IndexState; long Ind...
false
false
false
false
false
0
check_use_entry_in_element(Element *curr, Def_use_table *def) { int i; if (curr->enabled == FALSE) return; for (i = 0; i < 3; i++) { if (curr->ses[i]->enabled && check_use_entry_in_sub_data(curr->ses[i]->range, def)) { range_is_not_enabled (curr->ses[i], curr); } } if (curr->next_dim) {...
false
false
false
false
false
0
gst_update_registry (void) { gboolean res; #ifndef GST_DISABLE_REGISTRY GError *err = NULL; res = ensure_current_registry (&err); if (err) { GST_WARNING ("registry update failed: %s", err->message); g_error_free (err); } else { GST_LOG ("registry update succeeded"); } #else GST_WARNING ("re...
false
false
false
false
false
0
_elm_image_smart_load_size_set(Evas_Object *obj, int size) { ELM_IMAGE_DATA_GET(obj, sd); sd->load_size = size; if (!sd->img || sd->edje) return; evas_object_image_load_size_set(sd->img, sd->load_size, sd->load_size); }
false
false
false
false
false
0
WriteMakeRule(std::ostream& os, const char* comment, const char* target, const std::vector<std::string>& depends, const std::vector<std::string>& commands, bool symbolic, bool in_help) { // Make sure there is a target. i...
false
false
false
false
false
0
putString(const char *stringVal) { errorFlag = EC_Normal; /* check for an empty string parameter */ if ((stringVal != NULL) && (strlen(stringVal) > 0)) putValue(stringVal, strlen(stringVal)); else putValue(NULL, 0); /* make sure that extra padding is removed from the string */ fS...
false
false
false
false
false
0
ADIOI_Complete_async(int *error_code) { /* complete all outstanding async I/O operations so that new ones can be initiated. Remove them all from async_list. */ ADIO_Status status; ADIO_Request *request; ADIOI_Async_node *tmp; if (!ADIOI_Async_list_head) *error_code = MPI_SUCCESS; while (ADIOI_A...
false
false
false
false
false
0
get_line_offset_in_equivalent_spaces (GtkSourceView *view, GtkTextIter *iter) { GtkTextIter i; gint tab_width; gint n = 0; tab_width = view->priv->tab_width; i = *iter; gtk_text_iter_set_line_offset (&i, 0); while (!gtk_text_iter_equal (&i, iter)) { gunichar c; c = gtk_text_iter_get_char (&i);...
false
false
false
false
false
0
operator+=( AbstractCommandPtr aCommand ) throw( CommandFrameException ) { GUARD; if( aCommand != NULLPTR ) { theCommands.push_back( aCommand ); } else { throw CommandFrameException( LOCATION ); } return ( *this ); }
false
false
false
false
false
0
get_dbinfo(krb5_context context, const krb5_config_binding *db_binding, const char *label, struct hdb_dbinfo **db) { struct hdb_dbinfo *di; const char *p; *db = NULL; p = krb5_config_get_string(context, db_binding, "dbname", NULL); if(p == NULL) return 0; di = calloc(1, sizeof(*d...
false
false
false
false
false
0
snd_asihpi_sampleclock_add(struct snd_card_asihpi *asihpi, struct hpi_control *hpi_ctl) { struct snd_card *card; struct snd_kcontrol_new snd_control; struct clk_cache *clkcache; u32 hSC = hpi_ctl->h_control; int has_aes_in = 0; int i, j; u16 source; if (snd_BUG_ON(!asihpi)) return -EINVAL; card ...
false
false
false
false
false
0
append_basis_states (unsigned basis_states, wfa_t *wfa, coding_t *c) /* * Append the WFA basis states 0, ... , ('basis_states' - 1). * * No return value. * * Side effects: * The WFA information are updated in structure 'wfa' * State images and inner products are computed (in 'c') */ { unsigned level, stat...
false
false
false
false
false
0
convertseries(StackInfo *si) { Series newtop = NULL; Object subo; int i; double seriespos = 0.0; newtop = DXNewSeries(); if (!newtop) goto error; for (i=0, seriespos = 0.0; (subo=DXGetEnumeratedMember((Group)si->thisobj, i, NULL)); i++, seriespos += 1.0) if (!DXSetSeriesMember(n...
false
false
false
false
false
0
gnumeric_r_dpois (GnmFuncEvalInfo *ei, GnmValue const * const *args) { gnm_float x = value_get_as_float (args[0]); gnm_float lambda = value_get_as_float (args[1]); gboolean give_log = args[2] ? value_get_as_checked_bool (args[2]) : FALSE; return value_new_float (dpois (x, lambda, give_log)); }
false
false
false
false
false
0
fprintch(strom,ch) truc strom; int ch; { ifun writech; writech = putcfun(strom); if(STREAMpos(strom) >= PrintCols || ch == EOL) { writech(EOL); STREAMpos(strom) = 0; } if(ch != EOL) { writech(ch); STREAMpos(strom) += 1; } return(STREAMpos(strom)); }
false
false
false
false
false
0
setgain(struct gspca_dev *gspca_dev) { struct sd *sd = (struct sd *) gspca_dev; if (sd->sensor == SENSOR_PO2030N) { u8 rgain[] = /* 15: gain */ {0xa1, 0x6e, 0x15, 0x00, 0x40, 0x00, 0x00, 0x15}; rgain[3] = gspca_dev->gain->val; i2c_w8(gspca_dev, rgain); } }
false
false
false
false
false
0
drbg_hash_df(struct drbg_state *drbg, unsigned char *outval, size_t outlen, struct list_head *entropylist) { int ret = 0; size_t len = 0; unsigned char input[5]; unsigned char *tmp = drbg->scratchpad + drbg_statelen(drbg); struct drbg_string data; /* 10.4.1 step 3 */ input[0] = 1; drbg_cpu_to_be32((outle...
true
true
false
false
false
1
rectangle_end_line( int y ) { size_t i; struct rectangle *ptr; for( i = 0; i < rectangle_active_count; i++ ) { /* Skip if this rectangle was updated this line */ if( rectangle_active[i].y + rectangle_active[i].h == y + 1 ) continue; if ( settings_current.frame_rate > 1 && compare_and_merge_rectan...
false
false
false
false
false
0
create(const IPDBSession &PDBSession, std::unique_ptr<IPDBRawSymbol> Symbol) { switch (Symbol->getSymTag()) { FACTORY_SYMTAG_CASE(Exe, PDBSymbolExe) FACTORY_SYMTAG_CASE(Compiland, PDBSymbolCompiland) FACTORY_SYMTAG_CASE(CompilandDetails, PDBSymbolCompilandDetails) FACTORY_SYMTAG_CASE...
false
false
false
false
false
0
check_depth(Window win, Window top, int doall) { XWindowAttributes attr, *pattr; /* first see if it is (still) a valid window: */ MV_count++; if (cache_win > 0.0) { pattr = vw_lookup(win); if (pattr == NULL) { return 1; /* indicate done */ } } else { if (! valid_window(win, &attr, 1)) { return 1; /*...
false
false
false
false
false
0
_pilPAFHeaderCreate(const char *name, const char *type, const char *id, const char *desc) { PilList *hdr = newPilList(); if (hdr) { _pilPAFAppend(hdr, PAF_HDR_START, PAF_TYPE_NONE, NULL, NULL); _pilPAFAppend(hdr, PAF_TYPE, PAF_TYPE_STRING, type, "Type ...
false
false
false
false
false
0
is_operand(const char *w, double *operand_value) { double value; if (w[0] == '"' && w[strlen(w) - 1] == '"') { return STRING; } else if (rpn_which_function(w)) { return FUNCTION; } else if (!strcmp(w, "x") || !strcmp(w, "y") || !strcmp(w, "z") || !strcmp(w, "u") || !strcmp(w, "v") ...
false
false
false
false
false
0
loadConfig_sensorSpecific( const mrpt::utils::CConfigFileBase &configSource, const std::string &iniSection ) { m_sensorPose = CPose3D( configSource.read_float(iniSection,"pose_x",0), configSource.read_float(iniSection,"pose_y",0), configSource.read_float(iniSection,"pose_z",0), DEG2RAD( configSource.read_f...
false
false
false
false
false
0
snd_ice1712_ews88mt_input_sense_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); struct ews_spec *spec = ice->spec; int channel = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); unsigned char data, ndata; if (snd_BUG_ON(channel < 0 || c...
false
false
false
false
false
0
remove0blocks(unsigned char *pIn, int *inSize) { long long *in = (long long *)pIn; long long *out = (long long *)pIn; int i; for (i = 0; i < *inSize; i += 8, in++) /* Skip 8 byte blocks of all 0 */ if (*in) *out++ = *in; *inSize -= (in - out) * 8; }
false
false
false
false
false
0
f_winwidth(argvars, rettv) typval_T *argvars; typval_T *rettv; { win_T *wp; wp = find_win_by_nr(&argvars[0], NULL); if (wp == NULL) rettv->vval.v_number = -1; else #ifdef FEAT_VERTSPLIT rettv->vval.v_number = wp->w_width; #else rettv->vval.v_number = Columns; #endif }
false
false
false
false
false
0
__checkVertex(const size_t& n) { if ((n == 0) or (n > (*__vertices).numberOfVertices())) { throw MeshReaderAM_FMTFormat::VertexError(); } }
false
false
false
false
false
0
inflate_unzip_internal(STATE_PARAM transformer_state_t *xstate) { IF_DESKTOP(long long) int n = 0; ssize_t nwrote; /* Allocate all global buffers (for DYN_ALLOC option) */ gunzip_window = xmalloc(GUNZIP_WSIZE); gunzip_outbuf_count = 0; gunzip_bytes_out = 0; gunzip_src_fd = xstate->src_fd; /* (re) initialize s...
false
false
false
false
false
0
x_list_append (x_list_t *list, void *data) { x_list_t *new_list; x_list_t *last; new_list = _x_list_alloc (); new_list->data = data; if (list) { last = x_list_last (list); /* g_assert (last != NULL); */ last->next = new_list; new_list->prev = last; return list; } else { return new_list; } }
false
false
false
false
false
0