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
dma_txreset(struct dma_pub *pub) { struct dma_info *di = container_of(pub, struct dma_info, dma); u32 status; if (di->ntxd == 0) return true; /* suspend tx DMA first */ bcma_write32(di->core, DMA64TXREGOFFS(di, control), D64_XC_SE); SPINWAIT(((status = (bcma_read32(di->core, DMA64TXREGOFFS(di, status0)) ...
false
false
false
false
false
0
ReadStockholm(MSAFILE *afp) { MSA *msa; char *s; int status; if (feof(afp->f)) return NULL; /* Initialize allocation of the MSA. */ msa = MSAAlloc(10, 0); /* Check the magic Stockholm header line. * We have to skip blank lines here, else we perceive * trailing blank lines in a file as a ...
false
false
false
false
false
0
readPin(u32 bank, u8 pin) { // todo, implement read if (GET_REG(GPIO_IDR(bank)) & (0x01 << pin)) { return TRUE; } else { return FALSE; } }
false
false
false
false
false
0
_nfs4_proc_readdir(struct dentry *dentry, struct rpc_cred *cred, u64 cookie, struct page **pages, unsigned int count, int plus) { struct inode *dir = d_inode(dentry); struct nfs4_readdir_arg args = { .fh = NFS_FH(dir), .pages = pages, .pgbase = 0, .count = count, .bitmask = NFS_SERVER(d_inode(dentry))->a...
false
false
false
false
false
0
replaceCertificateAbstractFile(AbstractFile* file, AbstractFile* certificate) { uint32_t signatureBE; uint32_t signatureLE; AbstractFile* f; file->seek(file, 0); file->read(file, &signatureBE, sizeof(signatureBE)); signatureLE = signatureBE; FLIPENDIAN(signatureBE); FLIPENDIANLE(signatureLE); file->seek(file...
false
false
false
false
false
0
get_exclude_attribute(change::pointer cp, nstring_list &exclude) { nstring value = cp->pconf_attributes_find("aetar:exclude"); exclude.split(value); }
false
false
false
false
false
0
ws_lexer_register_block(WsCompiler *compiler, void *ptr) { void **n; if (ptr == NULL) return WS_TRUE; n = ws_realloc(compiler->lexer_active_list, ((compiler->lexer_active_list_size + 1) * sizeof(void *))); if (n == NULL) return WS_FALSE; compiler->lexer_active_l...
false
false
false
false
false
0
ebook_error_message(error_code) { const gchar *message; if(ebook_message) g_free(ebook_message); message = eb_error_message(error_code); ebook_message = iconv_convert(fs_codeset, "utf-8", message); return(ebook_message); }
false
false
false
false
false
0
append_cdata(char *t, const char *n, int length) { char *r, *k; if (!length) return t; k = avahi_strndup(n, length); if (t) { r = avahi_strdup_printf("%s%s", t, k); avahi_free(k); avahi_free(t); } else r = k; return r; }
false
false
false
false
false
0
cell_x (FttCell * cell, FttCellFace * face, GfsSimulation * sim) { FttVector p; g_return_val_if_fail (cell != NULL || face != NULL, 0.); if (face) gfs_face_ca (face, &p); else gfs_cell_cm (cell, &p); gfs_simulation_map_inverse (sim, &p); return p.x; }
false
false
false
false
false
0
_lookupMarginProperties(const PP_AttrProp* /*pSectionAP*/) { // force lookup on all container layouts in this section fl_ContainerLayout* pBL = getFirstLayout(); while (pBL) { pBL->lookupMarginProperties(); pBL = pBL->getNext(); } // header/footers UT_GenericVector<fl_HdrFtrSectionLayout*> vecHdrFtr; getV...
false
false
false
false
false
0
cb_expr_finish (void) { expr_reduce (0); /* reduce all */ if (expr_index != 4) { cb_error (_("Invalid expression")); return cb_error_node; } if (!expr_stack[3].value) { cb_error (_("Invalid expression")); return cb_error_node; } expr_expand (&expr_stack[3].value); if (expr_stack[3].token != 'x') { cb...
false
false
false
false
false
0
gfarm_paraccess_load_finish(void *closure) { struct gfarm_access *a = closure; gfarm_error_t e; e = gfs_client_get_load_result_multiplexed(a->protocol_state, &a->load); gfarm_paraccess_callback(a->pa, a, e == GFARM_ERR_NO_ERROR ? &a->load : NULL, NULL, e); }
false
false
false
false
false
0
word(char* p, Bytebuffer* buf) { int c; while((c=*p++)) { if(c == '}' || c == ' ' || c == ',') break; if(c == '\\') { bbAppend(buf,c); c=*p++; if(!c) break; } bbAppend(buf,(char)c); } p--; /* leave terminator for parent */ return p; }
false
false
false
false
false
0
state_set_expand(struct state_set *set) { if (set->size == 0) set->size = array_initial_size; else if (set->size > array_max_expansion) set->size += array_max_expansion; else set->size *= 2; if (REALLOC_N(set->states, set->size) < 0) goto error; if (set->with_data) ...
false
false
false
false
false
0
handle_constants (void) { int c; htab_t defs; c = read_skip_spaces (); if (c != '[') fatal_expected_char ('[', c); /* Disable constant expansion during definition processing. */ defs = md_constants; md_constants = 0; while ( (c = read_skip_spaces ()) != ']') { struct md_name name, value...
false
false
false
false
false
0
addprototype (LexState *ls) { Proto *clp; lua_State *L = ls->L; FuncState *fs = ls->fs; Proto *f = fs->f; /* prototype of current function */ if (fs->np >= f->sizep) { int oldsize = f->sizep; luaM_growvector(L, f->p, fs->np, f->sizep, Proto *, MAXARG_Bx, "functions"); while (oldsize < f->sizep) f...
false
false
false
false
false
0
find_and_exec(const char * command_name, const char * parameters){ int ret; if(command_name == NULL){ return 0; } else if(strcmp(command_name,"pwd") == 0){ return pwd(); } else if(strcmp(command_name,"cd") == 0){ return cd(parameters); } else if(strcmp(command_name,"echo") == 0){ return ...
false
false
false
false
true
1
knc_pmu_disable_all(void) { u64 val; rdmsrl(MSR_KNC_IA32_PERF_GLOBAL_CTRL, val); val &= ~(KNC_ENABLE_COUNTER0|KNC_ENABLE_COUNTER1); wrmsrl(MSR_KNC_IA32_PERF_GLOBAL_CTRL, val); }
false
false
false
false
false
0
IsRoutableAddress(const wxString& address, enum CSocket::address_family family) { if (family == CSocket::ipv6) { wxString long_address = GetIPV6LongForm(address); if (long_address.empty()) return false; if (long_address[0] == '0') { // ::/128 if (long_address == _T("0000:0000:0000:0000:0000:0000:0000...
false
false
false
false
false
0
__gastman_run_command(const char *cmd) { static char buf[8192], buf2[8192]; int yah = 0; int x; struct message *m; manager_action("Command", "Command: %s\r\n", cmd); m = wait_for_response(100000); if (!m) { gui_show_message("Command Failed", "Timeout waiting for response"); } else if (strcasecmp(get_header(m,...
false
false
false
false
false
0
computeSize(void) { if (firstMap()==MSTrue&&frozen()==MSFalse) { int naturalWidth, naturalHeight; calculateNaturalSize(naturalWidth,naturalHeight); if (naturalWidth==width()&&naturalHeight==height()) configure(); else resize(naturalWidth,naturalHeight); } }
false
false
false
false
false
0
iscsi_rx_login_response ( struct iscsi_session *iscsi, const void *data, size_t len, size_t remaining ) { struct iscsi_bhs_login_response *response = &iscsi->rx_bhs.login_response; int rc; /* Buffer up the PDU data */ if ( ( rc = iscsi_rx_buffered_data ( iscsi, data, len ) ) != 0 ) { DBGC ( i...
false
false
false
false
false
0
port_deny(struct group *group, struct request *rq) { struct range *range; if ( !group->badports ) return(0); if ( rq->url.proto && !strcasecmp(rq->url.proto,"ftp") ) { if ( (rq->url.port == 20) || (rq->url.port == 21) ) return(0); } range = (struct range*)group->badports; while( range <= (struct ...
false
false
false
false
false
0
ipmi_isol_deactivate(struct ipmi_intf * intf) { struct ipmi_rs * rsp; struct ipmi_rq req; uint8_t data[6]; struct isol_config_parameters params; memset(&req, 0, sizeof(req)); req.msg.netfn = IPMI_NETFN_ISOL; req.msg.cmd = ACTIVATE_ISOL; req.msg.data = data; req.msg.data_len = 5; memset(data, 0, 6); ...
false
false
false
false
false
0
CloseAllWindows( void ) { for ( Window *w = static_cast<Window *>(windows.Head()); w && !w->Closed(); w = static_cast<Window *>(w->Next()) ) w->Close(); Refresh(); }
false
false
false
false
false
0
svg_filter_apply(GF_Node *node, GF_TextureHandler *source, GF_Rect *region) { GF_ChildNodeItem *l = ((GF_ParentNode*)node)->children; while (l) { switch (gf_node_get_tag(l->node)) { case TAG_SVG_feComponentTransfer: apply_feComponentTransfer(l->node, source, region); break; } l = l->next; } }
false
false
false
false
false
0
release_request(struct transfer_request *request) { struct transfer_request *entry = request_queue_head; if (request == request_queue_head) { request_queue_head = request->next; } else { while (entry->next != NULL && entry->next != request) entry = entry->next; if (entry->next == request) entry->next = ...
false
false
false
false
false
0
FillInputPortInformation(int port, vtkInformation* info) { if (port==0) { info->Set(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "vtkDataSet"); } else if (port==1) { info->Set(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "vtkDataSet"); info->Set(vtkAlgorithm::INPUT_IS_OPTIONAL(), 1); } return 1; }
false
false
false
false
false
0
reset_model(Model *m) { Vector *v; /* Mark all objects as deleted. */ list_foreach(m->objects, object_set_deleted, NULL); /* Clear out food spawn places. */ while ((v = (Vector *)list_pop(m->foodplaces))) del_vector(v); m->framecounter = 0; }
false
false
false
false
false
0
fp_sqrt(p,a) unsigned p,a; { if((p & 3) == 3) return(modpow(a,(p+1)/4,p)); else return(fp_sqrt14(p,a)); }
false
false
false
false
false
0
conv_line(char *str, int *length) { char *result = malloc((unsigned) (strlen(str) + 10)); char *cp, *rp; if (!result) nomem(); rp = result; cp = str; while (*cp) { if (*cp == '^') { if (*++cp == '^') *rp++ = '^'; else *rp++ = *cp++ & 0x1f; } else if (*cp == '%') { char *np; ...
false
false
false
false
false
0
mon_bin_open(struct inode *inode, struct file *file) { struct mon_bus *mbus; struct mon_reader_bin *rp; size_t size; int rc; mutex_lock(&mon_lock); mbus = mon_bus_lookup(iminor(inode)); if (mbus == NULL) { mutex_unlock(&mon_lock); return -ENODEV; } if (mbus != &mon_bus0 && mbus->u_bus == NULL) { printk(...
false
false
false
false
false
0
getGame(int num) { list<ChessGame *>::iterator gi; for(gi=GameList.begin();gi!=GameList.end();gi++) if ( (*(*gi)) == num ) return(*gi); return NULL; }
false
false
false
false
false
0
nextutf(char *p) { if(twobyte(*p)) return p[1]=='\0'?p+1:p+2; if(threebyte(*p)) return p[1]=='\0'?p+1:p[2]=='\0'?p+2:p+3; return p+1; }
false
false
false
false
false
0
RflCheckMaxLogged( FLMUINT * puiMaxBytesNeededRV, FLMUINT uiPacketsLogged, FLMUINT * puiCurrTotalLoggedRV, FLMUINT uiBytesToLog) { RCODE rc = FERR_OK; *puiCurrTotalLoggedRV += uiBytesToLog; if ((!uiPacketsLogged) && (*puiCurrTotalLoggedRV > *puiMaxBytesNeededRV)) { rc = RC_SET( FERR_FAILURE); goto Exit;...
false
false
false
false
false
0
gda_tree_set_attribute (GdaTree *tree, const gchar *attribute, const GValue *value, GDestroyNotify destroy) { g_return_if_fail (GDA_IS_TREE (tree)); gda_tree_node_set_node_attribute (tree->priv->root, attribute, value, destroy); }
false
false
false
false
false
0
SAME_save(const void *ip, const struct xt_entry_target *target) { unsigned int count; const struct ipt_same_info *mr = (const void *)target->data; int random_selection = 0; for (count = 0; count < mr->rangesize; count++) { const struct nf_nat_ipv4_range *r = &mr->range[count]; struct in_addr a; a.s_addr = r...
false
false
false
false
false
0
on_change_filesystem_label_entry_changed (GtkEditable *editable, gpointer user_data) { ChangeFilesystemLabelData *data = user_data; gboolean sensitive; sensitive = FALSE; if (g_strcmp0 (gtk_entry_get_text (GTK_ENTRY (editable)), data->orig_label) != 0) { ...
false
false
false
false
false
0
test_interword_triphone(HTK_HMM_INFO *hmminfo, WORD_INFO *winfo) { WORD_ID w; local_hmminfo = hmminfo; local_winfo = winfo; local_root = hmminfo->basephone.root; error_root = NULL; error_num = 0; printf("Inter-word triphone existence test...\n"); for(w=0;w<winfo->num;w++) { current_w = w; if (w...
false
false
false
false
false
0
beam_render_muzzle_glow(beam *b) { vertex pt; weapon_info *wip = &Weapon_info[b->weapon_info_index]; beam_weapon_info *bwi = &Weapon_info[b->weapon_info_index].b_info; float rad, pct, rand_val; int tmap_flags = TMAP_FLAG_TEXTURED | TMAP_HTL_3D_UNLIT; // if we don't have a glow bitmap if (bwi->beam_glow.first_fr...
false
false
false
false
false
0
dijkstra(pf_state_t *s) /* Computes a shortest path from vertex_start to vertex_end. The caller can ** construct the resulting path by following the path_prev links from ** vertex_end back to vertex_start. If no path exists vertex_end->path_prev ** will be NULL ** Parameters: (pf_state_t *) s: The pathfinding state ** ...
false
false
false
false
false
0
testpd(mtcondRec *mt1, mtcondRec *mt2, contextRec *context) { int i,len,Blen; mtcondRec *mtcond; branchRec **bidx,*bidxi; Bit_vector *bv1; if (testexex(mt1,mt2,context)) return 0; len=context->blen; Blen=context->Blen; ...
false
false
false
false
false
0
_ecore_evas_extn_cb_mouse_out(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) { Ecore_Evas *ee = data; Evas_Event_Mouse_Out *ev = event_info; Extn *extn; extn = ee->engine.buffer.data; if (!extn) return; if (extn->ipc.server) { Ipc_Data_Ev_Mouse_...
false
false
false
false
false
0
list_parse_qml(GList * list, ListItem * item, gboolean detect_only) { GMarkupParseContext *context; gchar *data; gsize datalen; // printf("Entering list_parse_qml localsize = %i\n", item->localsize); if (item->localsize < (16 * 1024)) { if (g_file_get_contents(item->local, &data, &datalen,...
false
false
false
false
false
0
main(int argc, char **argv) { int flags = 0; char devname[PATH_MAX]; if (argc < 2) { fprintf(stderr, "Usage: %s device\n", argv[0]); return EXIT_FAILURE; } if (check_mount_point(argv[1], &flags, devname, sizeof(devname)) == 0 && (flags & MF_MOUNTED)) { if (flags & MF_SWAP) printf("used swap device\...
false
false
false
false
false
0
read(std::string& what, std::string& err) { // TODO: We are reading character by character. int n; char c; while (true) { n = ::read(fd, &c, 1); if (n == 0) { return true; } if (n == -1) { err = strerror(errno); return false; } what += c; } return true; }
false
false
false
false
false
0
__ecereRegisterModule_AVLTree(struct __ecereNameSpace__ecere__com__Instance * module) { struct __ecereNameSpace__ecere__com__Class * class; class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(0, "ecere::com::AVLTree", "ecere::com::CustomAVLTree<BT = ecere::com::AVLNode<AT>, KT = AT, T = AT, D = AT>", 0, 0, 0, ...
false
false
false
false
false
0
expand_vector_operation (gimple_stmt_iterator *gsi, tree type, tree compute_type, gimple assign, enum tree_code code) { enum machine_mode compute_mode = TYPE_MODE (compute_type); /* If the compute mode is not a vector mode (hence we are not decomposing a BLKmode vector to smaller, hardware-supported vecto...
false
false
false
false
false
0
ipp_cancel_job(_ipp_client_t *client) /* I - Client */ { _ipp_job_t *job; /* Job information */ /* * Get the job... */ if ((job = find_job(client)) == NULL) { respond_ipp(client, IPP_STATUS_ERROR_NOT_FOUND, "Job does not exist."); return; } /* * See if the job is already completed, cancele...
false
false
false
false
false
0
instance() { static ConfigPtr i(new Config); return *i; }
false
false
false
false
false
0
sha256_transform(private_sha256_hasher_t *ctx, const unsigned char *datap) { register int j; u_int32_t a, b, c, d, e, f, g, h; u_int32_t T1, T2, W[64], Wm2, Wm15; /* read the data, big endian byte order */ j = 0; do { W[j] = (((u_int32_t)(datap[0]))<<24) | (((u_int32_t)(datap[1]))<<16) |...
false
false
false
false
false
0
SelectT2ShifterOperandReg(SDValue N, SDValue &BaseReg, SDValue &Opc) { if (DisableShifterOp) return false; ARM_AM::ShiftOpc ShOpcVal = ARM_AM::getShiftOpcForNode(N.getOpcode()); // Don't match base register only case. That is matched to a separate // lower c...
false
false
false
false
false
0
ReadBinaryDataArray(char type, uint32_t count, const char*& data, const char* end, std::vector<char>& buff, const Element& el) { ai_assert(static_cast<size_t>(end-data) >= 4); // runtime check for this happens at tokenization stage BE_NCONST uint32_t encmode = *reinterpret_cast<const uint32_t*>(data); AI_SWAP4(...
false
false
false
false
false
0
cobalt_enum_dv_timings(struct file *file, void *priv_fh, struct v4l2_enum_dv_timings *timings) { struct cobalt_stream *s = video_drvdata(file); if (s->input == 1) { if (timings->index) return -EINVAL; memset(timings->reserved, 0, sizeof(timings->reserved)); timings->timings = cea1080p60; return 0;...
false
false
false
false
false
0
btreeSeccacheFetch(AjPBtcache cache, AjPBtpage cpage, ajulong pagepos) { ajuint sum = 0; ajuint retries = 0; /* ajDebug("In btreeSeccacheFetch\n"); */ if(fseek(cache->fp,pagepos,SEEK_SET)) ajFatal("Seek error %d: '%s' in ajBtreeSeccacheFetch file %S", fe...
false
false
false
false
false
0
addToolShadeToModel(GtkTreeIter *iter, VisuUiShadeComboboxClass* klass, ToolShade* shade) { GtkTreePath *path; gint *ids; gchar *idLbl; g_return_if_fail(iter && klass && shade); DBG_fprintf(stderr, "Gtk VisuUiShadeCombobox: appending a new shade '%s'.\n", tool_shade_ge...
false
false
false
false
false
0
swizzle_result(ir_texture *ir, fs_reg orig_val, int sampler) { if (ir->op == ir_query_levels) { /* # levels is in .w */ orig_val.reg_offset += 3; this->result = orig_val; return; } this->result = orig_val; /* txs,lod don't actually sample the texture, so swizzling the result * ...
false
false
false
false
false
0
hi_ncurses_fpager_slave_key_event(hi_ncurses_fpager *pager, int key) { gboolean claimed = FALSE; switch (key) { case '=': pager->location_mode = pager->linked_pager->location_mode; pager->display_mode = pager->linked_pager->display_mode; pager->hig...
false
false
false
false
false
0
bf_actt( FMField *out, FMField *bf, FMField *in ) { int32 iqp, ir, ic, ii, nEP, nQP, dim; float64 *pout, *pbf, *pin; nEP = bf->nCol; nQP = bf->nLev; dim = in->nRow; #ifdef DEBUG_FMF if ((out->nCol != in->nCol) || (out->nRow != (dim * nEP)) || (out->nLev != bf->nLev)) { errput( ErrHead "ERR_BadMa...
false
false
false
false
false
0
port100_tg_send_cmd(struct nfc_digital_dev *ddev, struct sk_buff *skb, u16 timeout, nfc_digital_cmd_complete_t cb, void *arg) { struct port100 *dev = nfc_digital_get_drvdata(ddev); struct port100_tg_comm_rf_cmd *hdr; struct port100_cb_arg *cb_arg; cb_arg = kzalloc(sizeof(struct port100_cb_arg),...
false
false
false
false
false
0
next_runtime_abi_02_build_const_string_constructor (location_t loc, tree string, int length) { tree constructor, fields, var; VEC(constructor_elt,gc) *v = NULL; /* NeXT: (NSConstantString *) & ((__builtin_ObjCString) { isa, string, length }) */ fields = TYPE_FIELDS (internal_const_str_type); CONSTRU...
false
false
false
false
false
0
Str() const { if (!IsValid()) return STR_EMPTY; std::string ret; if (!node_name_.empty()) ret = node_name_ + "@"; ASSERT(domain_name_ != STR_EMPTY); ret += domain_name_; if (!resource_name_.empty()) ret += "/" + resource_name_; return ret; }
false
false
false
false
false
0
_ctxpopup_move(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__) { Widget_Data *wd; wd = elm_widget_data_get(obj); if (!wd) return; if (wd->visible) evas_object_show(wd->arrow); _sizing_eval(obj); }
false
false
false
false
false
0
do_update_distances() { vector<int> uids; try { Q q("SELECT uid FROM A.Acoustic WHERE mfcc NOTNULL AND bpm NOTNULL;"); while (q.next()) { int uid; q >> uid; uids.push_back(uid); } } WARNIFFAILED(); SVMSimilarityModel model; ...
false
false
false
false
false
0
ignore_directory (const char *name) { int i; if (!dir_ign_list) return 0; i = dir_ign_current; while (i--) { if (strncmp (name, dir_ign_list[i], strlen (dir_ign_list[i])+1) == 0) return 1; } return 0; }
false
false
false
false
false
0
LoadVocabularySection( LineReader &reader, const std::vector<FactorType> &factorTypes, std::vector<Word> &vocabulary) { // Read symbol count. reader.ReadLine(); const size_t vocabSize = std::atoi(reader.m_line.c_str()); // Read symbol lines and create Word objects. vocabulary.resize(vocabSize); ...
false
false
false
false
false
0
reallocsites(void) {/* The amount of sites can change between runs this function reallocates all the variables whose size depends on the amount of sites */ long i; for (i = 0; i < spp; i++) { free(y[i]); y[i] = (Char *)Malloc(sites*sizeof(Char)); } free(category); free(oldweight); fr...
false
false
false
false
false
0
state_set_hash_free(state_set_hash *smap, struct state_set *protect) { if (protect != NULL) { hnode_t *node = hash_lookup(smap, protect); hash_delete(smap, node); hnode_getkey(node) = NULL; set_destroy(node, NULL); } hash_free_nodes(smap); ...
false
false
false
false
false
0
get_word_iter (GtkTextBuffer *buffer, GtkTextIter *start_word, GtkTextIter *end_word) { gtk_text_buffer_get_iter_at_mark (buffer, end_word, gtk_text_buffer_get_insert (buffer)); *start_word = *end_word; while (gtk_text_iter_b...
false
false
false
false
false
0
updateHostList(void) { DENTER(GUI_LAYER, "updateHostList"); if (qmon_host && XtIsManaged(qmon_host)) qmonHostFillList(); DEXIT; }
false
false
false
false
false
0
update_branch(unsigned int idx, str** uri, str** dst_uri, str** path, qvalue_t* q, unsigned int* flags, struct socket_info** force_socket) { if (dset_state==0 || idx>=nr_branches) return -1; /* uri ? */ if (uri) { /* set uri */ if (*uri==NULL || (*uri)->len>MAX_URI_SIZE-1) { LM_ERR("empty or too long uri...
false
true
false
false
false
1
http_add_basic_authentication(struct http_header_t *http_hdr, const char *username, const char *password) { char *auth = NULL, *user_pass = NULL, *b64_user_pass = NULL; int encoded_len ,pass_len = 0, out_len; int res = -1; /* username cannot be NULL. */ if(http_hdr == NULL || username == NU...
false
false
false
false
true
1
mt63_rxprocess(struct trx *trx, float *buf, int len) { struct mt63 *s = (struct mt63 *) trx->modem; float snr; unsigned int c; int i; if (s->InpBuff->EnsureSpace(len) == -1) { fprintf(stderr, "mt63_rxprocess: buffer error\n"); return -1; } for (i = 0; i < len; i++) s->InpBuff->Data[i] = buf[i]; s->InpBuf...
false
false
false
false
false
0
Cmd_ExecTrigger( const char *string ) { const cmd_trigger_t *trigger; const char *text; // execute matching triggers for(trigger = cmd_triggers; trigger; trigger = trigger->next) { text = Cmd_MacroExpandString(trigger->match); if(text && Com_WildCmp(text, string)) { Cbuf_AddText(trigger->command); Cbuf_...
false
false
false
false
false
0
e2_dialog_show (GtkWidget *dialog, GtkWidget *parent, E2_DialogFlags flags, E2_Button *button, ...) { // GtkWidget *lastbutton; //just in case we want a pointer to the last 1 //some of the calls here have no buttons //but we get warned if the flags button is made the last computsory one if (button != NULL) { va...
false
false
false
false
false
0
SetData(uint32 uiType, uint32 uiData) { switch (uiType) { case TYPE_SKERAM: m_auiEncounter[uiType] = uiData; if (uiData == DONE) { DoUseDoorOrButton(GO_SKERAM_GATE); } break; case TYPE_BUG_TRIO: if (uiData ==...
false
false
false
false
false
0
FormatMagickSize(const MagickSizeType size, const MagickBooleanType bi,char *format) { const char **units; double bytes, length; register ssize_t i, j; ssize_t count; static const char *bi_units[] = { "", "Ki", "Mi", "Gi", "Ti", "Pi", "Ei", "Zi", "Yi", (char *) NULL...
false
false
false
false
false
0
do_waiters(char *name, struct summary *sum) { FILE *file; char path[PATH_MAX]; char line[LOCK_LINE_MAX]; char rname[DLM_RESNAME_MAXLEN+1]; int header = 0; int i, j, spaces; int rv, nodeid, wait_type; uint32_t id; snprintf(path, PATH_MAX, "/sys/kernel/debug/dlm/%s_waiters", name); file = fopen(path, "r"); i...
true
true
false
false
true
1
brinbuildCallback(Relation index, HeapTuple htup, Datum *values, bool *isnull, bool tupleIsAlive, void *brstate) { BrinBuildState *state = (BrinBuildState *) brstate; BlockNumber thisblock; int i; thisblock = ItemPointerGetBlockNumber(&htup->t_self); /* * If we're in a block tha...
false
false
false
false
false
0
ocfs2_size_fits_inline_data(struct buffer_head *di_bh, u64 new_size) { struct ocfs2_dinode *di = (struct ocfs2_dinode *)di_bh->b_data; if (new_size <= le16_to_cpu(di->id2.i_data.id_count)) return 1; return 0; }
false
false
false
false
false
0
settings_value_as_time(char *value, u_int32_t def) { char *endptr; u_int32_t timeval; if (value) { errno = 0; timeval = strtoul(value, &endptr, 10); if (endptr == value) { return def; } if (errno == 0) { while (isspace(*endptr)) { endptr++; } switch (*endptr) { case 'd': /* ...
true
true
false
false
false
1
positive_formula(Formula f) { Formula g = f; while (quant_form(g)) g = g->kids[0]; if (g->type == ATOM_FORM) return TRUE; else if (g->type != AND_FORM) return FALSE; else { int i; for (i = 0; i < g->arity; i++) if (!positive_formula(g->kids[i])) return FALSE; return TRUE; } }
false
false
false
false
false
0
src_sync_cmd(struct aac_dev *dev, u32 command, u32 p1, u32 p2, u32 p3, u32 p4, u32 p5, u32 p6, u32 *status, u32 * r1, u32 * r2, u32 * r3, u32 * r4) { unsigned long start; unsigned long delay; int ok; /* * Write the command into Mailbox 0 */ writel(command, &dev->IndexRegs->Mailbox[0]); /* * Write the par...
false
false
false
false
false
0
ar9003_mci_is_gpm_valid(struct ath_hw *ah, u32 msg_index) { struct ath9k_hw_mci *mci = &ah->btcoex_hw.mci; u32 *payload; u32 recv_type, offset; if (msg_index == MCI_GPM_INVALID) return false; offset = msg_index << 4; payload = (u32 *)(mci->gpm_buf + offset); recv_type = MCI_GPM_TYPE(payload); if (recv_typ...
false
false
false
false
false
0
o_xtra_prompt(int oid) { object_kind *k = objkind_byid(oid); const char *no_insc = ", 's' to toggle squelch, 'r'ecall, '{'"; const char *with_insc = ", 's' to toggle squelch, 'r'ecall, '{', '}'"; /* Forget it if we've never seen the thing */ if (k->flavor && !k->aware) return ""; return k->note ? with_insc :...
false
false
false
false
false
0
deleteRecursive(int depth) { if (depth <= 0) return; for (StringVoidPtrHash::iterator iter = begin(); iter != end(); iter++) { void* elem = iter->second; if (elem != NULL) { StringVoidPtrHash* hash = (StringVoidPtrHash*)elem; hash->deleteRecursive(depth - 1); delete hash; } } }
false
false
false
false
false
0
remoteDataEngine(const KUrl &location, const QString &name) { QPair<QString, QString> pair(location.prettyUrl(), name); kDebug() << "pair = " << pair; if (m_remoteEngines.contains(pair)) { kDebug() << "existing remote dataengine at " << location; return m_remoteEngines[pair]; } kDeb...
false
false
false
false
false
0
do_ENTRY(Token *id, Token *args, int hashno) /* Processes ENTRY statement */ #else /* K&R style */ do_ENTRY(id,args,hashno) /* Processes ENTRY statement */ Token *id,*args; int hashno; #endif /* HAVE_STDC */ { int datatype; if(hashno == -1) { /* -1 signifies headerless program */ datatype = type_PROGRAM; } e...
false
false
false
false
false
0
lg4ff_real_id_show(struct device *dev, struct device_attribute *attr, char *buf) { struct hid_device *hid = to_hid_device(dev); struct lg4ff_device_entry *entry; struct lg_drv_data *drv_data; size_t count; drv_data = hid_get_drvdata(hid); if (!drv_data) { hid_err(hid, "Private driver data not found!\n"); ret...
false
false
false
false
false
0
_gss_ntlm_wrap_size_limit ( OM_uint32 * minor_status, gss_const_ctx_id_t context_handle, int conf_req_flag, gss_qop_t qop_req, OM_uint32 req_output_size, OM_uint32 * max_input_size ) { ntlm_ctx ctx = (ntlm_ctx)context_handle; *m...
false
false
false
false
false
0
hexchat_command (hexchat_plugin *ph, const char *command) { char *conv; int len = -1; if (!is_session (ph->context)) { DEBUG(PrintTextf(0, "%s\thexchat_command called without a valid context.\n", ph->name)); return; } /* scripts/plugins continue to send non-UTF8... *sigh* */ conv = text_validate ((char **)...
false
false
false
false
false
0
SetRemoteName( const char *name ) { if ( name ) server.assign( name ); else server.erase(); }
false
false
false
false
false
0
idio_16_gpio_get(struct gpio_chip *chip, unsigned offset) { struct idio_16_gpio *const idio16gpio = to_idio16gpio(chip); const unsigned BIT_MASK = 1U << (offset-16); if (offset < 16) return -EINVAL; if (offset < 24) return !!(inb(idio16gpio->base + 1) & BIT_MASK); return !!(inb(idio16gpio->base + 5) & (BIT_...
false
false
false
false
false
0
block5_data_unref (void * _userdata_) { Block5Data* _data5_; _data5_ = (Block5Data*) _userdata_; #line 364 "/home/treitter/collabora/folks/tests/telepathy/individual-properties.vala" if (g_atomic_int_dec_and_test (&_data5_->_ref_count_)) { #line 2462 "individual-properties.c" IndividualPropertiesTests * self; #lin...
false
false
false
false
false
0
gdata_picasaweb_file_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec) { GDataPicasaWebFilePrivate *priv = GDATA_PICASAWEB_FILE (object)->priv; switch (property_id) { case PROP_FILE_ID: g_value_set_string (value, priv->file_id); break; case PROP_EDITED: g_value_set_int6...
false
false
false
false
false
0
sm_metadata_get_count(struct dm_space_map *sm, dm_block_t b, uint32_t *result) { int r; unsigned i; struct sm_metadata *smm = container_of(sm, struct sm_metadata, sm); unsigned adjustment = 0; /* * We may have some uncommitted adjustments to add. This list * should always be really short. */ for (i =...
false
false
false
false
false
0
_bfd_elf_match_sections_by_type (bfd *abfd, const asection *asec, bfd *bbfd, const asection *bsec) { if (asec == NULL || bsec == NULL || abfd->xvec->flavour != bfd_target_elf_flavour || bbfd->xvec->flavour != bfd_target_elf_flavour) return TRUE; return elf_section_type (asec) == elf_sect...
false
false
false
false
false
0
bin2str(char *to, const unsigned char *p, size_t len) { static const char *hex = "0123456789abcdef"; for (; len--; p++) { *to++ = hex[p[0] >> 4]; *to++ = hex[p[0] & 0x0f]; } *to = '\0'; }
false
false
false
false
false
0
message_dialog(char * title, GtkWidget * parent, GtkMessageType type, GtkButtonsType buttons, GtkWidget * extra, char * text, ...) { GtkWidget * dialog; va_list args; gchar * msg = NULL; int res; va_start(args, text); msg = g_strdup_vprintf(text, args); va_end(args); dialog = gtk_message_dialog_new(...
false
false
false
false
false
0