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
buf_dss_verify(buffer* buf, dss_key *key, const unsigned char* data, unsigned int len) { unsigned char msghash[SHA1_HASH_SIZE]; hash_state hs; int ret = DROPBEAR_FAILURE; DEF_MP_INT(val1); DEF_MP_INT(val2); DEF_MP_INT(val3); DEF_MP_INT(val4); char * string = NULL; int stringlen; TRACE(("enter buf_dss_veri...
true
true
false
true
false
1
GTextFieldBiPosFromPos(GTextField *gt,int i,int pos) { int ll,j; unichar_t *pt = gt->text+pos; if ( !gt->dobitext ) return( pos ); ll = gt->lines[i+1]==-1?-1:gt->lines[i+1]-gt->lines[i]-1; for ( j=gt->lines[i]; j<ll; ++j ) if ( gt->bidata.original[j] == pt ) return( j ); return( pos ); }
false
false
false
false
false
0
DecodeArmMOVTWInstruction(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder) { DecodeStatus S = MCDisassembler::Success; unsigned Rd = fieldFromInstruction(Insn, 12, 4); unsigned pred = fieldFromInstruction(Insn, 28, 4); unsigned imm = 0; imm |= (fieldFromIn...
false
false
false
false
false
0
getOptionWidth(const Option &O) const { size_t Len = std::strlen(O.ArgStr); if (const char *ValName = getValueName()) Len += std::strlen(getValueStr(O, ValName))+3; return Len + 6; }
false
false
false
false
false
0
valueFlowSubFunction(TokenList *tokenlist, ErrorLogger *errorLogger, const Settings *settings) { for (Token *tok = tokenlist->front(); tok; tok = tok->next()) { if (!Token::Match(tok, "%var% (")) continue; const Function * const currentFunction = tok->function(); if (!currentFun...
false
false
false
false
false
0
create_nsproxy(void) { struct nsproxy *nsproxy; nsproxy = kmem_cache_alloc(nsproxy_cachep, GFP_KERNEL); if (nsproxy) atomic_set(&nsproxy->count, 1); return nsproxy; }
false
false
false
false
false
0
veth_get_link_net(const struct net_device *dev) { struct veth_priv *priv = netdev_priv(dev); struct net_device *peer = rtnl_dereference(priv->peer); return peer ? dev_net(peer) : dev_net(dev); }
false
false
false
false
false
0
setxattr (const char *pathname, const char *name, const void *value, size_t size, int flags) { int result; instw_t instw; REFCOUNT; if (!libc_handle) initialize(); #if DEBUG debug(2,"setxattr(%s,%s)\n",pathname,name); #endif /* We were as...
false
false
false
false
false
0
gabedit_text_set_point(GtkWidget* text, gint char_offset) { GtkTextBuffer *buffer; GtkTextIter start; GtkTextIter end; GtkTextIter iter; if(!GTK_IS_TEXT_VIEW (text)) return; buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (text)); if(!buffer) return; gtk_text_buffer_get_bounds (buffer, &start, &end); if(char...
false
false
false
false
false
0
ASC_getCopyOfIdentResponse(T_ASC_Parameters * params, char*& buffer, unsigned short& bufferLen) { if (params == NULL) { buffer = NULL; bufferLen = 0; return; } UserIdentityNegotiationSubItemAC *rsp = params->DULparams.ackUserIdentNeg; ...
false
false
false
false
false
0
combine(const char *path, const char *name) { char *f; size_t pathlen; size_t namelen; if (!path || !*path) return (char *)name; pathlen = strlen(path); namelen = strlen(name); f = (char *)mem.malloc(pathlen + 1 + namelen + 1); memcpy(f, path, pathlen); #if POSIX if (path[path...
false
false
false
false
false
0
gconf_value_free_list(GConfValue* value) { GSList* tmp; GConfRealValue *real; g_return_if_fail(value != NULL); g_return_if_fail(value->type == GCONF_VALUE_LIST); real = REAL_VALUE (value); tmp = real->d.list_data.list; while (tmp != NULL) { gconf_value_free(tmp->data); tmp =...
false
false
false
false
false
0
sgen_fragment_allocator_alloc (void) { SgenFragment *frag = fragment_freelist; if (frag) { fragment_freelist = frag->next_in_order; frag->next = frag->next_in_order = NULL; return frag; } frag = sgen_alloc_internal (INTERNAL_MEM_FRAGMENT); frag->next = frag->next_in_order = NULL; return frag; }
false
false
false
false
false
0
DeleteFeature( long nFID ) { GetLayerDefn(); if (!poDS->IsReadWrite()) { CPLError(CE_Failure, CPLE_AppDefined, "Operation not available in read-only mode"); return OGRERR_FAILURE; } OGRFeature* poFeature = GetFeature(nFID); if (poFeature == NULL) return...
false
false
false
false
false
0
IRQHandler_3812(int n,int irq) { if (intf_3812->handler[n]) (intf_3812->handler[n])(irq ? ASSERT_LINE : CLEAR_LINE); }
false
false
false
false
false
0
gee_multi_set_base_init (GeeMultiSetIface * iface) { static gboolean initialized = FALSE; if (!initialized) { initialized = TRUE; iface->get_read_only_view = gee_multi_set_real_get_read_only_view; } }
false
false
false
false
false
0
NK6510_GetSecurityCodeStatus(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x11, 0x00}; if (!data->security_code) return GN_ERR_INTERNALERROR; SEND_MESSAGE_BLOCK(NK6510_MSG_SECURITY, 5); }
false
false
false
false
false
0
dump_one(struct cache_tree *it, const char *pfx, const char *x) { if (it->entry_count < 0) printf("%-40s %s%s (%d subtrees)\n", "invalid", x, pfx, it->subtree_nr); else printf("%s %s%s (%d entries, %d subtrees)\n", sha1_to_hex(it->sha1), x, pfx, it->entry_count, it->subtree_nr); }
false
false
false
false
false
0
FreeImage_ZLibGZip(BYTE *target, DWORD target_size, BYTE *source, DWORD source_size) { uLongf dest_len = (uLongf)target_size - 12; DWORD crc = crc32(0L, NULL, 0); // set up header (stolen from zlib/gzio.c) sprintf((char *)target, "%c%c%c%c%c%c%c%c", 0x1f, 0x8b, Z_DEFLATED, 0 /*flags*/, 0,0,0,0 /*tim...
false
false
false
false
false
0
ReadText( const char* p, TIXML_STRING * text, bool trimWhiteSpace, const char* endTag, bool caseInsensitive, TiXmlEncoding encoding ) { *text = ""; if ( !trimWhiteSpace // certain tags always keep whitespace || !condenseWhiteSpace ) // if true, whitespace is...
false
false
false
false
false
0
requestHoldSlave(const QString &url, const QString &app_socket) { // handle method call org.kde.KLauncher.requestHoldSlave return static_cast<KLauncher *>(parent())->requestHoldSlave(KUrl(url), app_socket); }
false
false
false
false
false
0
__fscache_uncache_page(struct fscache_cookie *cookie, struct page *page) { struct fscache_object *object; _enter(",%p", page); ASSERTCMP(cookie->def->type, !=, FSCACHE_COOKIE_TYPE_INDEX); ASSERTCMP(page, !=, NULL); fscache_stat(&fscache_n_uncaches); /* cache withdrawal may beat us to it */ if (!PageFsCache(p...
false
false
false
false
false
0
exportToStreamAllCurvesTogether(Q3TextStream& str, CoordSettings coord, GridMeshSettings grid, ExportSettings xport, int xPrecision, int yPrecision) { // list of x values in ascending order QList<double> xUsed = ascendingXValuesList(coord, grid, xport, xPrecision); if (xport.header != HeaderNone) { // he...
false
false
false
false
false
0
sys_one_numeric_arg_compiletf(PLI_BYTE8 *name) { vpiHandle callh = vpi_handle(vpiSysTfCall, 0); vpiHandle argv = vpi_iterate(vpiArgument, callh); /* Check that there is an argument and that it is numeric. */ if (argv == 0) { vpi_printf("ERROR: %s:%d: ", vpi_get_str(vpiFile, callh), ...
false
false
false
false
false
0
e_ilist_nth_label_set(Evas_Object *obj, int n, const char *label) { E_Ilist_Item *si = NULL; /* check for a NULL label first...simpler, faster check then doing * API_ENTRY check first */ if (!label) return; API_ENTRY return; if (!sd->items) return; si = eina_list_nth(sd->items, n); if (si) e_i...
false
false
false
false
false
0
reset_changed_flag (void) { struct dlist *d; for (d = WEBS(SPILLED); d; d = d->next) DLIST_WEB(d)->changed = 0; }
false
false
false
false
false
0
BroadcastToOfficers(WorldSession* session, const std::string& msg, uint32 language) { if (session && session->GetPlayer() && HasRankRight(session->GetPlayer()->GetRank(), GR_RIGHT_OFFCHATSPEAK)) { for (MemberList::const_iterator itr = members.begin(); itr != members.end(); ++itr) { W...
false
false
false
false
false
0
qb_pop(struct QueueBuffer *qbuf, void *buffer, size_t numbytes) { if (!qbuf) return 0; struct QueueBufferNode *current = qbuf->head; char *cbuffer = (char *)buffer; int i = 0, delta; while (i < numbytes) { // Check if the head node is empty if (qbuf->head->front == qbuf->head->back) { if (qbuf->hea...
false
false
false
false
false
0
glade_gtk_about_dialog_set_property (GladeWidgetAdaptor * adaptor, GObject * object, const gchar * id, const GValue * value) { if (!strcmp (id, "glade-logo-as-file")) { GladeWidget *gwidget = glade_widget_get_from_gobject (object); glade_widget_property_set_sensitive (gwidget, "logo...
false
false
false
false
false
0
whole_par_func(MPL *mpl, void *info) { /* this is auxiliary routine to work within domain scope */ PARAMETER *par = (PARAMETER *)info; TUPLE *tuple = get_domain_tuple(mpl, par->domain); switch (par->type) { case A_NUMERIC: case A_INTEGER: case A_BINARY: eval_me...
false
false
false
false
false
0
test_foreach_element (void) { JsonArray *array = json_array_new (); TestForeachFixture fixture = { 0, }; json_array_add_int_element (array, 42); json_array_add_boolean_element (array, TRUE); json_array_add_string_element (array, "hello"); json_array_add_null_element (array); fixture.elements = json_arra...
false
false
false
false
false
0
gp_cairo_set_font(plot_struct *plot, const char *name, int fontsize) { char *c; char *fname; FPRINTF(("set_font \"%s\" %d\n", name,fontsize)); /* Split out Bold and Italic attributes from font name */ fname = strdup(name); for (c=fname; *c; c++) { if (*c == '\\') { char *d = c; do { *d = *(d+1); ...
false
true
false
false
false
1
biv_fits_mode_p (const struct loop *loop, struct iv_class *bl, HOST_WIDE_INT incr, enum machine_mode mode, bool unsignedp) { struct loop_info *loop_info; unsigned HOST_WIDE_INT bias; /* A biv's value will always be limited to its natural mode. Larger modes will observe the same wrap-around. */ if (GET...
false
false
false
false
false
0
hostfile_init(void) { FILE *hf; char buf[1024]; static Boolean hostfile_initted = False; struct host *h; char *hostfile_name; if (hostfile_initted) return; hostfile_initted = True; hostfile_name = appres.hostsfile; if (hostfile_name == CN) hostfile_name = xs_buffer("%s/ibm_hosts", appres.conf_dir); else...
true
true
true
false
true
1
set_stream_buffer_size (unsigned buffer_size, unsigned num_buffers) { yield = true; PWaitAndSignal m(core_mutex); PTRACE(4, "AudioInputCore\tSetting stream buffer size " << num_buffers << "/" << buffer_size); if (current_manager) current_manager->set_buffer_size(buffer_size, num_buffers); stream_config...
false
false
false
false
false
0
rv740_get_decoded_reference_divider(u32 encoded_ref) { u32 ref = 0; switch (encoded_ref) { case 0: ref = 1; break; case 16: ref = 2; break; case 17: ref = 3; break; case 18: ref = 2; break; case 19: ref = 3; break; case 20: ref = 4; break; ...
false
false
false
false
false
0
rek(IntegerVectorList const &b, IntegerVector &x, IntegerVectorList &output) { // fprintf(stdout,"rek\n"); // AsciiPrinter(Stdout).printVector(x); int ret=1; output.push_back(x); for(IntegerVectorList::const_iterator i=b.begin();i!=b.end();i++) { x+=*i; if(x.isNonNegative()) if(findImprov...
false
false
false
false
false
0
onLeftBtnRelease(FXObject*,FXSelector,void* ptr){ if(isEnabled()){ ungrab(); mode=MOUSE_NONE; stopAutoScroll(); if(target && target->tryHandle(this,FXSEL(SEL_LEFTBUTTONRELEASE,message),ptr)) return 1; return 1; } return 0; }
false
false
false
false
false
0
hidinput_cleanup_hidinput(struct hid_device *hid, struct hid_input *hidinput) { struct hid_report *report; int i, k; list_del(&hidinput->list); input_free_device(hidinput->input); for (k = HID_INPUT_REPORT; k <= HID_OUTPUT_REPORT; k++) { if (k == HID_OUTPUT_REPORT && hid->quirks & HID_QUIRK_SKIP_OUTPUT_RE...
false
false
false
false
false
0
store_target_kb(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { char *endchar; unsigned long long target_bytes; if (!capable(CAP_SYS_ADMIN)) return -EPERM; target_bytes = simple_strtoull(buf, &endchar, 0) * 1024; balloon_set_new_target(target_b...
false
false
false
false
false
0
execlists_move_to_gpu(struct drm_i915_gem_request *req, struct list_head *vmas) { const unsigned other_rings = ~intel_ring_flag(req->ring); struct i915_vma *vma; uint32_t flush_domains = 0; bool flush_chipset = false; int ret; list_for_each_entry(vma, vmas, exec_list) { struct drm_i915_gem_object *obj = v...
false
false
false
false
false
0
enroll_start_sm_run_state(struct fpi_ssm *ssm) { struct fp_dev *dev = ssm->dev; int r; switch (ssm->cur_state) { case RUN_INITSM: ; struct fpi_ssm *initsm = initsm_new(dev); initsm->priv = ssm; fpi_ssm_start(initsm, enroll_start_sm_cb_initsm); break; case ENROLL_INIT: ; struct libusb_transfer *transfer;...
false
false
false
false
false
0
start_formatting(Void) { FILE *infile; static int wrote_one = 0; extern int usedefsforcommon; extern char *p1_file, *p1_bakfile; this_proc_name[0] = '\0'; last_was_label = 0; ei_next = ei_first; wh_next = wh_first; (void) fclose (pass1_file); if ((infile = fopen (p1_file, binre...
true
true
false
false
true
1
initialize_block_counters(struct page *page, struct logfs_block *block, __be64 *array, int page_is_empty) { u64 ptr; int i, start; block->partial = 0; block->full = 0; start = 0; if (page->index < first_indirect_block()) { /* Counters are pointless on level 0 */ return; } if (page->index == first_indirec...
false
false
false
false
false
0
kwsysMD5_Append(kwsysMD5* md5, unsigned char const* data, int length) { if(length < 0) { length = (int)strlen((char const*)data); } md5_append(&md5->md5_state, (md5_byte_t const*)data, (size_t)length); }
false
false
false
false
false
0
subQuickSort(char *array, int32_t start, int32_t limit, int32_t itemSize, UComparator *cmp, const void *context, void *px, void *pw) { int32_t left, right; /* start and left are inclusive, limit and right are exclusive */ do { if((start+MIN_QSORT)>=limit) { doI...
false
false
false
false
false
0
cdb_make_add(struct cdb_make *c,const char *key,unsigned int keylen,const char *data,unsigned int datalen) { if (cdb_make_addbegin(c,keylen,datalen) == -1) return -1; if (!obuf_write(&c->b,key,keylen)) return -1; if (!obuf_write(&c->b,data,datalen)) return -1; return cdb_make_addend(c,keylen,datalen,cdb_hash(ke...
false
false
false
false
false
0
get_current_url(FILE_INFO& fi) { if (current_index < 0) { return get_init_url(); } if (current_index >= (int)urls.size()) { msg_printf(fi.project, MSG_INTERNAL_ERROR, "File %s has no URL", fi.name ); return NULL; } return urls[current_index].c_str(); }
false
false
false
false
false
0
tcp_connect(void) { int sts; fd_set fdset; struct timeval timeout; int tmpfd; if (listen_fd <= 0) return; timeout.tv_sec=0; timeout.tv_usec=0; FD_ZERO(&fdset); FD_SET (listen_fd, &fdset); sts=select(listen_fd+1, &fdset, NULL, NULL, &timeout); if (sts > 0) { if (stream_fd != 0)...
false
false
false
false
false
0
connection_or_get_for_extend(const char *digest, const tor_addr_t *target_addr, const char **msg_out, int *launch_out) { or_connection_t *conn, *best=NULL; int n_inprogress_goodaddr = 0, n_old = 0, n_noncanonical = 0, n_possible ...
false
false
false
false
false
0
xsh_cfg_recover_exec(cpl_plugin *plugin) { cpl_recipe *recipe = NULL; int recipe_status=0; cpl_errorstate initial_errorstate = cpl_errorstate_get(); /* Check parameter */ assure( plugin != NULL, CPL_ERROR_NULL_INPUT, "Null plugin" ); /* Get the recipe out of the plugin */ assure( cpl_plugin_get_type(...
false
false
false
false
false
0
h_new_str(free_ft free_key, free_ft free_value) { HashTable *ht; if (num_free_hts > 0) { ht = free_hts[--num_free_hts]; } else { ht = ALLOC(HashTable); } ht->fill = 0; ht->size = 0; ht->mask = HASH_MINSIZE - 1; ht->table = ht->smalltable; memset(ht->smalltable, 0,...
false
false
false
false
false
0
chooseCoords(Multiplexer * multi) { int i; char * lastChrom = multi->chrom; int lastFinish = multi->finish; int clipping = -1; int comparison; int first = -1; bool * inplayPtr = multi->inplay; WiggleIterator ** wiPtr = multi->iters; for (i = 0; i < multi->count; i++) { if ((*wiPtr)->done) { *inplayPtr = ...
false
false
false
false
false
0
replace_in_call_usage (loc, dst_reg, src, insn) rtx *loc; unsigned int dst_reg; rtx src; rtx insn; { rtx x = *loc; enum rtx_code code; const char *fmt; int i, j; if (! x) return; code = GET_CODE (x); if (code == REG) { if (REGNO (x) != dst_reg) return; validate_...
false
false
false
false
false
0
check_active_maps(void) { mapstruct *map, *next; for (map = first_map; map != NULL; map = next) { next = map->next; if (map->in_memory != MAP_IN_MEMORY) continue; if (!map->timeout) continue; if (--(map->timeout) > 0) continue; /* If L...
false
false
false
false
false
0
ocfs2_queue_replay_slots(struct ocfs2_super *osb, enum ocfs2_orphan_reco_type orphan_reco_type) { struct ocfs2_replay_map *replay_map = osb->replay_map; int i; if (!replay_map) return; if (replay_map->rm_state != REPLAY_NEEDED) return; for (i = 0; i < replay_map->rm_slots; i++) if (replay_map->rm_replay...
false
false
false
false
false
0
toElem (IRState *irs) { LibCall libcall; tree t1 = e1->toElem (irs); Type *tb1 = e1->type->toBasetype(); if (tb1->ty == Tclass) { if (e1->op == TOKvar) { VarDeclaration *v = ((VarExp *) e1)->var->isVarDeclaration(); if (v && v->onstack) { libcall = tb1->isClassHandle()->isIn...
false
false
false
false
false
0
warning_unless_e_option(struct parser_params *parser, NODE *node, const char *str) { if (!e_option_supplied(parser)) parser_warning(node, str); }
false
false
false
false
false
0
__ecereMethod___ecereNameSpace__ecere__sys__FileMonitor_StopMonitoring(struct __ecereNameSpace__ecere__com__Instance * this) { struct __ecereNameSpace__ecere__sys__FileMonitor * __ecerePointer___ecereNameSpace__ecere__sys__FileMonitor = (struct __ecereNameSpace__ecere__sys__FileMonitor *)(this ? (((char *)this) + __ece...
false
false
false
true
false
1
glob_complete_word (text, state) const char *text; int state; { static char **matches = (char **)NULL; static int ind; int glen; char *ret, *ttext; if (state == 0) { rl_filename_completion_desired = 1; FREE (matches); if (globorig != globtext) FREE (globorig); FREE (glo...
false
false
false
false
false
0
gx_show_text_retry(gs_text_enum_t *pte) { gs_show_enum *const penum = (gs_show_enum *)pte; if (penum->cc) { gs_font *pfont = penum->current_font; gx_free_cached_char(pfont->dir, penum->cc); penum->cc = 0; } gs_grestore(penum->pgs); penum->width_status = sws_retry; penum...
false
false
false
false
false
0
identify(Reader *reader) { Guint n; //----- PFA if (reader->cmp(0, "%!PS-AdobeFont-1") || reader->cmp(0, "%!FontType1")) { return fofiIdType1PFA; } //----- PFB if (reader->getByte(0) == 0x80 && reader->getByte(1) == 0x01 && reader->getU32LE(2, &n)) { if ((n >= 16 && reader->cmp(6...
false
false
false
false
false
0
output_method(void) { int i, n; FUNCTION *func; /*SYMBOL *sym;*/ n = ARRAY_count(Class->function); begin_section("Methods", 8 * sizeof(int)); for (i = 0; i < n; i++) { func = &Class->function[i]; write_type(func->type); write_byte(func->nparam); write_byte(func->npmin); write_byte(func->vararg); ...
false
false
false
false
false
0
md4_hash(struct md4_ctx *mctx, const void *p, size_t len) { const unsigned char *data = p; const uint32_t avail = sizeof(mctx->block) - (mctx->byte_count & 0x3f); mctx->byte_count += len; if (avail > len) { memcpy((char *)mctx->block + (sizeof(mctx->block) - avail), data, len); return; } memcpy((c...
false
true
false
false
false
1
output_tables () { automaton_t automaton; #ifndef NDEBUG locked_states_num = 0; #endif initiate_min_issue_delay_pass_states (); for (automaton = description->first_automaton; automaton != NULL; automaton = automaton->next_automaton) { output_translate_vect (automaton); output_tran...
false
false
false
false
false
0
got_tokens_cb (RestProxy *proxy, gboolean got_tokens, gpointer user_data) { SwServiceVimeo *self = (SwServiceVimeo *) user_data; SwService *service = SW_SERVICE (self); SwServiceVimeoPrivate *priv = self->priv; priv->configured = got_tokens; SW_DEBUG (VIMEO, "Got tokens: %s", got_tokens ? "yes" : "no"); ...
false
false
false
false
false
0
LoadRecordingEdl(const std::string& recid, RecordingEdl& edl) { MsgPacket vrp(XVDR_RECORDINGS_GETMARKS); vrp.put_String(recid.c_str()); MsgPacket* vresp = ReadResult(&vrp); if (vresp == NULL || vresp->eop()) { delete vresp; return false; } if(vresp->get_U32() != XVDR_RET_OK) { delete vresp; ...
false
false
false
false
false
0
purge_thumbnail_cache (GsdHousekeepingManager *manager) { char **paths; GList *files; PurgeData purge_data; GTimeVal current_time; guint i; g_debug ("housekeeping: checking thumbnail cache size and freshness"); purge_data.max_age = g_settings_ge...
false
false
false
false
false
0
nv_txrx_reset ( struct forcedeth_private *priv ) { void *ioaddr = priv->mmio_addr; writel ( NVREG_TXRXCTL_BIT2 | NVREG_TXRXCTL_RESET | NVREG_TXRXCTL_DESC_1, ioaddr + NvRegTxRxControl ); pci_push ( ioaddr ); udelay ( NV_TXRX_RESET_DELAY ); writel ( NVREG_TXRXCTL_BIT2 | NVREG_TXRXCTL_DESC_1, ioaddr + NvRegTxR...
false
false
false
false
false
0
AddXrayPiece (int t, int sq, int side, BitBoard *b, BitBoard *c) /*************************************************************************** * * The purpose of this routine is to find a piece which attack through * another piece (e.g. two rooks, Q+B, B+P, etc.) Side is the side attacking * the square where the...
false
false
false
false
false
0
t(void) { time_t t = time(NULL); char *p = ctime(&t); if (strncmp(p, &str[1], 24) == 0) { return &str[28]; } strncpy(&str[1], p, 24); str[25] = ':'; str[26] = '\n'; str[27] = '\n'; return str; } }
false
false
false
false
false
0
modperl_sys_term(void *data) { /* PERL_SYS_TERM() needs 'my_perl' as of 5.9.5 */ #if MP_PERL_VERSION_AT_LEAST(5, 9, 5) && defined(USE_ITHREADS) modperl_cleanup_data_t *cdata = (modperl_cleanup_data_t *)data; PERL_UNUSED_DECL PerlInterpreter *my_perl = cdata == NULL ? NULL : (PerlInterpreter *)cdata->data; #...
false
false
false
false
false
0
T_PlatRaise(plat_t* plat) { result_e res; switch(plat->status) { case up: res = T_MovePlane(plat->sector, plat->speed, plat->high, plat->crush, 0, 1); if(plat->type == raiseAndChange || plat->type == raiseToNearestAndChange) { if(!(leveltime&7)) ...
false
false
false
false
false
0
OnCreate(Guild* guild, Player* leader, const std::string& name) { EVENT_BEGIN(GuildEventBindings, GUILD_EVENT_ON_CREATE, return); Push(L, guild); Push(L, leader); Push(L, name); EVENT_EXECUTE(0); ENDCALL(); }
false
false
false
false
false
0
fl_set_form_atdeactivate( FL_FORM * form, FL_FORM_ATDEACTIVATE cb, void * data ) { FL_FORM_ATDEACTIVATE old = NULL; if ( ! form ) { M_err( "fl_set_form_atdeactivate", "NULL form" ); return NULL; } o...
false
false
false
false
false
0
guess_surface_time (GMT_LONG factors[], GMT_LONG nx, GMT_LONG ny) { /* Routine to guess a number proportional to the operations * required by surface working on a user-desired grid of * size nx by ny, where nx = (x_max - x_min)/dx, and same for * ny. (That is, one less than actually used in routine.) * * Th...
false
false
false
false
false
0
line_distance(PG_FUNCTION_ARGS) { LINE *l1 = PG_GETARG_LINE_P(0); LINE *l2 = PG_GETARG_LINE_P(1); float8 result; Point *tmp; if (!DatumGetBool(DirectFunctionCall2(line_parallel, LinePGetDatum(l1), LinePGetDatum(l2)))) PG_RETURN_FLOAT8(0.0); if (FPzero(l1->B)) /* vertical? */...
false
false
false
false
false
0
dif_compute_csum(const void *buf, int len) { __be16 csum; if (scsi_debug_guard) csum = (__force __be16)ip_compute_csum(buf, len); else csum = cpu_to_be16(crc_t10dif(buf, len)); return csum; }
false
false
false
false
false
0
string_cmp(const ScmHashCore *table, intptr_t k1, intptr_t k2) { const ScmStringBody *b1 = SCM_STRING_BODY(k1); const ScmStringBody *b2 = SCM_STRING_BODY(k2); return ((SCM_STRING_BODY_SIZE(b1) == SCM_STRING_BODY_SIZE(b2)) && (memcmp(SCM_STRING_BODY_START(b1), SCM_STRING_BO...
false
false
false
false
false
0
datenLoeschen() { loescheAusZentralregister(); if (mBild) { SDL_FreeSurface(mBild); mBild = 0; } if (mNativBild) { SDL_FreeSurface(mNativBild); mNativBild = NULL; } if (mBildOriginal) { mBildOriginal->abmelden(); mBildOriginal = 0; } }
false
false
false
false
false
0
load(time_t new_disk_time) { xsltStylesheet *nstylesheet; { pa_xmlStartMonitoringDependencies(); { int saved=xmlDoValidityCheckingDefaultValue;// xmlDoValidityCheckingDefaultValue=0;// nstylesheet=xsltParseStylesheetFile(BAD_CAST ffile_spec.cstr()); xmlDoValidityCheckingDefaultValue = saved;// } d...
false
false
false
false
false
0
rhash_torrent_add_announce(rhash ctx, const char* announce_url) { if (!BT_CTX(ctx)) return 0; return bt_add_announce(BT_CTX(ctx), announce_url); }
false
false
false
false
false
0
cyrus_ctime(time_t date, char *datebuf) { struct tm *tm = localtime(&date); long gmtoff = gmtoff_of(tm, date); int gmtnegative = 0; static const char *monthname[] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" }; if (date == 0 || tm->tm_year < 69) { abort...
false
true
false
false
false
1
diva_os_schedule_soft_isr(diva_os_soft_isr_t *psoft_isr) { if (psoft_isr && psoft_isr->object) { diva_os_thread_dpc_t *pdpc = (diva_os_thread_dpc_t *) psoft_isr->object; tasklet_schedule(&pdpc->divas_task); } return (1); }
false
false
false
false
false
0
refresh_service_contacts(int type) { LList *l1, *l2, *l3; LList *config = NULL; struct contact *con = NULL; eb_debug(DBG_CORE, ">Refreshing contacts for %i\n", type); for (l1 = groups; l1; l1 = l1->next) { for (l2 = ((grouplist *)l1->data)->members; l2; l2 = l2->next) { con = l2->data; if (con->conversati...
false
false
false
false
false
0
dm_pool_changed_this_transaction(struct dm_pool_metadata *pmd) { bool r = false; struct dm_thin_device *td, *tmp; down_read(&pmd->root_lock); list_for_each_entry_safe(td, tmp, &pmd->thin_devices, list) { if (td->changed) { r = td->changed; break; } } up_read(&pmd->root_lock); return r; }
false
false
false
false
false
0
ceph_rename(struct inode *old_dir, struct dentry *old_dentry, struct inode *new_dir, struct dentry *new_dentry) { struct ceph_fs_client *fsc = ceph_sb_to_client(old_dir->i_sb); struct ceph_mds_client *mdsc = fsc->mdsc; struct ceph_mds_request *req; int op = CEPH_MDS_OP_RENAME; int err; if (ceph_snap(old...
false
false
false
false
false
0
put_char(uint32_t *out, size_t *o, uint32_t c, size_t out_len) { if (*o >= out_len) return 1; out[*o] = c; (*o)++; return 0; }
false
false
false
false
false
0
start_extra_expire_thread( void ) { int i; for( i = 0 ; i < EXPIRE_MAX_THREADS ; i++ ) { if( ! expire.threads[ expire.cur ] ) { /*not joinable*/ pthread_mutex_lock( &expire.lock ); if( thread_new_joinable( extra_expire_mounts, &expire.threads[ expire.cur ], &expire.threads[ expire.cur ] ) ) ...
false
false
false
false
false
0
displayLoc (pTab) pTableLoc pTab; { long i; long co = 0; pVertexLoc pLoc; pLoc = pTab->pLoc; printf ("\n---------------------------------------------------------------"); printf ("---------\n AFFICHAGE DE LA TABLE DE HACHAGE\n\n"); for (i = 0; i < pTab->lenTabLoc; i++) { if...
false
false
false
false
false
0
__ecereMethod_ProjectView_GetSelectedNode(struct __ecereNameSpace__ecere__com__Instance * this, unsigned int useSelection) { struct ProjectView * __ecerePointer_ProjectView = (struct ProjectView *)(this ? (((char *)this) + __ecereClass_ProjectView->offset) : 0); struct ProjectNode * node = (((void *)0)); if(useSelecti...
false
false
false
true
false
1
mp730_finish_scan (pixma_t * s) { int error, aborted = 0; mp730_t *mp = (mp730_t *) s->subdriver; switch (mp->state) { case state_transfering: drain_bulk_in (s); /* fall through */ case state_scanning: case state_warmup: aborted = 1; error = abort_session (s); if (er...
false
false
false
false
false
0
ick_mingle(register unsigned int r, register unsigned int s) { if (ick_Base == 2) { if (r>0xffff || s>0xffff) ick_lose(IE533, ick_lineno, (const char *)NULL); r = ((r & 0x0000ff00) << 8) | (r & 0x000000ff); r = ((r & 0x00f000f0) << 4) | (r & 0x000f000f); r = ((r & 0x0c0c0c0c) << 2) | (r & 0x0303...
false
false
false
false
false
0
checksend (int mode) { int bufstate = 0; #ifdef SERIAL_PORT bufstate = checkserwrite (); #endif #ifdef SERIAL_ENET if (serial_enet) bufstate = 1; #endif if (!data_in_serdat && !data_in_sershift) return; if (data_in_sershift && mode == 0 && bufstate) data_in_sershift = 0; if (data_in_serdat && !data_in_se...
false
false
false
false
false
0
write_array_of_uint (GKeyFile *file, NMSetting *setting, const char *key, const GValue *value) { GArray *array; int i; int *tmp_array; array = (GArray *) g_value_get_boxed (value); if (!array || !array->len) return TRUE; tmp_array = g_new (gint, a...
false
false
false
false
false
0
pipe_handler_free(PipeError *pe) { if (!pe) return; if (pe != pipe_handler_data) log_printf("warning SIGPIPE handler not closing same data\n"); /* restore the original signal handler */ sigaction(SIGPIPE, &pe->old_action, NULL); pipe_handler_data = NULL; g_free(pe); }
false
false
false
false
false
0
sum(const Matrix<IntArgs>& matrix) { const Matrix<IntArgs>::ArgsType & args = matrix.get_array(); return sum(args); }
false
false
false
false
false
0
Rename(const CServer& server, const CServerPath& pathFrom, const wxString& fileFrom, const CServerPath& pathTo, const wxString& fileTo) { tServerIter sit = GetServerEntry(server); if (sit == m_serverList.end()) return; tCacheIter iter; bool is_outdated = false; bool found = Lookup(iter, sit, pathFrom, true, is_...
false
false
false
false
false
0
deletePlaylistFiles( Playlists::PlaylistFileList playlistFiles ) { foreach( Playlists::PlaylistFilePtr playlistFile, playlistFiles ) { m_playlists.removeAll( playlistFile ); loadedPlaylistsConfig().deleteEntry( playlistFile->uidUrl().url() ); QFile::remove( playlistFile->uidUrl().path() ...
false
false
false
false
false
0
o_condorjump(FUNC UNUSED *fp, BOOL *dojump) { VALUE *vp; vp = stack; if (vp->v_type == V_ADDR) vp = vp->v_addr; if (vp->v_type == V_NUM) { if (!qiszero(vp->v_num)) { *dojump = TRUE; return; } if (stack->v_type == V_NUM) qfree(stack->v_num); stack--; return; } if (testvalue(vp)) *dojump = T...
false
false
false
false
false
0