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
G__write_null_bits(int null_fd, const unsigned char *flags, int row, int cols, int fd) { off_t offset; size_t size; size = G__null_bitstream_size(cols); offset = (off_t) size *row; if (lseek(null_fd, offset, SEEK_SET) < 0) { G_warning(_("error writing null row %d"), row); return -1; ...
false
false
false
false
false
0
ompcbe_taskq_write_var_list(csbe_context *cx, Hmdf_table *hmdf, char *added_name) { int mtg_id = hmdf->mtg_id; int pc_num = hmdf->pc_num; int pe_num = hmdf->pe_num; int i, j; for (i = 0; i < pc_num; i++) { if (i != 0) csbe_printf(cx, ", %s", added_name); ompcbe_taskq_write_queue_name(cx, mt...
false
false
false
false
false
0
UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) { return; } // If we are belowe 30% HP cast enrage if (!m_bEnraged && m_creature->GetHealthPercent() <= 30.0f) { if (DoCastSpellIfCan(...
false
false
false
false
false
0
dup_latin1_string_to_zucs_string(char *src) { z_ucs *result; int len, i; if (src == NULL) return NULL; len = strlen(src); if ((result = malloc(sizeof(z_ucs) * (len + 1))) == NULL) return NULL; for (i=0; i<len; i++) result[i] = latin1_char_to_zucs_char(src[i]); result[i] = 0; return resul...
false
true
false
false
false
1
gst_camera_bin_image_sink_event_probe (GstPad * pad, GstPadProbeInfo * info, gpointer data) { GstCameraBin2 *camerabin = data; GstEvent *event = GST_EVENT (info->data); switch (GST_EVENT_TYPE (event)) { case GST_EVENT_CUSTOM_DOWNSTREAM:{ if (gst_event_has_name (event, "new-location")) { con...
false
false
false
false
false
0
qla8044_minidump_process_pollwr(struct scsi_qla_host *vha, struct qla8044_minidump_entry_hdr *entry_hdr, uint32_t **d_ptr) { uint32_t addr1, addr2, value1, value2, poll, r_value; uint32_t wait_count = 0; struct qla8044_minidump_entry_pollwr *pollwr_hdr; pollwr_hdr = (struct qla8044_minidump_entry_pollwr *)entry_...
false
false
false
false
false
0
setenv(const char* name, double val) { shell(fmt("touch /tmp/%u.pidinfo", getpid()), false); shell(fmt("grep -v '^%s=' /tmp/%u.pidinfo > /tmp/%u.pidinfo.bak", name, getpid(), getpid()), false); shell(fmt("cp -f /tmp/%u.pidinfo.bak /tmp/%u.pidinfo", getpid(), getpid()), false); shell(fmt("echo '%s=%f' >> /tmp/%u.pid...
false
false
false
false
false
0
do_plain_rerere(struct string_list *rr, int fd) { struct string_list conflict = STRING_LIST_INIT_DUP; struct string_list update = STRING_LIST_INIT_DUP; int i; find_conflict(&conflict); /* * MERGE_RR records paths with conflicts immediately after merge * failed. Some of the conflicted paths might have been h...
false
false
false
false
false
0
append_previous_extension(Node *cls, Node *am) { Node *n, *ne; Node *pe = 0; Node *ae = 0; if (!am) return; n = firstChild(am); while (n) { ne = nextSibling(n); set_nextSibling(n,0); /* typemaps and fragments need to be prepended */ if (((Cmp(nodeType(n),"typemap") == 0) || (Cmp(nodeType...
false
false
false
false
false
0
rc_dict_findattr (const rc_handle *rh, const char *attrname) { DICT_ATTR *attr; attr = rh->dictionary_attributes; while (attr != NULL) { if (strcasecmp (attr->name, attrname) == 0) { return attr; } attr = attr->next; } return NULL; }
false
false
false
false
false
0
UpdateBestHit(/*IN/UPDATE*/NJ_t *NJ, int nActive, /*IN/OUT*/besthit_t *hit, bool bUpdateDist) { int i = ActiveAncestor(/*IN*/NJ, hit->i); int j = ActiveAncestor(/*IN*/NJ, hit->j); if (i < 0 || j < 0 || i == j) { hit->i = -1; hit->j = -1; hit->weight = 0; hit->dist = 1e20; hit->criterion =...
false
false
false
false
true
1
build_marker_list(InstructionWords *words) { int instruction_counter = 0; InstructionWords *current_words = words; MarkerList *first_marker, *current_marker; first_marker = malloc(sizeof(MarkerList)); current_marker = first_marker; if(current_words) { while(current_words){ if(current_words->opcod...
false
false
false
false
false
0
ccp_crypto_enqueue_cmd(struct ccp_crypto_cmd *crypto_cmd) { struct ccp_crypto_cmd *active = NULL, *tmp; unsigned long flags; bool free_cmd = true; int ret; spin_lock_irqsave(&req_queue_lock, flags); /* Check if the cmd can/should be queued */ if (req_queue.cmd_count >= CCP_CRYPTO_MAX_QLEN) { ret = -EBUSY; ...
false
false
false
false
false
0
_new_DirReader(void) { DirReader *dr; /* The object to be returned */ /* * Allocate the container. */ dr = (DirReader *) malloc(sizeof(DirReader)); if(!dr) { errno = ENOMEM; return NULL; }; /* * Before attempting any operation that might fail, initialize the * container at least up to the point at ...
false
false
false
false
false
0
pixConvert1To2Cmap(PIX *pixs) { PIX *pixd; PIXCMAP *cmap; PROCNAME("pixConvert1To2Cmap"); if (!pixs) return (PIX *)ERROR_PTR("pixs not defined", procName, NULL); if (pixGetDepth(pixs) != 1) return (PIX *)ERROR_PTR("pixs not 1 bpp", procName, NULL); if ((pixd = pixConvert1To2(NU...
false
false
false
false
false
0
DeleteFile(const gunichar2 *name) { gchar *filename; int retval; gboolean ret = FALSE; guint32 attrs; #if 0 struct stat statbuf; struct _WapiFileShare *shareinfo; #endif if(name==NULL) { DEBUG("%s: name is NULL", __func__); SetLastError (ERROR_INVALID_NAME); return(FALSE); } filename=mono_unicode_to_...
false
false
false
false
false
0
m_emit_hdr (pIIR_PredefinedFunctionDeclaration sbp, string &str, RegionStack &rstack, int l) { rstack.push(sbp); str += "/* Prototype for predefined function " + get_long_name(sbp) + " */\n"; // Emit the various implicit subprogram prototypes string func_name = convert_string(sbp->declarator->text.to_chars(...
false
false
false
false
false
0
nation_group_by_rule_name(const char *name) { const char *qname = Qn_(name); nation_groups_iterate(pgroup) { if (0 == fc_strcasecmp(rule_name(&pgroup->name), qname)) { return pgroup; } } nation_groups_iterate_end; return NULL; }
false
false
false
false
false
0
htable_test(void) { size_t i; htable_t *ht; htable_iter_t *hti; char flags[256]; const void *key; int keys[4] = { 0xc7569bda, 0x65cb1432, 0x18659927, 0xf3362dc7 }; ht = htable_create(HASH_KEY_SELF, 0); htable_test_fill(ht); for (i = 0; i < 256; i++) { void *p = ulong_to_pointer(i); g_assert(htable_contain...
false
false
false
false
false
0
global_reg_mentioned_p_1 (loc, data) rtx *loc; void *data ATTRIBUTE_UNUSED; { int regno; rtx x = *loc; if (! x) return 0; switch (GET_CODE (x)) { case SUBREG: if (GET_CODE (SUBREG_REG (x)) == REG) { if (REGNO (SUBREG_REG (x)) < FIRST_PSEUDO_REGISTER && global_regs[subreg...
false
false
false
false
false
0
rc_variable( struct radeon_compiler * c, unsigned int DstFile, unsigned int DstIndex, unsigned int DstWriteMask, struct rc_reader_data * reader_data) { struct rc_variable * new = memory_pool_malloc(&c->Pool, sizeof(struct rc_variable)); memset(new, 0, sizeof(struct rc_variable)); new->C = c; new->Dst.File =...
false
false
false
false
false
0
getCountries(Form::FormItem *item) { if (!item->extraData().value(EXTRAS_COUNTRY).isEmpty()) return item->extraData().value(EXTRAS_COUNTRY).split(";"); return QStringList(); }
false
false
false
false
false
0
model_create_instance(int model_num, int submodel_num) { int i = 0; int open_slot = -1; // go through model instances and find an empty slot for ( i = 0; i < (int)Polygon_model_instances.size(); i++) { if ( !Polygon_model_instances[i] ) { open_slot = i; } } polymodel_instance *pmi = (polymodel_instance*)...
false
false
false
false
false
0
inf_xml_util_get_attribute_int(xmlNodePtr xml, const gchar* attribute, gint* result, GError** error) { xmlChar* value; gboolean retval; value = xmlGetProp(xml, (const xmlChar*)attribute); if(value == NULL) return FALSE...
false
false
false
false
false
0
addfcode(f_code ** p_code) { f_code * current, * tmp = NULL; current = *p_code; while(current) { tmp = current; current = current->next; } /* And current is the new element */ current = (f_code *)malloc(sizeof(f_code)); /* Make tmp->next point to current if tmp exists */ if(tmp) tmp->next = current; els...
false
false
false
false
false
0
iso_load_bullet_surfaces(void) { int i, j, k; char constructed_filename[5000]; DebugPrintf(1, "Number_Of_Bullet_Types: %d.", Number_Of_Bullet_Types); for (i = 0; i < Number_Of_Bullet_Types; i++) { if (strlen(Bulletmap[i].name) && strstr(Bulletmap[i].name, "NO BULLET IMAGE")) continue; for (j = 0; j < Bull...
false
false
false
false
false
0
DB_RemoveEnclosingSpaces (char *string) { char *pc1, *pc2; /** Find in pc2 the first non space character ** If not found, string is empty */ for (pc2 = string; (*pc2 != '\0') && (*pc2 == ' '); pc2++); if (*pc2 == '\0') { string [0] = '\0'; return; } /** Shift the strin...
false
false
false
false
false
0
handleCALL(Instruction *i) { if (prog->getType() == Program::TYPE_COMPUTE) { // Add implicit "thread id" argument in $r0 to the function i->setSrc(i->srcCount(), tid); } return true; }
false
false
false
false
false
0
unpack_border(int n, int first, double *buf) { int i,j,m,last; double *quat,*c1,*c2,*c3,*inertia; m = 0; last = first + n; for (i = first; i < last; i++) { if (i == nmax) grow(0); x[i][0] = buf[m++]; x[i][1] = buf[m++]; x[i][2] = buf[m++]; tag[i] = static_cast<int> (buf[m++]); type[i]...
false
false
false
false
false
0
elt(struct copy_context *copy, GLuint elt_idx) { GLuint elt = copy->srcelt[elt_idx]; GLuint slot = elt & (ELT_TABLE_SIZE-1); /* printf("elt %d\n", elt); */ /* Look up the incoming element in the vertex cache. Re-emit if * necessary. */ if (copy->vert_cache[slot].in != elt) { GLubyte *...
false
false
false
false
false
0
get_lang_entry(const char *lang) { int i, size = sizeof(lang_switch) / sizeof(struct lang_entry); /* * if language not specified, it assumes default language. */ if (lang == NULL) return DEFAULT_ENTRY; for (i = 0; i < size; i++) if (!str...
false
false
false
false
false
0
AcpiNsGetInternalNameLength ( ACPI_NAMESTRING_INFO *Info) { const char *NextExternalChar; UINT32 i; ACPI_FUNCTION_ENTRY (); NextExternalChar = Info->ExternalName; Info->NumCarats = 0; Info->NumSegments = 0; Info->FullyQualified = FALSE; /* *...
false
false
false
false
false
0
get( const string & key, t_CKUINT * val ) { // set to zero *val = 0; // find map<string, t_CKUINT>::iterator iter = m_map.find( key ); // check if( iter != m_map.end() ) *val = (*iter).second; // return good return 1; }
false
false
false
false
false
0
mf_m4_m8_m10_st() { target.base = fpregchk(); if (target.base != NOREG) { if (opcode == FSTP_ENCODED) opcode |= 0x40; buildfreg(); } else { ++mcount; getindirect(&source); if (source.size == 0x0) kgerror(SIZE_UNK); else if (source.size == 0x8) opcode |= 0x40; else if (sourc...
false
false
false
false
false
0
construct(ExecState* exec, const List& args) { QVariant res; bool ok; ScriptableExtension::Object actualObj = resolveAnyReferences(exec, &ok); if (ok) { ScriptableExtension::ArgList sargs = exportArgs(args); res = actualObj.owner->callAsConstructor(principal(exec), actualObj.objId, ...
false
false
false
false
false
0
bdisp_dbg_dump_tty(struct seq_file *s, u32 val) { seq_printf(s, "TTY\t0x%08X\t", val); seq_printf(s, "Pitch=%d - ", val & 0xFFFF); switch ((val & BLT_TTY_COL_MASK) >> BLT_TTY_COL_SHIFT) { case BDISP_RGB565: seq_puts(s, "RGB565 - "); break; case BDISP_RGB888: seq_puts(s, "RGB888 - "); break; case BDISP_XR...
false
false
false
false
false
0
ipmi_dump_lan_packet (int fd, const char *prefix, const char *hdr, const char *trlr, const void *pkt, unsigned int pkt_len, fiid_template_t tmpl_lan_msg_hdr, fiid_tem...
false
false
false
false
false
0
getName( ) const { if ( name.length() ) return name; if ( stat == off ) return "off"; return ASCString("Player ") + ASCString::toString(getPosition() ); }
false
false
false
false
false
0
ncp_invalidate_dircache_entries(struct dentry *parent) { struct ncp_server *server = NCP_SERVER(d_inode(parent)); struct dentry *dentry; spin_lock(&parent->d_lock); list_for_each_entry(dentry, &parent->d_subdirs, d_child) { dentry->d_fsdata = NULL; ncp_age_dentry(server, dentry); } spin_unlock(&parent->d_loc...
false
false
false
false
false
0
read_more(struct jffs2_sb_info *c, struct jffs2_raw_node_ref *ref, int needed_len, int *rdlen, unsigned char *buf) { int err, to_read = needed_len - *rdlen; size_t retlen; uint32_t offs; if (jffs2_is_writebuffered(c)) { int rem = to_read % c->wbuf_pagesize; if (rem) to_read += c->wbuf_pagesize - rem...
false
false
false
false
false
0
readPartial(char *tbuffer,int limit) { if (buffer.empty()) return -1; int i; memset(tbuffer,0,limit); for(i=0;!buffer.empty();) { if (buffer.front()>=32) tbuffer[i++]=buffer.front(); buffer.pop_front(); } return 0; }
false
false
false
false
false
0
update_6821_interrupts(struct pia6821 *p) { int new_state; /* start with IRQ A */ new_state = 0; if ((p->irq_a1 && IRQ1_ENABLED(p->ctl_a)) || (p->irq_a2 && IRQ2_ENABLED(p->ctl_a))) new_state = 1; if (new_state != p->irq_a_state) { p->irq_a_state = new_state; if (p->intf->irq_a_func) update_shared_i...
false
false
false
false
false
0
print_database_DS( database_DS p, char *t) { int i; if(p==NULL) { printf("\npointer passed is null for %s\n",t); return; } printf(" not prinitng file pointers for data and header in db %s\n",t); printf(" n_data,n_atts,input_n_atts,compressed_p %d %d %d %d \n", p->n_data, p->n_atts, p->input_n_atts, p->c...
false
false
false
false
false
0
addr_bind(evutil_socket_t fd, const ioa_addr* addr, int reusable) { if (!addr || fd < 0) { return -1; } else { int ret = -1; socket_set_reusable(fd, reusable); if (addr->ss.sa_family == AF_INET) { do { ret = bind(fd, (const struct sockaddr *) addr, sizeof(struct sockaddr_in)); } while (ret < 0 ...
false
false
false
false
false
0
lua_rawgeti(lua_State *L, int idx, int n) { cTValue *v, *t = index2adr(L, idx); api_check(L, tvistab(t)); v = lj_tab_getint(tabV(t), n); if (v) { copyTV(L, L->top, v); } else { setnilV(L->top); } incr_top(L); }
false
false
false
false
false
0
build_transaction_expr (location_t loc, tree expr, int flags, tree noex) { tree ret; if (noex) { expr = build_must_not_throw_expr (expr, noex); SET_EXPR_LOCATION (expr, loc); TREE_SIDE_EFFECTS (expr) = 1; } ret = build1 (TRANSACTION_EXPR, TREE_TYPE (expr), expr); if (flags & TM_STMT_AT...
false
false
false
false
false
0
Write(uint16_t* buffer, int start, int length) const { if (IsDeadCheck("v8::String::Write()")) return 0; LOG_API("String::Write"); ENTER_V8; ASSERT(start >= 0 && length >= -1); i::Handle<i::String> str = Utils::OpenHandle(this); StringTracker::RecordWrite(str); int end = length; if ( (length == -1) || (...
false
false
false
false
false
0
parseTuple(Value *&value) { TupleValue* val; if (!parseCSV(&val, '{', '}')) return false; value = val; return true; }
false
false
false
false
false
0
RemoveSymTorsionValues(int fold) { vector<double>::iterator i; vector<double> tv; if (_torsionAngles.size() == 1) return; for (i = _torsionAngles.begin();i != _torsionAngles.end();++i) if (*i >= 0.0 && *i < 2.0*M_PI / fold) tv.push_back(*i); if (tv.empty()) return; ...
false
false
false
false
false
0
dev_c7200_iocard_2fe_init(vm_instance_t *vm,struct cisco_card *card) { struct pa_i8254x_data *data; u_int slot = card->slot_id; /* Allocate the private data structure for the iocard */ if (!(data = malloc(sizeof(*data)))) { vm_error(vm,"%s: out of memory\n",card->dev_name); return(-1); } ...
false
false
false
false
false
0
C_i_string_ref(C_word s, C_word i) { int j; if(C_immediatep(s) || C_header_bits(s) != C_STRING_TYPE) barf(C_BAD_ARGUMENT_TYPE_ERROR, "string-ref", s); if(i & C_FIXNUM_BIT) { j = C_unfix(i); if(j < 0 || j >= C_header_size(s)) barf(C_OUT_OF_RANGE_ERROR, "string-ref", s, i); return C_subchar(s, i...
false
false
false
false
false
0
help_list (GList *names, gchar *cmd, cmd_type_t cmdtype) { const gchar *cmdtxt_sing, *cmdtxt_plur, *cmdtxt_det; /* This is a bit tedious, english-- */ switch (cmdtype) { case CMD_TYPE_ALIAS: cmdtxt_sing = _("alias"); cmdtxt_plur = _("aliases"); cmdtxt_det = _("an"); break; case CMD_TYPE_COMMAND: default...
false
false
false
false
false
0
numfmt_cleanup(void) { #if !UCONFIG_NO_SERVICE if (gService) { delete gService; gService = NULL; } #endif if (NumberingSystem_cache) { // delete NumberingSystem_cache; uhash_close(NumberingSystem_cache); NumberingSystem_cache = NULL; } return TRUE; }
false
false
false
false
false
0
issueQUIT (Connection cxn) { Buffer quitBuffer, *writeArray ; const char *peerName = hostPeerName (cxn->myHost) ; ASSERT (cxn->takeHead == NULL) ; ASSERT (cxn->checkHead == NULL) ; VALIDATE_CONNECTION (cxn) ; if (cxn->quitWasIssued) return ; if (writeIsPending (cxn->myEp)) { syslog (LOG...
false
false
false
false
false
0
stack_global() { static STACK result; if ( !stack ) { int const size = 1 << 21; stack = BJAM_MALLOC( size ); result.data = (char *)stack + size; } return &result; }
false
false
false
false
false
0
xml_parse_meta_node (xmlNodePtr meta_node, lglTemplate *template) { gchar *product_url; gchar *category; product_url = lgl_xml_get_prop_string (meta_node, "product_url", NULL); if ( product_url != NULL ) { g_free...
false
false
false
false
false
0
Read(void* pData) { this->m_GZFile = gzopen( m_FileName.c_str(), "rb"); if( !this->m_GZFile ) { itkExceptionMacro(<< "Can't find/open file: " << m_FileName); return; } const unsigned long numPixels = m_Dimensions[0] * m_Dimensions[1] * m_Dimensions[2]; const unsigned int componentSize( this->G...
false
false
false
false
false
0
Scale(double *p1, double *p2, int vtkNotUsed(X), int Y) { // Get the motion vector double v[3]; v[0] = p2[0] - p1[0]; v[1] = p2[1] - p1[1]; v[2] = p2[2] - p1[2]; double center[3] = {0.0,0.0,0.0}; double avgdist = 0.0; double *prevctr = this->HandleGeometry[0]->GetCenter(); double *ctr; center[0] +...
false
false
false
false
false
0
FindReusablePredBB(PHINode *DestPHI, BasicBlock *TIBB) { BasicBlock *Dest = DestPHI->getParent(); /// TIPHIValues - This array is lazily computed to determine the values of /// PHIs in Dest that TI would provide. SmallVector<Value*, 32> TIPHIValues; /// TIBBEntryNo - This is a cache to speed up pred que...
false
false
false
false
false
0
m_emit_decl (pIIR_ConstantDeclaration c, string &str, RegionStack &rstack, int l) { str += spaces(l); if (!c->initial_value) str += "extern "; str += "const "; emit_type_name (c->subtype, str, rstack, 0); str += " "; emit_id (c, str, rstack); if (c->initial_value) { str += " = "; emit...
false
false
false
false
false
0
hash_remove_by_value (struct hash *hash, void *value, bool autolock) { struct hash_iterator hi; struct hash_element *he; hash_iterator_init (hash, &hi, autolock); while ((he = hash_iterator_next (&hi))) { if (he->value == value) hash_iterator_delete_element (&hi); } hash_iterator_free (&hi); }
false
false
false
false
false
0
nvkm_nvsw_mthd_(struct nvkm_object *object, u32 mthd, void *data, u32 size) { struct nvkm_nvsw *nvsw = nvkm_nvsw(object); if (nvsw->func->mthd) return nvsw->func->mthd(nvsw, mthd, data, size); return -ENODEV; }
false
false
false
false
false
0
gt_firstcodes_countocc_setnull(GtFirstcodestab *fct) { fct->leftborder = NULL; fct->countocc_small = NULL; fct->leftborder_samples = NULL; fct->countocc_exceptions = NULL; fct->differentcodes = 0; fct->hashmap_addcount = 0; fct->hashmap_getcount = 0; fct->outfilenameleftborder = NULL; #ifdef _LP64 GT_...
false
false
false
false
false
0
checkConstError2(const Token *tok1, const Token *tok2, const std::string &classname, const std::string &funcname, bool suggestStatic) { std::list<const Token *> toks; toks.push_back(tok1); if (tok2) toks.push_back(tok2); if (!suggestStatic) reportError(toks, Severity::style, "functionCon...
false
false
false
false
false
0
dfb_surfacemanager_adjust_heap_offset( SurfaceManager *manager, int offset ) { D_MAGIC_ASSERT( manager, SurfaceManager ); D_ASSERT( offset >= 0 ); D_DEBUG_AT( SurfMan, "%s( %p, %d )\n", __FUNCTION__, manager, offset ); /*FIXME_SC_2 if (ma...
false
false
false
false
false
0
ext_buddy_unblock_response(MsnAccount *ma, int error, MsnBuddy *buddy) { if (error) { char buf[1024]; snprintf(buf, sizeof(buf), _ ("Could not unblock <i>%s</i>. Server returned an error."), buddy->passport); ay_do_warning(_("MSN"), buf); } }
false
false
false
false
false
0
dav_generic_dbm_new_error(apr_dbm_t *db, apr_pool_t *p, apr_status_t status) { int errcode; const char *errstr; dav_error *err; char errbuf[200]; if (status == APR_SUCCESS) { return NULL; } /* There might not be a <db> if we had problems...
false
false
false
false
false
0
transaction_model_get_transaction_iter ( GtkTreeIter *iter, gint transaction_number, gint line_in_transaction ) { gint i; gint mother_transaction_number = transaction_number; gboolean is_child; CustomRecord *record = NULL; g_return_val_if_fail (iter != NULL, FALSE); g_return_val...
false
false
false
true
false
1
__zzip_try_open(zzip_char_t * filename, int filemode, zzip_strings_t * ext, zzip_plugin_io_t io) { auto char file[PATH_MAX]; int fd; zzip_size_t len = strlen(filename); if (len + 4 >= PATH_MAX) { errno = ENAMETOOLONG; return -1; } memcpy(file, filename, len + 1); if (! ...
false
false
false
false
false
0
__ecereProp___ecereNameSpace__ecere__gfx3D__meshes__SkyBox_Set_size(struct __ecereNameSpace__ecere__com__Instance * this, struct __ecereNameSpace__ecere__gfx3D__Vector3Df * value) { struct __ecereNameSpace__ecere__gfx3D__meshes__SkyBox * __ecerePointer___ecereNameSpace__ecere__gfx3D__meshes__SkyBox = (struct __ecereNam...
false
false
false
true
false
1
wlcore_event_ba_rx_constraint(struct wl1271 *wl, unsigned long roles_bitmap, unsigned long allowed_bitmap) { struct wl12xx_vif *wlvif; wl1271_debug(DEBUG_EVENT, "%s: roles=0x%lx allowed=0x%lx", __func__, roles_bitmap, allowed_bitmap); wl12xx_for_each_wlvif(wl, wlvif) { if (wlvif->role_id == ...
false
false
false
false
false
0
operator<<(std::ostream& stream, const byte_array &array) { stream << "["; const std::ios_base::fmtflags f = stream.flags(); std::hex(stream); const char *data = &array[0]; const byte_array::size_type out_len = std::min<byte_array::size_type>(array.size(), 50); for (byte_array::size_type i = 0; ...
false
false
false
false
false
0
addCodeStaticMethod(QScriptEngine::FunctionSignature method, const QString &objectName, const QString &methodName, QScriptEngine *scriptEngine) const { QScriptValue classMetaObject = scriptEngine->globalObject().property(objectName); if(!classMetaObject.isValid()) { classMetaObject = scriptEngine->newObject()...
false
false
false
false
false
0
createSdiMain() { QLuaSdiMain *e = d->sdiMain; QtLuaEngine *engine = QLuaApplication::engine(); if (e) { activateWidget(e); } else { // create e = new QLuaSdiMain(); e->setAttribute(Qt::WA_DeleteOnClose); if (engine) engine->nameObject(e); // show d-...
false
false
false
false
false
0
gt_encseq_faststream_kmers(const GtEncseq *encseq, Bitstreamreadmode bsrsmode, unsigned int kmersize) { unsigned long totallength, pos; GtCodetype kmer; GtKmercodeiterator *kmercodeiterator = NULL; const GtKmercode *kmercodeptr; con...
false
false
false
false
false
0
on_about_plugin_activate(GtkMenuItem *item, AnjutaShell *shell) { gchar *name = NULL; gchar *authors = NULL; gchar *license = NULL; gchar **authors_v = NULL; gchar *icon = NULL; gchar *d = NULL; GdkPixbuf *pix = NULL; GtkWidget *dialog; AnjutaPluginDescription *desc; desc = g_ob...
false
false
false
false
false
0
btbeginscan(PG_FUNCTION_ARGS) { Relation rel = (Relation) PG_GETARG_POINTER(0); int nkeys = PG_GETARG_INT32(1); int norderbys = PG_GETARG_INT32(2); IndexScanDesc scan; BTScanOpaque so; /* no order by operators allowed */ Assert(norderbys == 0); /* get the scan */ scan = RelationGetIndexScan(rel, nkeys, n...
false
false
false
false
false
0
merge_webkdc_proxies(struct webauth_context *ctx, struct wai_webkdc_login_state *state) { struct webauth_token *wkproxy; struct webauth_token_webkdc_proxy *wpt; time_t limit; int s; /* * Merge the webkdc-proxy tokens. If we get WA_ERR_TOKEN_REJECTED back, * the clien...
false
false
false
false
false
0
vpfe_ccdc_config_black_clamp(struct vpfe_ccdc *ccdc, struct vpfe_ccdc_black_clamp *bclamp) { u32 val; if (!bclamp->enable) { /* configure DCSub */ val = (bclamp->dc_sub) & VPFE_BLK_DC_SUB_MASK; vpfe_reg_write(ccdc, val, VPFE_DCSUB); vpfe_reg_write(ccdc, VPFE_CLAMP_DEFAULT_VAL, VPFE_CLAMP); return; ...
false
false
false
false
false
0
snmpNotifyFilterRowStatus_undo_setup(snmpNotifyFilterTable_rowreq_ctx * rowreq_ctx) { DEBUGMSGTL(("verbose:snmpNotifyFilterTable:snmpNotifyFilterRowStatus_undo_setup", "called\n")); /** should never get a NULL pointer */ netsnmp_assert(NULL != rowreq_ctx); /* ...
false
false
false
true
false
1
ata_host_start(struct ata_host *host) { int have_stop = 0; void *start_dr = NULL; int i, rc; if (host->flags & ATA_HOST_STARTED) return 0; ata_finalize_port_ops(host->ops); for (i = 0; i < host->n_ports; i++) { struct ata_port *ap = host->ports[i]; ata_finalize_port_ops(ap->ops); if (!host->ops && !a...
false
false
false
true
false
1
handle_zo(void) { TreeNode *x, *y, *nt; for (x = toks.next; x != &toks; x = x->next) { if ((x->type == N_CMAVO) && cmavo_table[x->data.cmavo.code].selmao == ZO) { y = x->next; if (y == &toks) { fprintf(stderr, "Cannot have ZO as the last token in the text\n"); ...
false
false
false
false
false
0
dm_bit_get_next(dm_bitset_t bs, int last_bit) { int bit, word; uint32_t test; last_bit++; /* otherwise we'll return the same bit again */ /* * bs[0] holds number of bits */ while (last_bit < (int) bs[0]) { word = last_bit >> INT_SHIFT; test = bs[word + 1]; bit = last_bit & (DM_BITS_PER_INT - 1); if...
false
false
false
false
false
0
init(uint random, uint max_size) { m_pass= 0; if (max_size == 0) { /* Degenerated case, no buffer */ m_pass_max= 0; return; } DBUG_ASSERT(random < max_size); if (PFS_MAX_ALLOC_RETRY < max_size) { /* The buffer is big compared to PFS_MAX_ALLOC_RETRY, scan it only partially. ...
false
false
false
false
false
0
gck_object_set_property (GObject *obj, guint prop_id, const GValue *value, GParamSpec *pspec) { GckObject *self = GCK_OBJECT (obj); /* The sets to data below are only allowed during construction */ switch (prop_id) { case PROP_MODULE: g_return_if_fail (!self->pv->module); self->pv->mo...
false
false
false
false
false
0
handle( SP_HttpRequest * request, SP_HttpResponse * response ) { response->setStatusCode( 200 ); response->appendContent( "<html><head>" "<title>Welcome to simple http</title>" "</head><body>" ); char buffer[ 512 ] = { 0 }; snprintf( buffer, sizeof( buffer ), "<p>The requested URI is : %s.</p>", reque...
false
false
false
false
false
0
isValid() const { return m_score >= 0 && (m_color == 'W' || m_color == 'B'); }
false
false
false
false
false
0
print_new(t_symbol *s) { t_print *x = (t_print *)pd_new(print_class); x->x_sym = (s->s_name[0]? s : gensym("print~")); x->x_count = 0; x->x_f = 0; return (x); }
false
false
false
false
false
0
e_contact_address_copy (EContactAddress *address) { EContactAddress *address2 = g_new0 (EContactAddress, 1); address2->address_format = g_strdup (address->address_format); address2->po = g_strdup (address->po); address2->ext = g_strdup (address->ext); address2->street = g_strdup (address->street); address2->loca...
false
false
false
false
false
0
remap_cgen(msp430_amode_t *mode, address_t *addr, msp430_reg_t *reg) { if (*reg == MSP430_REG_SR) { if (*mode == MSP430_AMODE_INDIRECT) { *mode = MSP430_AMODE_IMMEDIATE; *addr = 4; } else if (*mode == MSP430_AMODE_INDIRECT_INC) { *mode = MSP430_AMODE_IMMEDIATE; *addr = 8; } } else ...
false
false
false
false
false
0
gpg_decrypt (GMimeCryptoContext *context, GMimeStream *istream, GMimeStream *ostream, GError **err) { #ifdef ENABLE_CRYPTOGRAPHY GMimeGpgContext *ctx = (GMimeGpgContext *) context; GMimeDecryptResult *result; const char *diagnostics; struct _GpgCtx *gpg; int save; gpg = gpg_ctx_new (ctx); gpg_ctx_set_mod...
false
false
false
false
false
0
gdict_source_chooser_has_source (GdictSourceChooser *chooser, const gchar *source_name) { GdictSourceChooserPrivate *priv; g_return_val_if_fail (GDICT_IS_SOURCE_CHOOSER (chooser), FALSE); g_return_val_if_fail (source_name != NULL, FALSE); priv = chooser->priv; if (!p...
false
false
false
false
false
0
zlib_deflate( std::string content ){ int ret, flush; z_stream stream; const unsigned int CHUNK = 16384; uint8_t in[CHUNK], out[CHUNK]; size_t pos = 0; std::string str_chunk, result; stream.zalloc = Z_NULL; stream.zfree = Z_NULL; stream.opaque = Z_NULL; // Use default compression ret = deflateInit( &strea...
false
false
false
false
false
0
QuaZipDir_convertInfoList(const QList<QuaZipFileInfo> &from, QStringList &to) { to.clear(); for(QList<QuaZipFileInfo>::const_iterator i = from.constBegin(); i != from.constEnd(); ++i) { to.append(i->name); } }
false
false
false
false
false
0
isImmSExt20(int64_t Val, int64_t &Imm) { if (Val >= -524288 && Val <= 524287) { Imm = Val; return true; } return false; }
false
false
false
false
false
0
ipsec_sa_destroy(private_kernel_netlink_ipsec_t *this, ipsec_sa_t *sa) { if (ref_put(&sa->refcount)) { this->sas->remove(this->sas, sa); DESTROY_IF(sa->src); DESTROY_IF(sa->dst); free(sa); } }
false
false
false
false
false
0
microdesc_cache_clean(microdesc_cache_t *cache, time_t cutoff, int force) { microdesc_t **mdp, *victim; int dropped=0, kept=0; size_t bytes_dropped = 0; time_t now = time(NULL); /* If we don't know a live consensus, don't believe last_listed values: we * might be starting up after being down for a while. ...
false
false
false
false
false
0
brigade_append(apr_bucket_brigade *bbOut, apr_bucket_brigade *bbIn) { while (!APR_BRIGADE_EMPTY(bbIn)) { apr_bucket *e = APR_BRIGADE_FIRST(bbIn); const char *str; apr_size_t len; apr_status_t rv; rv = apr_bucket_read(e, &str, &len, APR_BLOCK_READ); if (rv != APR_SUCC...
false
false
false
false
false
0
getString(char *&stringVal) { /* get string data */ stringVal = OFstatic_cast(char *, getValue()); /* convert to internal string representation (without padding) if required */ if ((stringVal != NULL) && (fStringMode != DCM_MachineString)) makeMachineByteString(); return errorFlag; }
false
false
false
false
false
0
tps6586x_rtc_read_time(struct device *dev, struct rtc_time *tm) { struct tps6586x_rtc *rtc = dev_get_drvdata(dev); struct device *tps_dev = to_tps6586x_dev(dev); unsigned long long ticks = 0; unsigned long seconds; u8 buff[6]; int ret; int i; ret = tps6586x_reads(tps_dev, RTC_COUNT4_DUMMYREAD, sizeof(buff), bu...
false
false
false
false
false
0