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
register_timer_ticks(void* this_ptr, bx_timer_handler_t funct, Bit64u ticks, bx_bool continuous, bx_bool active, const char *id) { unsigned i; // If the timer frequency is rediculously low, make it more sane. // This happens when 'ips' is too low. if (ticks < MinAllowableTimerPeriod) { //BX_INFO(("regi...
false
false
false
false
false
0
sanei_hp_device_support_get (const char *devname, HpScl scl, int *minval, int *maxval) {HpDeviceInfo *info; HpSclSupport *sclsupport; int inqid; /* #define HP_TEST_SIMULATE */ #ifdef HP_TEST_SIMULATE if (scl == SCL_BRIGHTNESS) return SANE_STATUS_UNSUPPORTED; if (scl == SCL_CONTRAST)...
false
false
false
false
false
0
createInstance(const Locale & inLocale, UErrorCode& status) { if (U_FAILURE(status)) { return NULL; } UBool nsResolved = TRUE; UBool usingFallback = FALSE; char buffer[ULOC_KEYWORDS_CAPACITY]; int32_t count = inLocale.getKeywordValue("numbers",buffer, sizeof(buffer),status); if ( c...
false
false
false
false
false
0
commitLanguages(const CI18nTranslator& inTranslator){ for(CLanguageList::const_iterator i=mLanguages.begin(); i!=mLanguages.end(); i++){ if(inTranslator.hasLanguage(*i)){ mPreferredLanguage=*i; break; } } }
false
false
false
false
false
0
ScrollSignal(GtkAdjustment *adj, ScintillaGTK *sciThis) { try { #if GTK_CHECK_VERSION(3,0,0) sciThis->ScrollTo(static_cast<int>(gtk_adjustment_get_value(adj)), false); #else sciThis->ScrollTo(static_cast<int>(adj->value), false); #endif } catch (...) { sciThis->errorStatus = SC_STATUS_FAILURE; } }
false
false
false
false
false
0
cert_FreeEntry(void *pool, PLHashEntry *he, PRUintn flag) { SECITEM_FreeItem((SECItem*)(he->value), PR_TRUE); if (flag == HT_FREE_ENTRY) { SECITEM_FreeItem((SECItem*)(he->key), PR_TRUE); PORT_Free(he); } }
false
false
false
false
false
0
print(raw_ostream &OS, const SelectionDAG *G) const { printr(OS, G); for (unsigned i = 0, e = getNumOperands(); i != e; ++i) { if (i) OS << ", "; else OS << " "; printOperand(OS, G, getOperand(i)); } }
false
false
false
false
false
0
shuffle_playlist() { size_t loop; size_t rannum; if(pl.fill >= 2) { /* Refer to bug 1777621 for discussion on that. It's Durstenfeld... */ for (loop = 0; loop < pl.fill; loop++) { struct listitem tmp; rannum = loop + rando(pl.fill-loop); /* Small test on your binary operation skills (^ is XO...
false
false
false
false
false
0
decode_I_options (char *line, char *abbrev, char *name, char *units, char *size, char *comment, double parameters[]) { /* -I<abbrev>/<name>/<units>/<size>/<scale>/<offset>/\"comment\" */ GMT_LONG i = 0, k, error; GMT_LONG pos = 0; char p[BUFSIZ]; while (i < 7 && GMT_strtok (line, "/", &pos, p)) { /* Process the 7...
false
false
false
false
false
0
TI_buildRemoteImages(TI_DBEntry *db, TI_StudyEntry *study, TI_SeriesEntry *series) { TI_GenericCallbackStruct cbs; DcmDataset *query = NULL; OFBool ok = OFTrue; cbs.db = NULL; cbs.study = NULL; cbs.series = series; TI_destroyImageEntries(series); /* get all known studies */ TI_buildIm...
false
false
false
false
false
0
carl9170_debugfs_write(struct file *file, const char __user *userbuf, size_t count, loff_t *ppos) { struct carl9170_debugfs_fops *dfops; struct ar9170 *ar; char *buf = NULL; int err = 0; if (!count) return 0; if (count > PAGE_SIZE) return -E2BIG; ar = file->private_data; if (!ar) return -ENODEV; dfo...
false
false
false
false
false
0
remove_quoted_nulls (string) char *string; { register size_t slen; register int i, j, prev_i; DECLARE_MBSTATE; if (strchr (string, CTLNUL) == 0) /* XXX */ return string; /* XXX */ slen = strlen (string); i = j = 0; while (i < slen) { if (string[i] == CTLESC) { /* Old code had...
false
false
false
false
false
0
bxt_a_get_seqno(struct intel_engine_cs *ring, bool lazy_coherency) { /* * On BXT A steppings there is a HW coherency issue whereby the * MI_STORE_DATA_IMM storing the completed request's seqno * occasionally doesn't invalidate the CPU cache. Work around this by * clflushing the corresponding cacheline wheneve...
false
false
false
false
false
0
ck_rhs_map_probe_rm(struct ck_rhs *hs, struct ck_rhs_map *map, unsigned long *n_probes, long *priority, unsigned long h, const void *key, const void **object, unsigned long probe_limit, enum ck_rhs_probe_behavior behavior) { const void *k; const void *compare; long pr = -1; unsigned ...
false
false
false
false
false
0
Echo(struct paRecordData* data, AudBuff *proc_buff, struct audio_effects *aud_eff, int delay_ms, float decay) { int samp=0; SAMPLE out; if(aud_eff->ECHO == NULL) { aud_eff->ECHO = g_new0(delay_data, 1); aud_eff->ECHO->buff_size = (int) delay_ms * data->samprate * 0.001; aud_eff->ECHO->delayBuff1 = g_new0(SA...
false
false
false
false
false
0
Scm_MakeIntegerU(u_long i) { if (i <= (u_long)SCM_SMALL_INT_MAX) return SCM_MAKE_INT(i); else return Scm_MakeBignumFromUI(i); }
false
false
false
false
false
0
mud_connections_connect_cb(GtkWidget *widget, MudConnections *conn) { GList *selected = gtk_icon_view_get_selected_items( GTK_ICON_VIEW(conn->priv->iconview)); GtkTreeIter iter; gchar *buf, *mud_name, *key, *strip_name, *profile, *host, *logon, *char_name; gint port; gchar **mud_tuple; gi...
false
false
false
false
false
0
orte_plm_base_vm_ready(int fd, short args, void *cbdata) { orte_state_caddy_t *caddy = (orte_state_caddy_t*)cbdata; /* progress the job */ caddy->jdata->state = ORTE_JOB_STATE_VM_READY; /* position any required files */ if (ORTE_SUCCESS != orte_filem.preposition_files(caddy->jdata, files_ready, ca...
false
false
false
false
false
0
gt_huffman_encode(const GtHuffman *huffman, unsigned long symbol, GtBitsequence *code, unsigned int *codelength) { gt_assert(huffman != NULL); gt_assert(symbol < huffman->num_of_symbols); *code = huffman->code_tab[symbol].code; *codelength = h...
false
false
false
false
false
0
PrintSelf(std::ostream & os, Indent indent) const { Superclass::PrintSelf(os, indent); os << indent << "LineSearchAccuracy: " << m_LineSearchAccuracy << std::endl; os << indent << "DefaultStepLength: " << m_DefaultStepLength << std::endl; if ( this->m_VnlOptimizer ) { os << indent << "Vnl LBF...
false
false
false
false
false
0
cb_Graph_Complement (wxCommandEvent &event) { Graph *orig = graph; Graph::e_const_iterator eit; Graph::v_const_iterator vit, vit2; undoableAction (_("Complement graph")); graph = new Graph; for (vit = orig->v_begin (); vit != orig->v_end (); ++vit) graph->add (new Vertex (**vit)); // Method: create a new comp...
false
false
false
false
false
0
create_coupling (int fd, int is_pull) { int pipefd[2]; struct coupling *c = malloc(sizeof(struct coupling)); if (!c) return NULL; int r = pipe(pipefd); if (r < 0) return NULL; r = set_nonblock(pipefd[0]); if (r < 0) return NULL; assert(pipefd[0] >= 0); r = set_nonblock(pipefd[1]); if (r < 0) ret...
false
false
false
false
false
0
gribpr(struct grhdr *ghdr) { if (bigflg) { printf ("%6i % 10ld % 3i % 1i % 5i % 4i % 4i %-5i % 10ld % 10ld % 3i ", irec,(long)fpos,ghdr->id,ghdr->gdsflg,ghdr->bmsflg,ghdr->parm,ghdr->ltyp, ghdr->level,(long)ghdr->ldpos,(long)ghdr->lbpos,ghdr->bnum); } else { printf ("%6i % 10ld % 3i % 1i % 5i %...
false
false
false
false
false
0
real_buffer_resync(void) { if(buffermem->justwait) { buffermem->wakeme[XF_WRITER] = TRUE; xfermem_putcmd(buffermem->fd[XF_WRITER], XF_CMD_RESYNC); xfermem_getcmd(buffermem->fd[XF_WRITER], TRUE); } else buffer_sig(SIGINT, TRUE); }
false
false
false
false
false
0
gst_element_factory_list_filter (GList * list, const GstCaps * caps, GstPadDirection direction, gboolean subsetonly) { GQueue results = G_QUEUE_INIT; GST_DEBUG ("finding factories"); /* loop over all the factories */ for (; list; list = list->next) { GstElementFactory *factory; const GList *templa...
false
false
false
false
false
0
test_ev_writefd(void) { int reader_pid; int p[2]; /* make a pipe */ if (pipe(p) == -1) { exit(1); } /* fork off the reader */ switch (reader_pid = fork()) { case 0: /* child */ close(p[1]); test_ev_writefd_consumer(p[0], TEST_EV_WRITEFD_SIZE); exit(0); break; case -...
false
false
false
false
false
0
DumpFreeSpaceMap(int code, Datum arg) { FILE *fp; FsmCacheFileHeader header; FSMRelation *fsmrel; /* Try to create file */ unlink(FSM_CACHE_FILENAME); /* in case it exists w/wrong permissions */ fp = AllocateFile(FSM_CACHE_FILENAME, PG_BINARY_W); if (fp == NULL) { elog(LOG, "could not write \"%s\": %m", ...
false
false
false
false
false
0
fs_lock_taken(fs_backend *be, const char *name) { struct stat junk; char *fn = g_strdup_printf(FS_FILE_LOCK, fs_backend_get_kb(be), fs_backend_get_segment(be), name); int ret = stat(fn, &junk); g_free(fn); if (ret == -1 && errno == ENOENT) { return 0; } return 1; }
false
false
false
false
false
0
doLocking ( const dmtcp::vector<int>& fds ) { errno = 0; JASSERT ( fcntl ( fds[0], F_SETOWN, _real_getpid() ) == 0 ) ( fds[0] ) ( JASSERT_ERRNO ); }
false
false
false
false
false
0
addArg(char *longOption,char shortOption, int has_arg, char type, void *dataPtr, int dataSize, char *help) { myOption_t *o,*p; o = myOptionAlloc(longOption,shortOption,has_arg,type,dataPtr,dataSize, help); if ( ! o ) return 1; if ( ! myargs) myargs = o; else { p = lastOption(myargs); p->next = (void *...
false
false
false
false
false
0
SubVec( double a[3], double b[3], double c[3]) { int i; for( i=0; i < 2; i++ ) c[i] = a[i] - b[i]; }
false
false
false
false
false
0
bch_bbio_count_io_errors(struct cache_set *c, struct bio *bio, int error, const char *m) { struct bbio *b = container_of(bio, struct bbio, bio); struct cache *ca = PTR_CACHE(c, &b->key, 0); unsigned threshold = bio->bi_rw & REQ_WRITE ? c->congested_write_threshold_us : c->congested_read_threshold_us; ...
false
false
false
false
false
0
Scm_NormalizeBignum(ScmBignum *b) { int size = b->size; int i; for (i=size-1; i>0; i--) { if (b->values[i] == 0) size--; else break; } if (i==0) { if (b->sign == 0) { return SCM_MAKE_INT(0); } if (b->sign > 0 && b->values[0] <= (u_long)SCM_SMALL_IN...
false
false
false
false
false
0
StrLower(string in_str) { string thestr = in_str; for (unsigned int i = 0; i < thestr.length(); i++) thestr[i] = tolower(thestr[i]); return thestr; }
false
false
false
false
false
0
brcms_c_ampdu_shm_upd(struct ampdu_info *ampdu) { struct brcms_c_info *wlc = ampdu->wlc; /* * Extend ucode internal watchdog timer to * match larger received frames */ if ((ampdu->rx_factor & IEEE80211_HT_AMPDU_PARM_FACTOR) == IEEE80211_HT_MAX_AMPDU_64K) { brcms_b_write_shm(wlc->hw, M_MIMO_MAXSYM, MIMO...
false
false
false
false
false
0
process_term (int linger_) { terminating = true; register_term_acks (inpipes.size () + outpipes.size ()); for (inpipes_t::iterator it = inpipes.begin (); it != inpipes.end (); ++it) it->reader->terminate (); for (outpipes_t::iterator it = outpipes.begin (); it != outpipes.end (); ...
false
false
false
false
false
0
__GooCanvas_class_init(gpointer gclass, PyTypeObject *pyclass) { PyObject *o; GooCanvasClass *klass = GOO_CANVAS_CLASS(gclass); PyObject *gsignals = PyDict_GetItemString(pyclass->tp_dict, "__gsignals__"); o = PyObject_GetAttrString((PyObject *) pyclass, "do_set_scroll_adjustments"); if (o == NULL) ...
false
false
false
false
false
0
dns_config_find_zone(char *name, int class) { int len, buflen, match_len = -1; char buf[DNS_NAME_MAX]; dns_config_root_t *root; dns_config_zone_t *zone, *candidate = NULL; if ((root = ConfigRoot) == NULL) return NULL; STRLCPY(buf, name, sizeof(buf)); STRLOWER(buf); buflen = str...
true
true
false
false
false
1
befs_count_blocks(struct super_block * sb, befs_data_stream * ds) { befs_blocknr_t blocks; befs_blocknr_t datablocks; /* File data blocks */ befs_blocknr_t metablocks; /* FS metadata blocks */ struct befs_sb_info *befs_sb = BEFS_SB(sb); befs_debug(sb, "---> %s", __func__); datablocks = ds->size >> befs_sb->bloc...
false
false
false
false
false
0
attr_syntax_add_by_oid(const char *oid, struct asyntaxinfo *a, int lock) { if (0 != attr_syntax_init()) return; if (lock) { AS_LOCK_WRITE(oid2asi_lock); } PL_HashTableAdd(oid2asi, oid, a); if (lock) { AS_UNLOCK_WRITE(oid2asi_lock); } }
false
false
false
false
false
0
cgiparse_set_input(Http_method method, FILE *fp, char *buf, unsigned long len, int have_length, CGI_options *options) { CGI_input *in; if (fp == NULL && (!have_length || buf == NULL)) return(NULL); in = ALLOC(CGI_input); in->method = method; in->fp = fp; in->buf = in->ptr = buf; in->length = in-...
false
false
false
false
false
0
sgen_los_update_cardtable_mod_union (void) { LOSObject *obj; for (obj = los_object_list; obj; obj = obj->next) { if (!SGEN_OBJECT_HAS_REFERENCES (obj->data)) continue; sgen_card_table_update_mod_union (get_cardtable_mod_union_for_object (obj), (char*)obj->data, sgen_los_object_size (obj), NULL); } }
false
false
false
false
false
0
createTclEnvironment(Hinst application) { Tcl_SetPanicProc((void (*)(const char *, ...)) WishPanic); // *** Create Tcl-interpreter and register command procedures Tcl_FindExecutable( (char*) application ); Tcl_Interp* interp = Tcl_CreateInterp(); #ifdef TCL_MEM_DEBUG Tcl_InitMemory(interp); #endif // ***...
false
false
false
false
false
0
inf_communication_registry_add_connection(InfCommunicationRegistry* registry, InfXmlConnection* connection) { InfCommunicationRegistryPrivate* priv; gpointer reg; priv = INF_COMMUNICATION_REGISTRY_PRIVATE(registry); reg = g_hash_table_lookup(priv->connections, connecti...
false
false
false
false
false
0
ioeCallback(dummy) XPointer dummy; { ObjRec *objp = ObjList; /* * I/O Error callback function. * Does minimum cleanup -- i.e. saving dictionaries. */ while (objp != NULL) { if (objp->obj->ccWnn.jcbuf != NULL) { jcSaveDic(objp->obj->ccWnn.jcbuf); } objp = objp->next; } }
false
false
false
false
false
0
GetIndex(const_iterator record) const { const_iterator i = begin(); for( int index = 0; i != end(); ++i, index++ ) { if( i == record ) return index; } return -1; }
false
false
false
false
false
0
processData() { if (openElementFlags_.size() > 0 && (openElementFlags_.back() & ignoreData)) return 0; if (!currentElement().declaredEmpty() && currentElement().tryTransitionPcdata()) return 1; else if (openElementFlags_.size() > 0 && (openElementFlags_.back() & condIgnoreData)) return...
false
false
false
false
false
0
rtw_count_tx_stats(struct adapter *padapter, struct xmit_frame *pxmitframe, int sz) { struct sta_info *psta = NULL; struct stainfo_stats *pstats = NULL; struct xmit_priv *pxmitpriv = &padapter->xmitpriv; struct mlme_priv *pmlmepriv = &padapter->mlmepriv; if ((pxmitframe->frame_tag&0x0f) == DATA_FRAMETAG) { pxmi...
false
false
false
false
false
0
readtcp (char *ctptr, char *buf, int len) { struct ct_data *ct = (struct ct_data *)ctptr; struct pollfd fd; int milliseconds = (ct->ct_wait.tv_sec * 1000) + (ct->ct_wait.tv_usec / 1000); if (len == 0) return 0; fd.fd = ct->ct_sock; fd.events = POLLIN; while (TRUE) { switch (__poll(&fd,...
false
false
false
false
false
0
disabled_store(struct class *class, struct class_attribute *attr, const char *buf, size_t count) { long tmp = simple_strtol(buf, NULL, 10); /* * This essentially makes the attribute write-once, since you can't * go back to not having it disabled. This is intentional, it serves * as a system lockdown f...
false
false
false
false
false
0
drawpen(long x0, long y0, long radius) { int x,y,d,deltaE,deltaSE; x = 0; y = radius; d = 1-radius; deltaE = 3; deltaSE = -2 * radius + 5; circlepoints(x,y,x0,y0); while (y > x){ if (d < 0) { d = d + deltaE; deltaE += 2; deltaSE += 2; x++; } else { d+=deltaSE; ...
false
false
false
false
false
0
autosave() { statusBar->clearstatus(); statusBar->status(_("Autosaving...")); autosave_int(); }
false
false
false
false
false
0
length() const { //if downloaded get the duration from the file, else use the value read from the feed if( m_localFile.isNull() ) return m_duration * 1000; return m_localFile->length(); }
false
false
false
false
false
0
NudgeCropPlanesToBounds( int tolPtId[3][4], double planes[3][4], double tol) { for (int dim = 0; dim < 3; dim++) { tolPtId[dim][0] = 0; tolPtId[dim][1] = 1; tolPtId[dim][2] = 2; tolPtId[dim][3] = 3; if (planes[dim][1] - planes[dim][0] < tol) { tolPtId[dim][1] = 0; } if (planes[dim][3] - planes[d...
false
false
false
false
false
0
getp_close_file(VMG_ vm_obj_id_t self, vm_val_t *retval, uint *argc) { static CVmNativeCodeDesc desc(0); /* check arguments */ if (get_prop_check_argc(retval, argc, &desc)) return TRUE; /* make sure we are allowed to perform operations on the file */ ...
false
false
false
false
false
0
val_reply(struct gspca_dev *gspca_dev, const char *reply, int rc) { if (rc < 0) { PERR("reply has error %d", rc); return -EIO; } if (rc != 1) { PERR("Bad reply size %d", rc); return -EIO; } if (reply[0] != 0x08) { PERR("Bad reply 0x%02X", reply[0]); return -EIO; } return 0; }
false
false
false
false
false
0
HtmlImageServerReport(clientData, interp, objc, objv) ClientData clientData; /* The HTML widget data structure */ Tcl_Interp *interp; /* Current interpreter. */ int objc; /* Number of arguments. */ Tcl_Obj *CONST objv[]; /* Argument strings...
false
false
false
false
false
0
get_bg1_tile_info(int tile_index) { /*- BG1 RAM Format -** 2 bytes per tile CCCC TTTT tttt tttt C = Colour Bank (0-15) T = Tile Number (0 - 4095) **- End of Comments -*/ data16_t *tilebase; int tileno; int colbank; tilebase = &wwfwfest_bg1_videoram[tile_index]; tileno = (tileb...
false
false
false
false
false
0
RandomRotorSearchInitialize(unsigned int conformers, unsigned int geomSteps) { if (!_validSetup) return; OBRotorList rl; OBRotamerList rotamers; OBRotorIterator ri; OBRotor *rotor; OBRandom generator; generator.TimeSeed(); _origLogLevel = _loglvl; if (_mol.GetCoordinates()...
false
false
false
false
false
0
lenstr_free( lenstr **l ) { if ( NULL != l && NULL != *l ) { lenstr *tl = *l; if ( tl->ls_buf != NULL ) { slapi_ch_free((void **) &tl->ls_buf ); } slapi_ch_free((void **) l ); } }
false
false
false
false
false
0
gain_buffers (struct scanner *s, int setup) { SANE_Status ret = SANE_STATUS_GOOD; int side; DBG (10, "gain_buffers: start\n"); for(side=0;side<2;side++){ if (s->f_gain[side]) { DBG (15, "gain_buffers: free f_gain %d.\n",side); free(s->f_gain[side]); s->f_gain[side] = NULL; } if...
false
false
false
false
false
0
main_hall_get_name(unsigned int index) { if (index>Main_hall_defines.at(gr_screen.res).size()) { return ""; } else { return Main_hall_defines.at(gr_screen.res).at(index).name; } }
false
false
false
false
false
0
next(int32_t *resultLength, UErrorCode &status) { const UnicodeString *s=snext(status); if(U_SUCCESS(status) && s!=NULL) { unistr=*s; ensureCharsCapacity(unistr.length()+1, status); if(U_SUCCESS(status)) { if(resultLength!=NULL) { *resultLength=unistr.length()...
false
false
false
false
false
0
Set (char *today, int hours, int minutes) { int h = hours; if (mode==CIVIL) { if (hours > 12) { h -= 12; } else if ( hours == 0 ) { h = 12; // midnight is 12:xx } } unsigned long fade = FadeDelay * (1 << (min(4,max(0,FadeRate))) ); Event e; boolean done_fading = false; while...
false
false
false
false
false
0
cat_tail_move(tenm_object *my, double turn_per_frame) { double dx_temp; double dy_temp; /* sanity check */ if (my == NULL) { fprintf(stderr, "cat_tail_move: my is NULL\n"); return 0; } if (turn_per_frame <= 0.5) { fprintf(stderr, "cat_tail_move: strange turn_per_frame (%f)\n", t...
false
false
false
false
false
0
gd_header_button_set_symbolic_icon_name (GdHeaderButton *self, const gchar *symbolic_icon_name) { if (symbolic_icon_name != NULL && !g_str_has_suffix (symbolic_icon_name, "-symbolic")) { g_warning ("gd_header_button_set_symbolic_icon_name was called with " ...
false
false
false
false
false
0
handle_upload_file_status() { char path[MAXPATHLEN], buf[MAXPATHLEN], log_name[MAXPATHLEN], *p, log_buf[256]; std::string filename; int status; relative_to_absolute("", path); DirScanner dirscan(path); while (dirscan.scan(filename)) { strlcpy(buf, filename.c_str(), sizeof(buf)); ...
false
false
false
false
false
0
btrfs_account_dev_extents_size(struct btrfs_device *device, u64 start, u64 end, u64 *length) { struct btrfs_key key; struct btrfs_root *root = device->dev_root; struct btrfs_dev_extent *dev_extent; struct btrfs_path *path; u64 extent_end; int ret; int slot; struct extent_buffer *l; *length = 0; if (s...
false
false
false
false
false
0
frogr_config_set_tags_autocompletion (FrogrConfig *self, gboolean value) { FrogrConfigPrivate * priv = NULL; g_return_if_fail (FROGR_IS_CONFIG (self)); priv = FROGR_CONFIG_GET_PRIVATE (self); priv->tags_autocompletion = value; }
false
false
false
false
false
0
getopts_perror (GetOptsContext *ctx, int err) { const char *long_opt, *eq; const char *reason; if (ctx->index >= ctx->argc || ctx->argv[ctx->index][0] != '-') return; if (ctx->subindex == 0) { if (!strncmp (ctx->argv[ctx->index], "--", 2)) long_opt = ctx->argv[ctx->index] + 2; else long_opt = ctx->a...
false
false
false
false
false
0
insert_symbols() { size_t i= 0; SYMBOL *cur; for (cur= symbols; i<array_elements(symbols); cur++, i++){ hash_lex_struct *root= get_hash_struct_by_len(&root_by_len,cur->length,&max_len); insert_into_hash(root,cur->name,0,(uint) i,0); } }
false
false
false
false
false
0
handle_talk_ascii(struct linked_server *ls, const void *data, size_t length) { const struct uo_packet_talk_ascii *p = data; size_t text_length; if (length < sizeof(*p)) return PA_DISCONNECT; text_length = length - sizeof(*p); if (p->text[text_length] != 0) return...
false
false
false
false
false
0
mailimap_section_text_send(mailstream * fd, struct mailimap_section_text * section_text) { switch (section_text->sec_type) { case MAILIMAP_SECTION_TEXT_SECTION_MSGTEXT: return mailimap_section_msgtext_send(fd, section_text->sec_msgtext); case MAILIMAP_SECTION_TEXT_MIME: return mailimap_token_send(fd,...
false
false
false
false
false
0
towupper (wc) wint_t wc; { size_t i = _NL_CURRENT_WORD (LC_CTYPE, _NL_CTYPE_MAP_OFFSET) + __TOW_toupper; const char *desc = _NL_CURRENT (LC_CTYPE, i); return wctrans_table_lookup (desc, wc); }
false
false
false
false
false
0
mei_cl_all_wakeup(struct mei_device *dev) { struct mei_cl *cl; list_for_each_entry(cl, &dev->file_list, link) { if (waitqueue_active(&cl->rx_wait)) { cl_dbg(dev, cl, "Waking up reading client!\n"); wake_up_interruptible(&cl->rx_wait); } if (waitqueue_active(&cl->tx_wait)) { cl_dbg(dev, cl, "Waking up ...
false
false
false
false
false
0
DISPLAY_ALERT(SSL *ssl, int alert) { if (!IS_SET_SSL_FLAG(SSL_DISPLAY_STATES)) return; printf("Alert: "); switch (alert) { case SSL_ALERT_CLOSE_NOTIFY: printf("close notify"); break; case SSL_ALERT_INVALID_VERSION: printf("invalid version");...
false
false
false
false
false
0
apply_prop_kline(struct Client *source_p, struct ConfItem *aconf, const char *reason, const char *oper_reason, int tkline_time) { aconf->flags |= CONF_FLAGS_MYOPER | CONF_FLAGS_TEMPORARY; aconf->hold = rb_current_time() + tkline_time; aconf->lifetime = aconf->hold; replace_old_ban(aconf); rb_dlinkAddAlloc(...
false
false
false
false
false
0
on_snippets_editor_close_request (SnippetsEditor *snippets_editor, gpointer user_data) { SnippetsBrowserPrivate *priv = NULL; /* Assertions */ g_return_if_fail (ANJUTA_IS_SNIPPETS_BROWSER (user_data)); priv = ANJUTA_SNIPPETS_BROWSER_GET_PRIVATE (user_data); gtk_toggle_button_se...
false
false
false
false
false
0
at_cmd_plus_FIT(at_state_t *s, const char *t) { /* T.31 8.5.4 - DTE inactivity timeout */ t += 4; if (!parse_2_out(s, &t, &s->dte_inactivity_timeout, 255, &s->dte_inactivity_action, 1, "+FIT:", "(0-255),(0-1)")) return NULL; return t; }
false
false
false
false
false
0
send_next_ecm_frame(t30_state_t *s) { int i; uint8_t frame[3]; if (s->ecm_current_tx_frame < s->ecm_frames) { /* Search for the next frame, within the current partial page, which has not been tagged as transferred OK. */ for (i = s->ecm_current_tx_frame; i < s->ecm_frames; ...
false
false
false
false
false
0
diff_setup(struct diff_options *options) { memset(options, 0, sizeof(*options)); options->file = stdout; options->line_termination = '\n'; options->break_opt = -1; options->rename_limit = -1; options->dirstat_percent = 3; options->context = 3; options->change = diff_change; options->add_remove = diff_addrem...
false
false
false
false
false
0
inplaceIntent() const { Q_D( const TextAnnotation ); if (!d->pdfAnnot) return d->inplaceIntent; if (d->pdfAnnot->getType() == Annot::typeFreeText) { const AnnotFreeText * ftextann = static_cast<const AnnotFreeText*>(d->pdfAnnot); return (TextAnnotation::InplaceIntent)ftextann->...
false
false
false
false
false
0
HAsearch_atom(group_t grp, /* IN: Group to search for the object in */ HAsearch_func_t func, /* IN: Ptr to the comparison function */ const void * key /* IN: pointer to key to compare against */ ) { CONSTR(FUNC, "HAsearch_atom"); /* for HERROR */ atom_group_t *gr...
false
false
false
false
false
0
setDeviceDescriptor(jtag_device_def_type *dev) { uchar *response = NULL; uchar *command = (uchar *)(&dev->dev_desc1); response = doJtagCommand(command, sizeof dev->dev_desc1, 1); check(response[0] == JTAG_R_OK, "JTAG ICE: Failed to set device description"); delete [] response; }
false
false
false
false
false
0
setredblue(struct gspca_dev *gspca_dev) { struct sd *sd = (struct sd *) gspca_dev; if (sd->sensor == SENSOR_PO2030N) { u8 rg1b[] = /* red green1 blue (no g2) */ {0xc1, 0x6e, 0x16, 0x00, 0x40, 0x00, 0x00, 0x10}; /* 0x40 = normal value = gain x 1 */ rg1b[3] = sd->red_bal->val * 2; rg1b[5] = sd->blue_bal-...
false
false
false
false
false
0
brcmstb_gpio_remove(struct platform_device *pdev) { struct brcmstb_gpio_priv *priv = platform_get_drvdata(pdev); struct list_head *pos; struct brcmstb_gpio_bank *bank; int ret = 0; if (!priv) { dev_err(&pdev->dev, "called %s without drvdata!\n", __func__); return -EFAULT; } /* * You can lose return value...
false
false
false
false
false
0
ParseSwallow( char **ss, unsigned int *flags, unsigned int *mask, button_info *b) { char *swallowopts[] = { "nohints", "hints", "nokill", "kill", "noclose", "close", "respawn", "norespawn", "useold", "noold", "usetitle", "notitle", "fvwmmodule", "nofvwmmodule", "swallownew", NULL }; char *t, *s =...
false
false
false
false
false
0
lib3ds_mesh_calculate_normals(Lib3dsMesh *mesh, Lib3dsVector *normalL) { Lib3dsFaces **fl; Lib3dsFaces *fa; unsigned i,j,k; if (!mesh->faces) { return; } fl=calloc(sizeof(Lib3dsFaces*),mesh->points); ASSERT(fl); fa=calloc(sizeof(Lib3dsFaces),3*mesh->faces); ASSERT(fa); k=0; for (i=0; i<mes...
false
false
false
false
false
0
collectTemporary_terms(const temporary_terms_t &temporary_terms, temporary_terms_inuse_t &temporary_terms_inuse, int Curr_Block) const { temporary_terms_t::const_iterator it = temporary_terms.find(const_cast<NumConstNode *>(this)); if (it != temporary_terms.end()) temporary_terms_inuse.insert(idx); }
false
false
false
false
false
0
do_redirect(action_list_t *a, const char *addr, int cancel_keep) { action_list_t *b = NULL; /* xxx we should validate addr */ /* see if this conflicts with any previous actions taken on this message */ while (a != NULL) { b = a; if (a->a == ACTION_REJECT) return SIEVE_RUN_ERROR; a = a->next; ...
false
false
false
true
false
1
get ( int id ) { IdentCache::iterator f = identCache.find ( id ); if ( f != identCache.end() ) return &(*(f->second)); else return NULL; }
false
false
false
false
false
0
save_bool(PicklerObject *self, PyObject *obj) { if (self->proto >= 2) { const char bool_op = (obj == Py_True) ? NEWTRUE : NEWFALSE; if (_Pickler_Write(self, &bool_op, 1) < 0) return -1; } else { /* These aren't opcodes -- they're ways to pickle bools before protocol 2 ...
false
false
false
false
false
0
ocfs2_init_meta_steal_slot(struct ocfs2_super *osb) { spin_lock(&osb->osb_lock); osb->s_meta_steal_slot = OCFS2_INVALID_SLOT; spin_unlock(&osb->osb_lock); atomic_set(&osb->s_num_meta_stolen, 0); }
false
false
false
false
false
0
mono_init_delegate_virtual (MonoDelegate *del, MonoObject *target, MonoMethod *method) { g_assert (target); method = mono_object_get_virtual_method (target, method); MONO_OBJECT_SETREF (del, target, target); del->method = method; del->method_ptr = mono_compile_method (method); if (mono_method_needs_static_rgctx...
false
false
false
false
false
0
cache_nbs(struct pci_dev *pdev, u32 cap_ptr) { int i; if (amd_cache_northbridges() < 0) return -ENODEV; if (!amd_nb_has_feature(AMD_NB_GART)) return -ENODEV; i = 0; for (i = 0; i < amd_nb_num(); i++) { struct pci_dev *dev = node_to_amd_nb(i)->misc; if (fix_northbridge(dev, pdev, cap_ptr) < 0) { dev_e...
false
false
false
false
false
0
free_server(aServer *serv) { aClient *cptr = serv->bcptr; /* decrement reference counter, and eventually free it */ if (--serv->refcnt <= 0) { if (serv->refcnt == -211001) { /* Loop detected, break it. * XXX: Remove loop detection before 2.11.0 - jv */ sendto_flag(SCH_DEBUG, "* %#x free_server loop %s...
true
true
false
false
false
1
getChannel(uint idx) { uint rem = idx % 4; switch(rem) { case 0: default: return "r"; case 1: return "g"; case 2: return "b"; case 3: return "a"; }; }
false
false
false
false
false
0
cliConnect(int force) { if (context == NULL || force) { if (context != NULL) redisFree(context); if (config.hostsocket == NULL) { context = redisConnect(config.hostip,config.hostport); } else { context = redisConnectUnix(config.hostsocket); } ...
false
false
false
false
false
0
gz_path_add_line_notes(gx_path * ppath, fixed x, fixed y, segment_notes notes) { subpath *psub; line_segment *lp; if (ppath->bbox_set) check_in_bbox(ppath, x, y); path_open(); path_alloc_segment(lp, line_segment, &st_line, s_line, notes, "gx_path_add_line"); path_...
false
false
false
false
false
0
sftk_handleKeyParameterObject(SFTKSession *session, SFTKObject *object) { SFTKAttribute *attribute; CK_KEY_TYPE key_type; CK_BBOOL ckfalse = CK_FALSE; CK_RV crv; /* verify the required fields */ if ( !sftk_hasAttribute(object,CKA_KEY_TYPE) ) { return CKR_TEMPLATE_INCOMPLETE; } /* now ...
false
false
false
false
false
0