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
dump_padding(packet_t *pkt) { char holder[PADDING_SIZE]; int bytes; /* Set the layer */ set_layer(LAYER_APPLICATION); /* display announcement */ display_header_banner("Padding"); /* The rest of the packet is padding, so lets grab the whole thing */ skip_packet_toapparentend(pkt); bytes = get_p...
true
true
false
false
false
1
si4713_set_rds_radio_text(struct si4713_device *sdev, const char *rt) { static const char cr[RDS_RADIOTEXT_BLK_SIZE] = { RDS_CARRIAGE_RETURN, 0 }; int rval = 0, i; u16 t_index = 0; u8 b_index = 0, cr_inserted = 0; s8 left; if (!sdev->power_state) return rval; rval = si4713_tx_rds_buff(sdev, RDS_BLOCK_CLEAR, ...
false
false
false
false
false
0
gmutil_copyVectorIntoArray(GM_BVECT& SRC, bool* dest, edge_t* ind) { #pragma omp parallel for //for(size_t i = 0; i < SRC.size(); i++) dest[(ind==NULL)?i:ind[i]] = SRC[i]; for(size_t i = 0; i < SRC.size(); i++) dest[i] = SRC[(ind==NULL)?i:ind[i]]; }
false
false
false
false
false
0
ASC_ConnectAssociation(Association* assoc, const std::string& peerTitle, const std::string& peer, int port, const std::string& ouraet, const char *abstractSyntax, int lossy) { CONDITION cond; T_ASC_Parameters *params; bool bProposeCompression = assoc->GetProposeCompression(); DIC_NODENAME peerHost; DIC_N...
false
false
false
false
false
0
freeSomeMemory(dataBufType *buf) { register fdInfoType *info; register int i; register long freed=0; register int thresh; #define toss(x) { freed+=(x).bufSize; bufFree(&(x)); } /* First, toss any empty output buffers */ for (i=lowFd,info=fdInfo+lowFd; i<=highFd; info++,i++) if (buf != &info->o...
false
false
false
false
false
0
CU_console_run_tests(void) { /* * To avoid user from cribbing about the output not coming onto * screen at the moment of SIGSEGV. */ setvbuf(stdout, NULL, _IONBF, 0); setvbuf(stderr, NULL, _IONBF, 0); fprintf(stdout, "\n\n %s" CU_VERSION "\n %s\n", ...
false
false
false
false
false
0
read_image_block (pixma_t * s, uint8_t * data, unsigned size) { int error; unsigned maxchunksize, chunksize, count = 0; maxchunksize = MAX_CHUNK_SIZE * ((s->cfg->pid == MF3010_PID || s->cfg->pid == MF4410_PID || s->cfg->pid == MF4770_PID |...
false
false
false
false
false
0
bnad_lock_init(struct bnad *bnad) { spin_lock_init(&bnad->bna_lock); mutex_init(&bnad->conf_mutex); mutex_init(&bnad_list_mutex); }
false
false
false
false
false
0
find_num(const char * buf) { char *ptr; ptr = (char*)buf; while(!isspace(*ptr)) /* first space */ { if(*ptr == '\0') return 0; ptr++; } ptr++; while(!isspace(*ptr)) /* second space */ { if(*ptr == '\0') return 0; ptr++; } ptr++; return atoi(ptr); }
false
false
false
false
true
1
AddXmlChartOptions() { const std::vector <ChartTranslationOptions*> xmlChartOptionsList = m_source.GetXmlChartTranslationOptions(); IFVERBOSE(2) { cerr << "AddXmlChartOptions " << xmlChartOptionsList.size() << endl; } if (xmlChartOptionsList.size() == 0) return; for(std::vector<ChartTranslationOptions*>::const...
false
false
false
false
false
0
bcm5600_is_bpdu(n_eth_addr_t *m) { /* PVST+ */ if (!memcmp(m,"\x01\x00\x0c\xcc\xcc\xcd",6)) return(TRUE); /* Classical 802.1D */ if (!memcmp(m,"\x01\x80\xc2\x00\x00",5) && !(m->eth_addr_byte[5] & 0xF0)) return(TRUE); /* * CDP: this is cleary a hack, but IOS seems to program this addres...
false
false
false
false
false
0
findInStaticStore(const TransliteratorSpec& src, const TransliteratorSpec& trg, const UnicodeString& variant) { TransliteratorEntry* entry = 0; if (src.isLocale()) { entry = findInBundle(src, trg, variant, ...
false
false
false
false
false
0
sp2sp(double *arrayIn, int truncIn, double *arrayOut, int truncOut) { int n, m; if ( truncOut <= truncIn ) { for ( n = 0; n <= truncOut; n++ ) { for ( m = n; m <= truncOut; m++ ) { *arrayOut++ = *arrayIn++ ; *arrayOut++ = *arrayIn++ ; } arrayIn += 2 * (truncIn-truncOut); }...
false
false
false
false
false
0
gst_matroska_parse_accumulate_streamheader (GstMatroskaParse * parse, GstBuffer * buffer) { if (parse->pushed_headers) { GST_WARNING_OBJECT (parse, "Accumulating headers, but headers are already pushed"); } if (parse->streamheader) { parse->streamheader = gst_buffer_append (parse->streamheade...
false
false
false
false
false
0
do_remove_conflicting_framebuffers(struct apertures_struct *a, const char *name, bool primary) { int i, ret; /* check all firmware fbs and kick off if the base addr overlaps */ for (i = 0 ; i < FB_MAX; i++) { struct apertures_struct *gen_aper; if (!registered_fb[i]) continue; if (!(registered_f...
false
false
false
false
false
0
method_83(const int *account, int *weight) { // var a: number2Array("0007654320", weight); if (AccountNumberCheck::OK == algo01(11, weight, false, 10, account)) return AccountNumberCheck::OK; // var b: number2Array("0000654320", weight); if (AccountNumberCheck::OK == algo01(11, weight, false, ...
false
false
false
false
false
0
gm_conf_entry_get_type (GmConfEntry *entry) { GConfEntry *gconf_entry = NULL; g_return_val_if_fail (entry != NULL, GM_CONF_OTHER); gconf_entry = (GConfEntry *)entry; if (gconf_entry->value == NULL) return GM_CONF_OTHER; switch (gconf_entry->value->type) { case GCONF_VALUE_BOOL: return GM_...
false
false
false
false
false
0
e_tree_table_adapter_save_expanded_state_xml (ETreeTableAdapter *etta) { TreeAndRoot tar; xmlDocPtr doc; xmlNode *root; g_return_val_if_fail (E_IS_TREE_TABLE_ADAPTER (etta), NULL); doc = xmlNewDoc ((const guchar *)"1.0"); root = xmlNewDocNode (doc, NULL, (const guchar *)"expanded_state", NULL); xmlDocSetRootEl...
false
false
false
false
false
0
file_parse_test() { FILE *f = fopen("tmp.json", "w"); char result[300]; struct _ojcErr err; ojcVal val; fwrite(bench_json, sizeof(bench_json) - 1, 1, f); fclose(f); ojc_err_init(&err); f = fopen("tmp.json", "r"); val = ojc_parse_stream(&err, f, 0, 0); fclose(f); if (ut_h...
false
false
false
false
false
0
set(const char *buf) { char *oldval = new char[maxsize]; if (options & RAW_BYTES) { memcpy(oldval, val, maxsize); memcpy(val, buf, maxsize); } else { strncpy(oldval, val, maxsize); oldval[maxsize - 1] = 0; strncpy(val, buf, maxsize); val[maxsize - 1] = 0; } if (handler) { // the h...
false
false
false
false
false
0
AddCallback(audio_callback_f callback, void *userdata) { SDL_bool callbackAdded = SDL_FALSE; SDL_LockAudio(); for (int i=0; i<MAX_AUDIO_CALLBACKS;i++) { if (callbacks[i]==NULL) { userdatas[i]=userdata; callbacks[i]=callback; callbackAdded = SDL_TRUE; break; } } SDL_UnlockAudio(); if (!callback...
false
false
false
false
false
0
trace_cache_expand (unw_trace_cache_t *cache) { size_t old_size = (1u << cache->log_size); size_t new_log_size = cache->log_size + 2; unw_tdep_frame_t *new_frames = trace_cache_buckets (1u << new_log_size); if (unlikely(! new_frames)) { Debug(5, "failed to expand cache to 2^%lu buckets\n", new_log_size);...
false
false
false
false
false
0
AddDeviceInternal(string Name, uint32_t DeviceID, guint8 TunerIndex) { THDHomeRunDevice *Prev = NULL; THDHomeRunDevice *P = DeviceList; while (P) { if (P->DeviceID < DeviceID) { Prev = P; P = P->Next; continue; } if (P->DeviceID > DeviceID) { break; } if (P->TunerIndex < TunerIndex) { Prev...
false
false
false
false
false
0
getRawHeightFieldValue(int x,int y) const { btScalar val = 0.f; switch (m_heightDataType) { case PHY_FLOAT: { val = m_heightfieldDataFloat[(y*m_heightStickWidth)+x]; break; } case PHY_UCHAR: { unsigned char heightFieldValue = m_heightfieldDataUnsignedChar[(y*m_heightStickWidth)+x]; val = heightF...
false
false
false
false
false
0
rpc_clnt_connection_init (struct rpc_clnt *clnt, glusterfs_ctx_t *ctx, dict_t *options, char *name) { int ret = -1; rpc_clnt_connection_t *conn = NULL; conn = &clnt->conn; pthread_mutex_init (&clnt->conn.lock, NULL); ret = dict_get_...
false
false
false
false
false
0
load_libs(JNIEnv *env, jclass main_class) { jmethodID mid; mid = (*env)->GetStaticMethodID(env, main_class, "loadLib", "()V"); if (mid != NULL) { (*env)->CallStaticVoidMethod(env, main_class, mid); if( (*env)->ExceptionOccurred(env)) { (*env)->ExceptionDescribe(env); return 1; ...
false
false
false
false
false
0
gfm_server_group_info_remove(struct peer *peer, int from_client, int skip) { char *groupname; gfarm_error_t e; struct user *user = peer_get_user(peer); static const char diag[] = "GFM_PROTO_GROUP_INFO_REMOVE"; e = gfm_server_get_request(peer, diag, "s", &groupname); if (e != GFARM_ERR_NO_ERROR) { gflog_debug(G...
false
false
false
false
false
0
extract_alpha (CogFrame * frame, void *_dest, int component, int j) { uint8_t *dest = _dest; uint8_t *src; int i; src = COG_FRAME_DATA_GET_LINE (frame->virt_frame1->components + 0, j); for (i = 0; i < frame->width; i++) { dest[i] = src[i * 4 + 0]; } }
false
false
false
false
false
0
gst_base_parse_set_index (GstElement * element, GstIndex * index) { GstBaseParse *parse = GST_BASE_PARSE (element); GST_BASE_PARSE_INDEX_LOCK (parse); if (parse->priv->index) gst_object_unref (parse->priv->index); if (index) { parse->priv->index = gst_object_ref (index); gst_index_get_writer_id (in...
false
false
false
false
false
0
GMT_i0 (double x) { /* Modified from code in Press et al. */ double y, res; if (x < 0.0) x = -x; if (x < 3.75) { y = x * x / 14.0625; res = 1.0 + y * (3.5156229 + y * (3.0899424 + y * (1.2067492 + y * (0.2659732 + y * (0.360768e-1 + y * 0.45813e-2))))); } else { y = 3.75 / x; res = (exp (x) / sqrt (x)) *...
false
false
false
false
false
0
print_login_issue(const char *issue_file, const char *tty) { FILE *fp; int c; char buf[256+1]; const char *outbuf; time_t t; struct utsname uts; time(&t); uname(&uts); puts("\r"); /* start a new line */ fp = fopen_for_read(issue_file); if (!fp) return; while ((c = fgetc(fp)) != EOF) { outbuf = buf; ...
true
true
false
false
true
1
symlispcall_no_event(object sym, object *base, int narg) { DEBUG_AVMA object fun = symbol_function(sym); vs_base = base; vs_top = vs_base + narg; if (fun == OBJNULL) FEerror("Undefined function.", 0); switch (type_of(fun)) { case t_cfun: (*fun->cf.cf_self)(); break; case t_cclosure: { object ...
false
false
false
false
false
0
ftdi_dtr_rts(struct usb_serial_port *port, int on) { struct ftdi_private *priv = usb_get_serial_port_data(port); /* Disable flow control */ if (!on) { if (usb_control_msg(port->serial->dev, usb_sndctrlpipe(port->serial->dev, 0), FTDI_SIO_SET_FLOW_CTRL_REQUEST, FTDI_SIO_SET_FLOW_CTRL_REQUEST_T...
false
false
false
false
false
0
ttest(pairs) int pairs; { check_options(); /* make sure no options are NULL */ /* * MUST have "cm": cursor motion. */ if (*T_CM == NUL) EMSG(_("E437: terminal capability \"cm\" required")); /* * if "cs" defined, use a scroll region, it's faster. */ if (*T_CS != NUL) ...
false
false
false
false
false
0
plcntr(PLFLT (*f2eval) (PLINT, PLINT, PLPointer), PLPointer f2eval_data, PLINT nx, PLINT ny, PLINT kx, PLINT lx, PLINT ky, PLINT ly, PLFLT flev, PLINT **ipts, void (*pltr) (PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer), PLPointer pltr_data) { PLINT kcol, krow, lastindex; PLFLT di...
true
true
false
false
false
1
swrite_result(int s,int cmd,int res,int err,const void* add1,int addsize1,const void* add2,int addsize2) { header_t header; header.cmd = cmd; header.size = sizeof(res) + sizeof(err) + addsize1 + addsize2; if(!swrite(s,&header,sizeof(header))) return -1; if(!swrite(s,&res,sizeof(res))) return -1; if(!swrite(...
false
false
false
false
false
0
sge_get_topology(const char* qualified_hostname, lList **lpp) { /* Because the linux topology is a list with an undefined length (each socket could have a differnt amount of cores, so we need for each socket the amount of cores) we put the whole topology in a String value. The format is foll...
false
false
false
false
false
0
addCurves(const std::vector<CoordinateSequence*>& lineList, int leftLoc, int rightLoc) { for (size_t i=0, n=lineList.size(); i<n; ++i) { CoordinateSequence *coords = lineList[i]; addCurve(coords, leftLoc, rightLoc); } }
false
false
false
false
false
0
installAbortHandler() { alternativeStackSize = MINSIGSTKSZ + 128 * 1024; alternativeStack = (char *) malloc(alternativeStackSize); if (alternativeStack == NULL) { fprintf(stderr, "Cannot allocate an alternative with a size of %u bytes!\n", alternativeStackSize); fflush(stderr); abort(); } stack_t stack;...
false
false
false
false
false
0
polish() { DEBUG_BLOCK generateWidgetInfo(); if( m_polished ) return; //do not allow this content to get added to the playlist. At least not for now setPlayableTracks( false ); GpodderServiceView *view = new GpodderServiceView( this ); view->setHeaderHidden( true ); view->set...
false
false
false
false
false
0
save_default_file_cb( GtkWidget *widget, AnypaperWindow *window ) { GtkWidget *dialog, *dialog_error; GtkFileFilter *filterImages, *filterAll; dialog = gtk_file_chooser_dialog_new ("Default file", GTK_WINDOW(window->priv->window), GTK_FILE_CHOOSER_ACTION_SAVE, GTK_STOCK_CANCEL, GTK_...
false
false
false
false
false
0
VEC_safe_set_locstr (vec<locstr> *vp, unsigned int ix, char *str) { if (ix < (*vp).length ()) { if ((*vp)[ix]) { message_with_line (line_no, "repeated operand number %d", ix); have_error = 1; } else (*vp)[ix] = str; } else { while (ix > (*vp).length ()) vp->safe_push (...
false
false
false
false
false
0
quote_postgres(char *arg, bool quote, int lineno) { char *res; size_t length; size_t escaped_len; size_t buffer_len; /* * if quote is false we just need to store things in a descriptor they * will be quoted once they are inserted in a statement */ if (!quote) return arg; else { length = strlen(...
false
false
false
false
false
0
sasl_map_cmp_data(sasl_map_data *dp0, sasl_map_data *dp1) { int rc = 0; if (NULL == dp0) { if (NULL == dp1) { return 0; } else { return -1; } } else { if (NULL == dp1) { return 1; } } rc = PL_strcmp(dp0->name, dp1->name); if (0 != rc) { /* did not match */ return rc; } rc = PL_strcmp(dp0...
false
false
false
false
false
0
registerLanguages() { const QStringList list = KGlobal::dirs()->findAllResources("appdata", QLatin1String( "sounds/*.soundtheme" )); foreach(const QString &soundTheme, list) { QFile file(soundTheme); if (file.open(QIODevice::ReadOnly)) { QDomDocument document; if (document.setContent(&fil...
false
false
false
false
false
0
getCommandString() const { ASCString c; c.format("setResearchGoal ( map, %d, %d )", player, targetTechnologyID ); return c; }
false
false
false
false
false
0
msgport_sync_with_pipe (gint fd) { gchar buffer[1]; while (fd >= 0) { if (MP_READ (fd, buffer, 1) > 0) break; else if (!MP_IS_STATUS_INTR ()) { g_warning ( "%s: Failed to read from pipe: %s", G_STRFUNC, g_strerror (errno)); break; } } }
false
false
false
false
false
0
configure(Vector<String> &conf, ErrorHandler *errh) { if (conf.size() != noutputs()) return errh->error("need %d arguments, one per output port", noutputs()); // leverage IPFilter's parsing Vector<String> new_conf; for (int i = 0; i < conf.size(); i++) new_conf.push_back(String(i) + " " + conf[i]); ...
false
false
false
false
false
0
iscsit_get_pdu_holder( struct iscsi_cmd *cmd, u32 offset, u32 length) { u32 i; struct iscsi_pdu *pdu = NULL; if (!cmd->pdu_list) { pr_err("struct iscsi_cmd->pdu_list is NULL!\n"); return NULL; } pdu = &cmd->pdu_list[0]; for (i = 0; i < cmd->pdu_count; i++) if ((pdu[i].offset == offset) && (pdu[i].leng...
false
false
false
false
false
0
TerminateSymbolTable() { unsigned int i; if ( symbol_table ) { for ( i = 0; i < n_symbol_entry; ++i ) free( symbol_table[ i ] ); free( symbol_table ); n_symbol_entry = 0; symbol_table = NULL; } }
false
false
false
false
false
0
evas_smart_callbacks_descriptions_get(const Evas_Smart *s, unsigned int *count) { MAGIC_CHECK(s, Evas_Smart, MAGIC_SMART); if (count) *count = 0; return NULL; MAGIC_CHECK_END(); if (count) *count = s->callbacks.size; return s->callbacks.array; }
false
false
false
false
false
0
scsi_error(struct sg_io_hdr *hdr) { /* Treat SG_ERR here to get rid of sg_err.[ch] */ hdr->status &= 0x7e; if ( (hdr->status == 0) && (hdr->host_status == 0) && (hdr->driver_status == 0) ) { return 0; } if ( (hdr->status == SCSI_CHECK_CONDITION) || (hdr->status == SCSI_COMMAND_TERMINATED...
false
false
false
false
false
0
pixDisplayDiffBinary(PIX *pix1, PIX *pix2) { l_int32 w, h; PIX *pixt, *pixd; PIXCMAP *cmap; PROCNAME("pixDisplayDiffBinary"); if (!pix1 || !pix2) return (PIX *)ERROR_PTR("pix1, pix2 not both defined", procName, NULL); if (!pixSizesEqual(pix1, pix2)) return (P...
false
false
false
false
false
0
xenvif_write_io_ring(struct file *filp, const char __user *buf, size_t count, loff_t *ppos) { struct xenvif_queue *queue = ((struct seq_file *)filp->private_data)->private; int len; char write[BUFFER_SIZE]; /* don't allow partial writes and check the length */ if (*ppos != 0) return 0; if (count >= si...
false
false
false
false
false
0
process_blob(struct blob *blob, struct object_array *p, struct name_path *path, const char *name) { struct object *obj = &blob->object; if (obj->flags & SEEN) return; obj->flags |= SEEN; /* Nothing to do, really .. The blob lookup was the important part */ }
false
false
false
false
false
0
r8712_set_802_11_disassociate(struct _adapter *padapter) { unsigned long irqL; struct mlme_priv *pmlmepriv = &padapter->mlmepriv; spin_lock_irqsave(&pmlmepriv->lock, irqL); if (check_fwstate(pmlmepriv, _FW_LINKED)) { r8712_disassoc_cmd(padapter); r8712_ind_disconnect(padapter); r8712_free_assoc_resources(pad...
false
false
false
false
false
0
save_profile (GtrProfileManager *manager, GtrProfile *profile, xmlNodePtr parent) { xmlNodePtr profile_node; profile_node = xmlNewChild (parent, NULL, (const xmlChar *)"profile", NULL); if (manager->priv->active_profile == profile) xmlSetProp (profile_node, (const ...
false
false
false
false
false
0
Need_Local_Data() const { if( m_state.remote_interested && !bitfield.IsFull()){ if( BTCONTENT.IsFull() ) return 1; // i am seed BitField tmpBitfield = *BTCONTENT.pBF; tmpBitfield.Except(bitfield); return tmpBitfield.IsEmpty() ? 0 : 1; } return 0; }
false
false
false
false
false
0
revertRide() { ride->freeMemory(); ride->ride(); // force re-load // in case reverted ride has different starttime ride->setStartTime(ride->ride()->startTime()); // Note: this will also signal rideSelected() ride->ride()->emitReverted(); }
false
false
false
false
false
0
ex_swapname(eap) exarg_T *eap; { if (curbuf->b_ml.ml_mfp == NULL || curbuf->b_ml.ml_mfp->mf_fname == NULL) MSG(_("No swap file")); else msg(curbuf->b_ml.ml_mfp->mf_fname); }
false
false
false
false
false
0
us_test_trie_schema_dispatch( us_trie_t *trie, const char *address, const char *types, void *value1, void *US_UNUSED( value2 ) ) { bool r = false; us_trie_node_flags_t flags; int16_t match_len; us_trie_node_id_t match_item; if ( us_trie_find( trie, (us_trie_node_value_t *)address, strlen( addres...
false
true
false
false
false
1
HandleAuraModTotalManaPercentRegen(bool apply, bool /*Real*/) { if (m_modifier.periodictime == 0) { m_modifier.periodictime = 1000; } m_periodicTimer = m_modifier.periodictime; m_isPeriodic = apply; }
false
false
false
false
false
0
mdc_inode_iatt_set_validate(xlator_t *this, inode_t *inode, struct iatt *prebuf, struct iatt *iatt) { int ret = -1; struct md_cache *mdc = NULL; mdc = mdc_inode_prep (this, inode); if (!mdc) goto out; LOCK (&mdc->lock); { ...
false
false
false
false
false
0
getPSResidentFonts() { GooList *names; GooHashIter *iter; GooString *name; GooString *psName; names = new GooList(); lockGlobalParams; psResidentFonts->startIter(&iter); while (psResidentFonts->getNext(&iter, &name, (void **)&psName)) { names->append(psName->copy()); } unlockGlobalParams; ret...
false
false
false
false
false
0
st_button_button_release (ClutterActor *actor, ClutterButtonEvent *event) { StButton *button = ST_BUTTON (actor); StButtonMask mask = ST_BUTTON_MASK_FROM_BUTTON (event->button); if (button->priv->button_mask & mask) { gboolean is_click; is_click = button->priv->gr...
false
false
false
false
false
0
cha_assoc(chasen_cell_t * item, chasen_cell_t * alist) { while (!nullp(alist) && !cha_equal(item, (cha_car(cha_car(alist))))) alist = cha_cdr(alist); return cha_car(alist); }
false
false
false
false
false
0
hugetlb_total_pages(void) { struct hstate *h; unsigned long nr_total_pages = 0; for_each_hstate(h) nr_total_pages += h->nr_huge_pages * pages_per_huge_page(h); return nr_total_pages; }
false
false
false
false
false
0
apply2 (SCM smob, SCM a1, SCM a2) { if (SCM_UNBNDP (a1)) a1 = SCM_BOOL_F; if (SCM_UNBNDP (a2)) a2 = SCM_BOOL_F; return scm_list_2 (a1, a2); }
false
false
false
false
false
0
tcase_set_timeout (TCase *tc, double timeout) { if (timeout >= 0) { char *env = getenv("CK_TIMEOUT_MULTIPLIER"); if (env != NULL) { char * endptr = NULL; double tmp = strtod(env, &endptr); if (tmp >= 0 && endptr != env && (*endptr) == '\0') { timeout = timeout * tmp; } } ...
false
false
false
false
false
0
Oct6100ApiUpdateIntrptStates( IN OUT tPOCT6100_INSTANCE_API f_pApiInstance, IN tPOCT6100_INTERRUPT_FLAGS f_pIntFlags ) { tPOCT6100_API_INTRPT_CONFIG pIntrptConfig; tPOCT6100_API_INTRPT_MANAGE pIntrptManage; pIntrptConfig = &f_pApiInstance->pSharedInfo->IntrptConfig; pIntrptManage = &f_pApiInstance->pSh...
false
false
false
false
false
0
updateFont(Font oldfid_) { MSComposite::updateFont(oldfid_); _fieldValue->font(font()); XSetFont(display(),drawGC(),font()); if (dynamic()==MSTrue) computeSize(); else redraw(); }
false
false
false
false
false
0
graph_recipe_delete(graph_recipe_ty *grp) { trace(("graph_recipe_delete(grp = %p)\n{\n", grp)); assert(grp->reference_count > 0); grp->reference_count--; if (grp->reference_count > 0) { trace(("}\n")); return; } recipe_delete(grp->rp); if (grp->mp) { match_del...
false
false
false
false
false
0
lib3ds_lin1_track_eval(Lib3dsLin1Track *track, Lib3dsFloat *p, Lib3dsFloat t) { Lib3dsLin1Key *k; Lib3dsFloat nt; Lib3dsFloat u; ASSERT(p); if (!track->keyL) { *p=0; return; } if (!track->keyL->next || ((t<track->keyL->tcb.frame) && ((track->flags&LIB3DS_REPEAT) != 0))) { *p = track->keyL->va...
false
false
false
true
false
1
accept(ir_hierarchical_visitor *v) { ir_visitor_status s = v->visit_enter(this); if (s != visit_continue) return (s == visit_continue_with_parent) ? visit_continue : s; s = visit_list_elements(v, &this->signatures, false); return (s == visit_stop) ? s : v->visit_leave(this); }
false
false
false
false
false
0
atxp1_storevcore(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { struct atxp1_data *data = atxp1_update_device(dev); struct i2c_client *client = data->client; int vid, cvid; unsigned long vcore; int err; err = kstrtoul(buf, 10, &vcore); if (err) return err; vcore ...
false
false
false
false
false
0
find_psc (GstByteReader * br) { guint psc_pos = -1, psc; if (!gst_byte_reader_peek_uint24_be (br, &psc)) goto failed; /* Scan for the picture start code (22 bits - 0x0020) */ while ((gst_byte_reader_get_remaining (br) >= 3)) { if (gst_byte_reader_peek_uint24_be (br, &psc) && ((psc & 0xfffffc) ...
false
false
false
false
false
0
AddEstimatedRenderTime( double t, vtkViewport *vp ) { // Add to this prop's estimated render time this->EstimatedRenderTime += t; // Check if the selected index is in range if ( this->SelectedLODIndex < 0 || this->SelectedLODIndex >= this->NumberOfEntries ) { vtkErrorMacro( << "Index out of rang...
false
false
false
false
false
0
removedFromDocument() { HTMLElementImpl::removedFromDocument(); // Since the document doesn't have a base element... // (This will break in the case of multiple base elements, but that's not valid anyway (?)) document()->setBaseURL( KUrl() ); document()->setBaseTarget( QString() ); }
false
false
false
false
false
0
IoSeq_removePrefix(IoSeq *self, IoObject *locals, IoMessage *m) { /*doc Sequence removePrefix(aSequence) If the receiver begins with aSequence, it is removed. Returns self. */ IoSeq *other = IoMessage_locals_seqArgAt_(m, locals, 0); IO_ASSERT_NOT_SYMBOL(self); if (UArray_beginsWith_(DATA(self), DATA(other))) ...
false
false
false
false
false
0
getopt_long ( int argc, char * const argv[], const char *optstring, const struct option *longopts, int *longindex ) { const char *opttext = argv[optind]; const struct option *longopt; int shortopt; enum getopt_argument_requirement has_arg; int option; /* Check for end of argv array */ if ( optind >= argc ) ...
false
false
false
false
false
0
parse_add_keyword(parse_t * parse, const char keyword[]) { const char * * string; ASSERT(parse_is_ok(parse)); ASSERT(keyword!=NULL); if (parse->keyword_nb < KEYWORD_NUMBER) { string = &parse->keyword[parse->keyword_nb]; parse->keyword_nb++; *string = NULL; my_string_set(string,k...
false
false
false
false
false
0
get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { CutXMLStream *stream = CUT_XML_STREAM(object); switch (prop_id) { case PROP_RUN_CONTEXT: g_value_set_object(value, G_OBJECT(stream->run_context)); break...
false
false
false
false
false
0
gst_rtspsrc_skip_item (const gchar * s) { gboolean quoted = FALSE; const gchar *start = s; /* A list item ends at the last non-whitespace character * before a comma which is not inside a quoted-string. Or at * the end of the string. */ while (*s) { if (*s == '"') quoted = !quoted; else i...
false
false
false
false
false
0
client_print_errors (const DatabaseInfo database, ErrorDesc err) { switch (getErrorCode (err)) { case CODE_NO_INDEX: case CODE_FILE_ERROR: fprintf (stderr, "%s: %s\n", program_name, getErrorMessage (err)); punt (database, 1, getErrorMessage (err)); break; case CODE_INVALID_FIELD_CON...
false
false
false
false
false
0
gvbctv3pci_audio(struct bttv *btv, struct v4l2_tuner *t, int set) { unsigned int con; if (!set) { /* Not much to do here */ t->audmode = V4L2_TUNER_MODE_LANG1; t->rxsubchans = V4L2_TUNER_SUB_MONO | V4L2_TUNER_SUB_STEREO | V4L2_TUNER_SUB_LANG1 | V4L2_TUNER_SUB_LANG2; return; } gpio_inout(0x300...
false
false
false
false
false
0
brcmf_cfg80211_get_key(struct wiphy *wiphy, struct net_device *ndev, u8 key_idx, bool pairwise, const u8 *mac_addr, void *cookie, void (*callback) (void *cookie, struct key_params * params)) { struct key_params params; struct brcmf_if *ifp = netdev_priv(ndev); struct brcmf_cfg80211_profile *profile = &if...
false
false
false
false
false
0
d_lite_upto(VALUE self, VALUE max) { VALUE date; RETURN_ENUMERATOR(self, 1, &max); date = self; while (FIX2INT(d_lite_cmp(date, max)) <= 0) { rb_yield(date); date = d_lite_plus(date, INT2FIX(1)); } return self; }
false
false
false
false
false
0
__ecereConstructor_WorkspaceOptionsTab(struct __ecereNameSpace__ecere__com__Instance * this) { struct __ecereNameSpace__ecere__sys__Size __simpleStruct2 = { 220, 0 }; struct __ecereNameSpace__ecere__sys__Point __simpleStruct1 = { 140, 8 }; struct __ecereNameSpace__ecere__sys__Point __simpleStruct0 = { 8, 14 }; struc...
false
false
false
true
false
1
CreateMpqFile(TMPQArchive * ha) { TMPQFile * hf; // Allocate space for TMPQFile hf = ALLOCMEM(TMPQFile, 1); if(hf != NULL) { // Fill the file structure memset(hf, 0, sizeof(TMPQFile)); hf->ha = ha; hf->pStream = NULL; hf->dwMagic = ID_MPQ_FILE; ...
false
false
false
false
false
0
str_remove_quote(string& str) { int len = str.length(); if (len >= 2) { if ((str[0] == '\"' && str[len-1] == '\"') || (str[0] == '\'' && str[len-1] == '\'')) { str.erase(len-1); str.erase(0, 1); } } }
false
false
false
false
false
0
al_init(int4 elemsize, int4 (*comp)()) { LIST *ald; /* new al descriptor */ ald = (LIST *) malloc(sizeof(LIST)); if (ald == 0) { return((LIST *) 0); } ald->al_elemsize = elemsize; ald->al_nelem = 0; ald->al_ltop = 0; ald->al_lbottom = 0; ald->al_comp = comp; return(ald); }
false
false
false
false
false
0
Scm_ListToS32Vector(ScmObj list, int clamp) { int length = Scm_Length(list), i; ScmUVector *vec; ScmObj cp; if (length < 0) Scm_Error("improper list not allowed: %S", list); vec = (ScmUVector*)Scm_MakeS32Vector(length, 0); for (i=0, cp=list; i<length; i++, cp = SCM_CDR(cp)) { ScmInt32 e...
false
false
false
false
false
0
gfire_group_remove_buddy(gfire_group *p_group, guint32 p_buddyid) { if(!p_group) return; GList *cur = p_group->buddies; while(cur) { if(*((guint32*)cur->data) == p_buddyid) { if(p_group->groupid) { guint16 len = gfire_group_proto_create_remove_buddy_from_group(p_group->groupid, *((guint32*)cur->dat...
false
false
false
false
false
0
Display_selected_color(word selection_start,word selection_end) { char str[4]; if (selection_start!=selection_end) strcpy(str," "); else Num2str(selection_start,str,3); Print_in_window(213,106,str,MC_Black,MC_Light); }
true
true
false
false
false
1
gnutls_compression_get_name (gnutls_compression_method_t algorithm) { const char *ret = NULL; /* avoid prefix */ GNUTLS_COMPRESSION_ALG_LOOP (ret = p->name + sizeof ("GNUTLS_COMP_") - 1); return ret; }
false
false
false
false
false
0
clist_image_unknowns(gx_device *dev, const clist_image_enum *pie) { gx_device_clist_writer * const cdev = &((gx_device_clist *)dev)->writer; const gs_imager_state *const pis = pie->pis; uint unknown = 0; /* * Determine if the CTM, color space, and clipping region (and, for * masked im...
false
false
false
false
false
0
mono_networkinterface_list (int *size) { int i = 0, count = 0; void **nilist = NULL; char buf [512]; FILE *f; char name [256]; f = fopen ("/proc/net/dev", "r"); if (!f) return NULL; if (!fgets (buf, sizeof (buf) / sizeof (char), f)) goto out; if (!fgets (buf, sizeof (buf) / sizeof (char), f)) goto ou...
false
false
false
false
false
0
GC_init_linux_data_start(void) { # if defined(LINUX) || defined(HURD) /* Try the easy approaches first: */ if ((ptr_t)__data_start != 0) { GC_data_start = (ptr_t)(__data_start); return; } if ((ptr_t)data_start != 0) { GC_data_start = (ptr_t)(data_start); ...
true
true
false
false
false
1
soup_message_headers_free (SoupMessageHeaders *hdrs) { if (--hdrs->ref_count == 0) { soup_message_headers_clear (hdrs); g_array_free (hdrs->array, TRUE); g_clear_pointer (&hdrs->concat, g_hash_table_destroy); g_slice_free (SoupMessageHeaders, hdrs); } }
false
false
false
false
false
0
dapceparse(char* input, DCEconstraint* constraint, char** errmsgp) { DCEparsestate* state; int errcode = 0; #ifdef PARSEDEBUG dcedebug = 1; #endif if(input != NULL) { #ifdef DEBUG fprintf(stderr,"dceeparse: input=%s\n",input); #endif state = ce_parse_init(input,constraint); if(dceparse(sta...
false
false
false
false
false
0