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
HandleMacroExit() { // Jump to the EndOfStatement we should return to, and consume it. JumpToLoc(ActiveMacros.back()->ExitLoc); Lex(); // Pop the instantiation entry. delete ActiveMacros.back(); ActiveMacros.pop_back(); }
false
false
false
false
false
0
mca_topo_base_cart_map(ompi_communicator_t* comm, int ndims, int *dims, int *periods, int *newrank) { int nprocs, rank, size, i, *p; /* * Compute the # of processes in the grid. */ nprocs = 1; for (i = 0, p = dims; i < ndims; ++i, ++p) { ...
false
false
false
false
false
0
UpdatePlayerScore(Player* Source, uint32 type, uint32 value) { // this procedure is called from virtual function implemented in bg subclass BattleGroundScoreMap::const_iterator itr = m_PlayerScores.find(Source->GetObjectGuid()); if (itr == m_PlayerScores.end()) // player not found......
false
false
false
false
false
0
print_selected_keywords_grep_friendly (void *cls, const char *plugin_name, enum EXTRACTOR_MetaType type, enum EXTRACTOR_MetaFormat format, const char *data_mime_type, const char *data, size_t data_len) { char *keyword; #if HAVE_ICONV iconv_t cd; #e...
false
false
false
false
false
0
xdico_assoc_append(dico_assoc_list_t assoc, const char *key, const char *value) { if (dico_assoc_append(assoc, key, value) && errno == ENOMEM) xalloc_die(); }
false
false
false
false
false
0
si21xx_init(struct dvb_frontend *fe) { struct si21xx_state *state = fe->demodulator_priv; int i; int status = 0; u8 reg1; u8 val; u8 reg2[2]; dprintk("%s\n", __func__); for (i = 0; ; i += 2) { reg1 = serit_sp1511lhb_inittab[i]; val = serit_sp1511lhb_inittab[i+1]; if (reg1 == 0xff && val == 0xff) brea...
false
false
false
false
false
0
opt3001_irq(int irq, void *_iio) { struct iio_dev *iio = _iio; struct opt3001 *opt = iio_priv(iio); int ret; if (!opt->ok_to_ignore_lock) mutex_lock(&opt->lock); ret = i2c_smbus_read_word_swapped(opt->client, OPT3001_CONFIGURATION); if (ret < 0) { dev_err(opt->dev, "failed to read register %02x\n", OPT3...
false
false
false
false
false
0
end_ebml_master(ByteIOContext *pb, ebml_master master) { int64_t pos = url_ftell(pb); // leave the unknown size for masters when streaming if (url_is_streamed(pb)) return; url_fseek(pb, master.pos - master.sizebytes, SEEK_SET); put_ebml_num(pb, pos - master.pos, master.sizebytes); url_...
false
false
false
false
false
0
__repmgr_send_own_msg(env, conn, type, buf, len) ENV *env; REPMGR_CONNECTION *conn; u_int8_t *buf; u_int32_t len, type; { REPMGR_IOVECS iovecs; struct sending_msg msg; __repmgr_msg_hdr_args msg_hdr; u_int8_t hdr_buf[__REPMGR_MSG_HDR_SIZE]; if (conn->version < OWN_MIN_VERSION) return (0); msg_hdr.type = REP...
false
false
false
false
false
0
explain_buffer_pollfd(explain_string_buffer_t *sb, const struct pollfd *data, int include_revents) { #ifdef HAVE_POLL_H if (explain_is_efault_pointer(data, sizeof(*data))) { explain_buffer_pointer(sb, data); return; } explain_string_buffer_puts(sb, "{ fd = "); explain_buffer_fil...
false
false
false
false
false
0
binfo_ctor_vtable (tree binfo) { tree vt; while (1) { vt = BINFO_VTABLE (binfo); if (TREE_CODE (vt) == TREE_LIST) vt = TREE_VALUE (vt); if (TREE_CODE (vt) == TREE_BINFO) binfo = vt; else break; } return vt; }
false
false
false
false
false
0
ath6kl_cfg80211_deepsleep_suspend(struct ath6kl *ar) { struct ath6kl_vif *vif; int ret; vif = ath6kl_vif_first(ar); if (!vif) return -EIO; if (!test_bit(WMI_READY, &ar->flag)) { ath6kl_err("deepsleep failed as wmi is not ready\n"); return -EIO; } ath6kl_cfg80211_stop_all(ar); /* Save the current power...
false
false
false
false
false
0
SetField(int attributeID, const int* values, size_t size, bool image) { *this->OutputStream << " " << x3dAttributeString[attributeID] << "=\"" << this->GetNewline() << this->ActTab; unsigned int i = 0; if (image) { assert(size > 2); char buffer[20]; *this->OutputStream << values[0] << " "; // w...
false
false
false
false
false
0
ReadHashItem_bin( const char *srcbuf, HASH_ITEM *pItem, int item_index ) { int len, i; const char *pc; memset( pItem, 0, sizeof(HASH_ITEM) ); /* freq info */ pItem->data.userfreq = GetInt32(&srcbuf[ 0 ]); pItem->data.recentTime = GetInt32(&srcbuf[ 4 ]); pItem->data.maxfreq = GetInt32(&srcbuf[ 8 ]); pItem->dat...
false
false
false
false
false
0
push( int fd, SP_Handler * handler, int needStart ) { SP_IOChannel * ioChannel = new SP_DefaultIOChannel(); return push( fd, handler, ioChannel, needStart ); }
false
false
false
false
false
0
obuf_close(obuf* out) { int result; result = obuf_flush(out); return iobuf_close(&out->io) && result; }
false
false
false
false
false
0
p_tabw_destroy_attw_dlg (GapStbTabWidgets *tabw, gboolean destroy_all) { GapStbAttrWidget *attw; GapStbAttrWidget *attw_prev; GapStbAttrWidget *attw_next; GapStoryBoard *stb; if(tabw==NULL) { return; } stb = p_tabw_get_stb_ptr(tabw); if(stb==NULL) { return; } attw_prev = NULL; for(attw = tabw->a...
false
false
false
false
false
0
gate_handle_reorder_blocks (void) { if (targetm.cannot_modify_jumps_p ()) return false; /* Don't reorder blocks when optimizing for size because extra jump insns may be created; also barrier may create extra padding. More correctly we should have a block reordering mode that tried to minimize th...
false
false
false
false
false
0
add_frame_hooker(const char *arg) { int argc = 0; char *argv[64]; int i; char *args = av_strdup(arg); using_vhook = 1; argv[0] = strtok(args, " "); while (argc < 62 && (argv[++argc] = strtok(NULL, " "))) { } i = frame_hook_add(argc, argv); if (i != 0) { fprintf(stderr...
true
true
false
false
false
1
createTargets(ApplyMultiplexerData * data) { int length; int total_buffers = 0; if (data->regions->finish - data->regions->start >= MAX_BUFFER) { addTarget(data, createTarget(data)); pop(data->regions); } else { while(!data->regions->done && (length = data->regions->finish - data->regions->start) < ...
false
false
false
false
false
0
vbox_get_nr_new_messages(ClientData cd, Tcl_Interp *ip, int argc, char *argv[]) { int n; if (argc != 2) { log(L_ERROR, "[vbox_get_nr_new_messages] usage: vbox_get_nr_new_messages <path>\n"); printstring(ip->result, "0"); } else { log(L_JUNK, "[vbox_get_nr_new_messages] counting new messages in \"%s\"...\n...
false
false
false
false
false
0
properties_update_history (GtkTreeModel *model, GtkTreeIter *iter) { #ifdef HISTORY_FILE GtkTextView *view; GtkTextBuffer *buffer; gchar *history; gchar *name; gchar *cloneof; GError *error = NULL; view = GTK_TEXT_VIEW (GVA_WIDGET_PROPE...
false
false
false
false
false
0
pci_quatech_init(struct pci_dev *dev) { if (pci_quatech_amcc(dev->device)) { unsigned long base = pci_resource_start(dev, 0); if (base) { u32 tmp; outl(inl(base + 0x38) | 0x00002000, base + 0x38); tmp = inl(base + 0x3c); outl(tmp | 0x01000000, base + 0x3c); outl(tmp &= ~0x01000000, base + 0x3c); }...
false
false
false
false
false
0
klp_write_module_reloc(struct module *mod, unsigned long type, unsigned long loc, unsigned long value) { size_t size = 4; unsigned long val; unsigned long core = (unsigned long)mod->core_layout.base; unsigned long core_size = mod->core_layout.size; switch (type) { case R_X86_64_NONE: return 0; case R_X8...
false
false
false
false
false
0
trace() const { REPORT int i = nrows_val; int w = lower_val+upper_val+1; Real sum = 0.0; Real* s = store+lower_val; // while (i--) { sum += *s; s += w; } if (i) for (;;) { sum += *s; if (!(--i)) break; s += w; } ((GeneralMatrix&)*this).tDelete(); return sum; }
false
false
false
false
false
0
lwline_serialize_buf(LWLINE *line, uchar *buf, size_t *retsize) { char hasSRID; uchar *loc; int ptsize; size_t size; LWDEBUGF(2, "lwline_serialize_buf(%p, %p, %p) called", line, buf, retsize); if (line == NULL) lwerror("lwline_serialize:: given null line"); if ( TYPE_GETZM(line->type) != TYPE_GETZM(line->...
false
false
false
true
false
1
gearman_client_set_status_fn(gearman_client_st *client, gearman_universal_status_fn *function) { if (client) { client->actions.status_fn= function; } }
false
false
false
false
false
0
show_switch(ivl_switch_t net) { const char*name = ivl_switch_basename(net); int has_enable = 0; ivl_nexus_t nexa, nexb; ivl_variable_type_t nex_type_a, nex_type_b; switch (ivl_switch_type(net)) { case IVL_SW_TRAN: fprintf(out, " tran %s", name); break; case IVL_SW_RTRAN: ...
false
false
false
false
false
0
m68hc11_notice_update_cc (exp, insn) rtx exp; rtx insn ATTRIBUTE_UNUSED; { /* recognize SET insn's. */ if (GET_CODE (exp) == SET) { /* Jumps do not alter the cc's. */ if (SET_DEST (exp) == pc_rtx) ; /* NOTE: most instructions don't affect the carry bit, but the bhi/bls/b...
false
false
false
false
false
0
fuse_main_common(int argc, char *argv[], const struct fuse_operations *op, size_t op_size, void *user_data, int compat) { struct fuse *fuse; char *mountpoint; int multithreaded; int res; fuse = fuse_setup_common(argc, argv, op, op_size, &mountpoint, &multithreaded, NULL, user_data, compat); if...
false
false
false
false
false
0
arena_malloc_small(arena_t *arena, size_t size, bool zero) { void *ret; arena_bin_t *bin; arena_run_t *run; size_t binind; binind = SMALL_SIZE2BIN(size); assert(binind < nbins); bin = &arena->bins[binind]; size = arena_bin_info[binind].reg_size; malloc_mutex_lock(&bin->lock); if ((run = bin->runcur) != NULL...
false
false
false
false
false
0
get_activity_nr(struct activity *act[], unsigned int option, int count_outputs) { int i, n = 0; unsigned int msk; for (i = 0; i < NR_ACT; i++) { if ((act[i]->options & option) == option) { if (HAS_MULTIPLE_OUTPUTS(act[i]->options) && count_outputs) { for (msk = 1; msk < 0x10; msk <<= 1) { if (act[i]-...
false
false
false
false
false
0
HasCategoryCooldown(uint32 spell_id) const { SpellEntry const* spellInfo = sSpellStore.LookupEntry(spell_id); if (!spellInfo) return false; CreatureSpellCooldowns::const_iterator itr = m_CreatureCategoryCooldowns.find(spellInfo->Category); return (itr != m_CreatureCategoryCooldowns.end() && tim...
false
false
false
false
false
0
answer_is_yes_no_quit( const char *s ) { /* TRANSLATORS: See doc/TRANSLATE about this string. */ const char *long_yes = _("yes"); /* TRANSLATORS: See doc/TRANSLATE about this string. */ const char *long_no = _("no"); /* TRANSLATORS: See doc/TRANSLATE about this string. */ const char *long_quit =...
false
false
false
false
false
0
doubleAverage(double cur, double new, int N, int max) { if (N > max) N = max; return (cur * (N - 1.0) + new) / N; }
false
false
false
false
false
0
typ_type_move(GList *list, FType *type, gint delta) { gint pos, np; if(delta != -1 && delta != 1) return list; pos = g_list_index(list, type); list = g_list_remove(list, type); np = pos + delta; if(np < 0) np = 0; else if(np > (gint) g_list_length(list) - 1) np = (gint) g_list_length(list) - 1; ret...
false
false
false
false
false
0
paint( QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index ) const { qint64 field = index.data( CommonModel::FieldRole ).value<qint64>(); QVariant data = index.data(); // display the icon even for label conflicts: if( ( field == Meta::valRating || field ...
false
false
false
false
false
0
archive_acl_add_entry(struct archive_acl *acl, int type, int permset, int tag, int id, const char *name) { struct archive_acl_entry *ap; if (acl_special(acl, type, permset, tag) == 0) return ARCHIVE_OK; ap = acl_new_entry(acl, type, permset, tag, id); if (ap == NULL) { /* XXX Error XXX */ return ARCHIVE_...
false
false
false
false
false
0
updateFontAttr( QwtMmlAttributeMap &font_attr, const QwtMmlNode *n, const QString &name, const QString &preferred_name = QString::null ) { if ( font_attr.contains( preferred_name ) || font_attr.contains( name ) ) return; QString value = n->explicitAttribute( name ); if ( ...
false
false
false
false
false
0
accept(ir_hierarchical_visitor *v) { ir_visitor_status s = v->visit_enter(this); if (s != visit_continue) return (s == visit_continue_with_parent) ? visit_continue : s; s = this->val->accept(v); return (s == visit_stop) ? s : v->visit_leave(this); }
false
false
false
false
false
0
isns_bitvector_free(isns_bitvector_t *bv) { if (bv) { isns_free(bv->ib_words); memset(bv, 0xa5, sizeof(*bv)); isns_free(bv); } }
false
false
false
false
false
0
xmms_medialib_client_get_info (xmms_medialib_t *medialib, gint32 id, xmms_error_t *err) { xmms_medialib_session_t *session; GTree *ret = NULL; if (!id) { xmms_error_set (err, XMMS_ERROR_NOENT, "No such entry, 0"); } else { session = xmms_medialib_begin (); ret = xmms_medialib_e...
false
false
false
false
false
0
hfsplus_removexattr(struct inode *inode, const char *name) { int err = 0; struct hfs_find_data cat_fd; u16 flags; u16 cat_entry_type; int is_xattr_acl_deleted = 0; int is_all_xattrs_deleted = 0; if (!HFSPLUS_SB(inode->i_sb)->attr_tree) return -EOPNOTSUPP; if (!strcmp_xattr_finder_info(name)) return -EOPNO...
false
false
false
false
false
0
_rl_isearch_callback (cxt) _rl_search_cxt *cxt; { int c, r; c = _rl_search_getchar (cxt); /* We might want to handle EOF here */ r = _rl_isearch_dispatch (cxt, cxt->lastc); return (r <= 0) ? _rl_isearch_cleanup (cxt, r) : 0; }
false
false
false
false
false
0
mxf_ul_to_string (const MXFUL * ul, gchar str[48]) { gchar *ret = str; g_return_val_if_fail (ul != NULL, NULL); if (ret == NULL) ret = g_malloc (48); g_snprintf (ret, 48, "%02x.%02x.%02x.%02x." "%02x.%02x.%02x.%02x." "%02x.%02x.%02x.%02x." "%02x.%02x.%02x.%02x", ul->u[0], ul...
false
false
false
false
false
0
snd_pcm_rate_mask_sanitize(unsigned int rates) { if (rates & SNDRV_PCM_RATE_CONTINUOUS) return SNDRV_PCM_RATE_CONTINUOUS; else if (rates & SNDRV_PCM_RATE_KNOT) return SNDRV_PCM_RATE_KNOT; return rates; }
false
false
false
false
false
0
cheaderwrite(struct cheader *ch, FILE *fpout) { int error=0; if(!fwrite((char *) &ch->sig, 4, 1, fpout)) error=1; if(!fwrite((char *) &ch->res1, 4, 1, fpout)) error=1; if(!fwrite((char *) &ch->size, 4, 1, fpout)) error=1; if(!fwrite((char *) &ch->res2, 4, 1, fpout)) error=1; if(!fwri...
false
false
false
false
false
0
gigolo_settings_set_property(GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { GigoloSettingsPrivate *priv = GIGOLO_SETTINGS_GET_PRIVATE(object); switch (prop_id) { case PROP_SAVE_GEOMETRY: priv->save_geometry = g_value_get_boolean(value); break; case PROP_SHOW_IN_SYSTRAY: priv->show...
false
false
false
false
false
0
P_Lseek(Object fd, Object off, Object whence) { off_t ret; if ((ret = lseek(Get_Integer(fd), (off_t)Get_Long(off), (int)Symbols_To_Bits(whence, 0, Lseek_Syms))) == (off_t)-1) Raise_System_Error("~E"); return Make_Unsigned_Long((unsigned long)ret); }
false
false
false
false
false
0
qlcnic_reset_rx_buffers_list(struct qlcnic_adapter *adapter) { struct qlcnic_recv_context *recv_ctx; struct qlcnic_host_rds_ring *rds_ring; struct qlcnic_rx_buffer *rx_buf; int i, ring; recv_ctx = adapter->recv_ctx; for (ring = 0; ring < adapter->max_rds_rings; ring++) { rds_ring = &recv_ctx->rds_rings[ring]; ...
false
false
false
false
false
0
clntSupported(SPtr<TDUID> duid,SPtr<TIPv6Addr> clntAddr, SPtr<TSrvMsg> msg) { // is client on denied client class SPtr<TSrvCfgClientClass> clntClass; denyClientClassLst.first(); while(clntClass = denyClientClassLst.get()) { if (clntClass->isStatisfy(msg)) return false; } // is client on accepted client ...
false
false
false
false
false
0
GetClassCount( ) { int iCount = 0; GFSTemplateItem *pItem; pItem = pFirst; while( pItem != NULL ) { iCount++; pItem = pItem->GetNext(); } return iCount; }
false
false
false
false
false
0
opr_tbl_optype(unsigned opnum) /*! Return Value: type of operator if OK, -1 if Error Parameters: Type Name IO Description ------------ ----------- -- ----------- */ #ifdef DOC unsigned opnum ;/* I Number of operator in table. */ #endif /*! Description: `...
false
false
false
false
false
0
l3dss1_resume_ack(struct l3_process *pc, u_char pr, void *arg) { struct sk_buff *skb = arg; int id, ret; if ((id = l3dss1_get_channel_id(pc, skb)) > 0) { if ((0 == id) || ((3 == id) && (0x10 == pc->para.moderate))) { if (pc->debug & L3_DEB_WARN) l3_debug(pc->st, "resume ack with wrong chid %x", id); pc-...
false
false
false
false
false
0
dsgw_savelines_next( savedlines *svlp ) { char *p; if ( svlp->svl_current >= svlp->svl_count ) { return( NULL ); } p = svlp->svl_line[ svlp->svl_current ]; ++svlp->svl_current; return( p ); }
false
false
false
false
false
0
hash_pragma(expr_list_ty *elp) { static expr_ty *once; trace(("hash_pragma(elp = %p)\n{\n", elp)); if (stack && !stack->pass) goto ret; /* * see if it was "#pragma once" */ if (!once) { string_ty *s; s = str_from_c("once"); once = expr_constant...
false
false
false
false
true
1
pr_parallel_section(FILE *fp, Parallel_section *pr) { mfprintf(fp, "%B : ", pr->layer_block); switch (pr->para_grain) { case COARSE_GRAIN_TASK: fprintf(fp, " COARSE "); put_IntSet(pr->mt_set, fp); break; case TARGET_LOOP_GROUP: fprintf(fp, " TLG "); put_IntSet(pr-...
false
false
false
false
false
0
_text_can_handle(struct labeller *l __attribute__((unused)), void *buf, uint64_t sector __attribute__((unused))) { struct label_header *lh = (struct label_header *) buf; if (!strncmp((char *)lh->type, LVM2_LABEL, sizeof(lh->type))) return 1; return 0; }
false
false
false
false
false
0
solve() { #ifdef RECTANGLE_OVERLAP_LOGGING ofstream f(LOGFILE,ios::app); f<<"solve_inc()..."<<endl; #endif double lastcost,cost = bs->cost(); do { lastcost=cost; satisfy(); splitBlocks(); cost = bs->cost(); #ifdef RECTANGLE_OVERLAP_LOGGING f<<" cost="<<cost<<endl; #endif } while(fabs(lastcost-cost)>0.000...
false
false
false
false
false
0
enum_netdev_ipv6_ips(struct ib_device *ib_dev, u8 port, struct net_device *ndev) { struct inet6_ifaddr *ifp; struct inet6_dev *in6_dev; struct sin6_list { struct list_head list; struct sockaddr_in6 sin6; }; struct sin6_list *sin6_iter; struct sin6_list *sin6_temp; struct ib_gid_attr gid_attr = {.ndev = ...
false
false
false
false
false
0
__Pyx_GetModuleGlobalName(PyObject *name) { PyObject *result; #if CYTHON_COMPILING_IN_CPYTHON result = PyDict_GetItem(__pyx_d, name); if (result) { Py_INCREF(result); } else { #else result = PyObject_GetItem(__pyx_d, name); if (!result) { PyErr_Clear(); #endif result = __...
false
false
false
false
false
0
mrev4(void *array, int num) { uint4 old; uint4 *d; d = (uint4 *) array; for ( ; num > 0; --num, ++d) { old = *d; *d = (old & 0x000000FF) << 16; *d = (*d | (old & 0x0000FF00)) << 8; old >>= 8; *d |= (old & 0x0000FF00); old >>= 16; *d |= (old & 0x000000FF); } }
false
false
false
false
false
0
cli_print_ip_range_list(struct cli_session* cs, ip_range_list_t *value, const char* name, int changeable) { if(cs && cs->ts && name && value && value->ranges_number && value->rs) { const char *sc=""; if(changeable==1) sc=" (*)"; else if(changeable==2) sc=" (**)"; size_t i; for(i=0;i<value->ranges_numbe...
false
false
false
false
false
0
parse_for_iter(LexState *ls, GCstr *indexname) { FuncState *fs = ls->fs; ExpDesc e; BCReg nvars = 0; BCLine line; BCReg base = fs->freereg + 3; BCPos loop, loopend, exprpc = fs->pc; FuncScope bl; int isnext; /* Hidden control variables. */ var_new_fixed(ls, nvars++, VARNAME_FOR_GEN); var_new_fixed...
false
false
false
false
false
0
get_member_status(struct call_queue *q, int max_penalty, int min_penalty, enum empty_conditions conditions) { struct member *member; struct ao2_iterator mem_iter; ao2_lock(q); mem_iter = ao2_iterator_init(q->members, 0); for (; (member = ao2_iterator_next(&mem_iter)); ao2_ref(member, -1)) { if ((max_penalty && ...
true
true
false
false
false
1
diodon_clipboard_menu_remove_clipboard_item (DiodonClipboardMenu* self, DiodonIClipboardItem* item) { DiodonClipboardMenuItem* menu_item = NULL; GeeMap* _tmp0_ = NULL; DiodonIClipboardItem* _tmp1_ = NULL; gpointer _tmp2_ = NULL; DiodonClipboardMenuItem* _tmp3_ = NULL; DiodonClipboardMenuItem* _tmp4_ = NULL; menu...
false
false
false
false
false
0
i2c_detect(struct i2c_adapter *adapter, struct i2c_driver *driver) { const unsigned short *address_list; struct i2c_client *temp_client; int i, err = 0; int adap_id = i2c_adapter_id(adapter); address_list = driver->address_list; if (!driver->detect || !address_list) return 0; /* Warn that the adapter lost cl...
false
false
false
false
false
0
inf_text_gtk_view_user_line_position_cmp(gconstpointer first, gconstpointer second) { const InfTextGtkViewUser* first_user; const InfTextGtkViewUser* second_user; first_user = (const InfTextGtkViewUser*)first; second_user = (const InfTextGtkViewUser*)second; if(secon...
false
false
false
false
false
0
open_tcp_socket(ares_channel channel, struct server_state *server) { ares_socket_t s; int opt; ares_socklen_t salen; union { struct sockaddr_in sa4; struct sockaddr_in6 sa6; } saddr; struct sockaddr *sa; switch (server->addr.family) { case AF_INET: sa = (void *)&saddr.sa4; ...
false
false
false
false
false
0
totem_pl_parser_read_ini_line_string_with_sep (char **lines, const char *key, const char *sep) { char *retval = NULL; int i; if (lines == NULL || key == NULL) return NULL; for (i = 0; (lines[i] != NULL && retval == NULL); i++) { char *line = lines[i]; while (*line == '\t' || *line == ' ') line++; i...
false
false
false
false
false
0
strncpy(char* dest, const char* src, size_t n) { unsigned int len = strlen(src); char * ret = memcpy(dest, src, len); if(n > len) { memcpy(dest + len, 0, n - len); } return ret; }
false
false
false
false
true
1
test_gvariant (const void *_subject) { const gchar *subject = (const gchar *) _subject; PolkitIdentity *identity, *new_identity; GError *error = NULL; GVariant *value; /* Create the subject from a string */ identity = polkit_identity_from_string (subject, &error); g_assert_no_error (error); g_assert (...
false
false
false
false
false
0
standingOrdersClicked() { m_shipCountEdit->setFocus(); if(m_standingOrder->checkState() == Qt::Checked) m_shipValidator->setTop(INT_MAX); else m_shipValidator->setTop(sourcePlanet->fleet().shipCount()); }
false
false
false
false
false
0
inline_filter_reset (CamelMimeFilter *filter) { EMailInlineFilter *emif = E_MAIL_INLINE_FILTER (filter); GSList *l; l = emif->parts; while (l) { GSList *n = l->next; g_object_unref (l->data); g_slist_free_1 (l); l = n; } emif->parts = NULL; g_byte_array_set_size (emif->data, 0); emif->found_any = FAL...
false
false
false
false
false
0
RP_CanHandleURL(GF_InputService *plug, const char *url) { char *sExt; if (!plug || !url) return 0; sExt = strrchr(url, '.'); if (sExt && gf_term_check_extension(plug, sdp_mime, sdp_exts, sdp_desc, sExt)) return 1; /*local */ if (strstr(url, "data:application/sdp")) return 1; /*embedded data*/ if (strstr(url...
false
false
false
false
false
0
tomoyo_encode2(const char *str, int str_len) { int i; int len = 0; const char *p = str; char *cp; char *cp0; if (!p) return NULL; for (i = 0; i < str_len; i++) { const unsigned char c = p[i]; if (c == '\\') len += 2; else if (c > ' ' && c < 127) len++; else len += 4; } len++; /* Reserve s...
false
false
false
false
false
0
finishGreet() { int ret; if (grtproc.pid > 0) { gSet(&grttalk); gSendInt(V_OK); if ((ret = closeGreeter(False)) != EX_NORMAL) { logError("Abnormal greeter termination, code %d, sig %d\n", wcCode(ret), wcSig(ret)); sessionExit(EX_RESERVER_DPY)...
false
false
false
false
false
0
ui_common_init_dialog_response_cb (GtkDialog * dialog, gint response_id, gpointer data) { gint return_val; switch(response_id) { case AMITK_RESPONSE_EXECUTE: case GTK_RESPONSE_CLOSE: g_signal_emit_by_name(G_OBJECT(dialog), "delete_event", NULL, &return_val); if (!return_val) gtk_widget_destroy(GTK_W...
false
false
false
false
false
0
copy_all_sub_arg_operand(Operand *opt) { Operand *npt = NULL, *opt_head = NULL; int i; opt_head = opt; while (opt != NULL) { if(npt == NULL) { npt = alloc_operand(); opt_head = npt; } npt->kind = opt->kind; npt->entry = opt->entry; ...
false
false
false
false
false
0
interval_tree_delete_fixup(GtIntervalTree *it, GtIntervalTreeNode *x) { GtIntervalTreeNode *w; while ((x->color == BLACK) && (it->root != x)) { if (x == x->parent->left) { w = x->parent->right; if (w->color == RED) { w->color = BLACK; x-...
false
false
false
false
false
0
delete_symbols(symbol * root, int level, int delete_labels, int delete_functions) { symbol *sym; /* erase only the symbols with a deeper nesting level than the * specified nesting level */ while (root->next) { sym = root->next; if (sym->compound < level) break; if ((delete_...
false
false
false
false
false
0
pre_task_out_intr(ide_drive_t *drive, struct ide_cmd *cmd) { ide_startstop_t startstop; if (ide_wait_stat(&startstop, drive, ATA_DRQ, drive->bad_wstat, WAIT_DRQ)) { pr_err("%s: no DRQ after issuing %sWRITE%s\n", drive->name, (cmd->tf_flags & IDE_TFLAG_MULTI_PIO) ? "MULT" : "", (drive->dev_flags & ...
false
false
false
false
false
0
main(int argc, char **argv) { l_int32 d; PIX *pixs, *pixc, *pixr, *pixg, *pixb, *pixsg, *pixsm, *pixd; PIXA *pixa; static char mainName[] = "livre_adapt"; if (argc != 1) return ERROR_INT(" Syntax: livre_adapt", mainName, 1); /* Read the image in at 150 ppi. */ ...
false
false
false
false
false
0
EnterScope(MachineBasicBlock *MBB) { DEBUG(dbgs() << "Entering: " << MBB->getName() << '\n'); ScopeType *Scope = new ScopeType(VNT); ScopeMap[MBB] = Scope; }
false
false
false
false
false
0
handle_vendor_event(struct xhci_hcd *xhci, union xhci_trb *event) { u32 trb_type; trb_type = TRB_FIELD_TO_TYPE(le32_to_cpu(event->generic.field[3])); xhci_dbg(xhci, "Vendor specific event TRB type = %u\n", trb_type); if (trb_type == TRB_NEC_CMD_COMP && (xhci->quirks & XHCI_NEC_HOST)) handle_cmd_completion(xhci...
false
false
false
false
false
0
findMatchingBlock(fl_BlockLayout * pBlock) { TOCEntry * pThisEntry = NULL; fl_BlockLayout * pThisBL = NULL; UT_sint32 i = 0; bool bFound = false; for(i=0; i< m_vecEntries.getItemCount(); i++) { pThisEntry = m_vecEntries.getNthItem(i); pThisBL = pThisEntry->getBlock(); if(pThisBL->getStruxDocHandle() == pBlo...
false
false
false
false
false
0
numbits(uchar *buf) { int byte,ct; uchar bit; for(ct=byte=0;byte<len;byte++) for(bit=1;bit;bit=bit<<1) ct+=(buf[byte]&bit?1:0); return(ct); }
false
false
false
false
false
0
i915_gem_obj_bound_any(struct drm_i915_gem_object *o) { struct i915_vma *vma; list_for_each_entry(vma, &o->vma_list, obj_link) if (drm_mm_node_allocated(&vma->node)) return true; return false; }
false
false
false
false
false
0
WaitOnLock(LOCALLOCK *locallock, ResourceOwner owner) { LOCKMETHODID lockmethodid = LOCALLOCK_LOCKMETHOD(*locallock); LockMethod lockMethodTable = LockMethods[lockmethodid]; char *volatile new_status = NULL; LOCK_PRINT("WaitOnLock: sleeping on lock", locallock->lock, locallock->tag.mode); /* Report chan...
false
true
false
false
false
1
________lambda7_ (Block2Data* _data2_, GObject* obj, GAsyncResult* res) { Example * self; FILE* _tmp5_; const gchar* _tmp6_; GError * _inner_error_ = NULL; self = _data2_->self; g_return_if_fail (res != NULL); { FriendsDispatcher* _tmp0_; GAsyncResult* _tmp1_; gchar* _tmp2_ = NULL; _tmp0_ = self->dispatc...
false
false
false
false
false
0
update_theme_from_controls (GthContactSheetThemeDialog *self) { self->priv->theme->display_name = g_strdup (gtk_entry_get_text (GTK_ENTRY (GET_WIDGET ("name_entry")))); /* background */ if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (GET_WIDGET ("solid_color_radiobutton")))) { self->priv->theme->background_...
false
false
false
false
false
0
AWTC_baseMatch(char c1, char c2) // c1,c2 == ACGUTRS... // returns 0 for equal // 1 for probably mutations // 2 for improbably mutations // -1 if one char is illegal { const char *p1 = strchr(nucleic_acid_order, c1); const char *p2 = strchr(nucleic_acid_order, c2); awtc_asser...
false
false
false
false
false
0
virt_rename(const char *path, const char *newpath) { int res; ventry *ve; ventry *newve; int errno_save = errno; res = av_get_ventry(path, 0, &ve); if(res == 0) { res = av_get_ventry(newpath, 0, &newve); if(res == 0) { res = av_rename(ve, newve); av_free_ventry(newve); } av...
false
false
false
false
false
0
sh_vou_set_fmt_vid_out(struct sh_vou_device *vou_dev, struct v4l2_pix_format *pix) { unsigned int img_height_max; struct sh_vou_geometry geo; struct v4l2_subdev_format format = { .which = V4L2_SUBDEV_FORMAT_ACTIVE, /* Revisit: is this the correct code? */ .format.code = MEDIA_BUS_FMT_YUYV8_2X8, .format.f...
false
false
false
false
false
0
find_type_valid (GnmValue const *find) { /* Excel does not lookup errors or blanks */ if (VALUE_IS_EMPTY (find)) return FALSE; return VALUE_IS_NUMBER (find) || VALUE_IS_STRING (find); }
false
false
false
false
false
0
P_Getenv(Object e) { extern char *getenv(); char *s; return (s = getenv(Get_String(e))) ? Make_String(s, strlen(s)) : False; }
false
false
false
false
false
0
cache_enumerate(struct mapent_cache *mc, struct mapent *me) { if (!me) return cache_lookup_first(mc); return cache_lookup_next(mc, me); }
false
false
false
false
false
0
vector_bitwise_and_op( vector* tgt, /*!< Target vector for operation results to be stored */ vector* src1, /*!< Source vector 1 to perform operation on */ vector* src2 /*!< Source vector 2 to perform operation on */ ) { PROFILE(VECTOR_BITWISE_AND_OP); bool retval; /* Return value for this function */ ...
false
false
false
false
true
1
ns_socketpair(sock_t sp[2]) { struct sockaddr_in sa; sock_t sock; socklen_t len = sizeof(sa); int ret = 0; sp[0] = sp[1] = INVALID_SOCKET; (void) memset(&sa, 0, sizeof(sa)); sa.sin_family = AF_INET; sa.sin_port = htons(0); sa.sin_addr.s_addr = htonl(0x7f000001); if ((sock = socket(AF_INET, SOCK_S...
false
false
false
false
false
0
ct_timer_interrupt(void *data, unsigned int status) { struct ct_timer *timer = data; /* Interval timer interrupt */ if ((status & IT_INT) && timer->ops->interrupt) timer->ops->interrupt(timer); }
false
false
false
false
false
0