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
instantiation( const SubstitutionMap& subst, const problem_t& problem ) const { int n = arity(); if( n == 0 ) return( effect().instantiation( subst, problem ) ); else { SubstitutionMap args( subst ); std::vector<ObjectList> arguments( n, ObjectList() ); std::vector<ObjectList::const...
false
false
false
false
false
0
gst_rtp_gst_pay_class_init (GstRtpGSTPayClass * klass) { GObjectClass *gobject_class; GstElementClass *gstelement_class; GstRTPBasePayloadClass *gstrtpbasepayload_class; gobject_class = (GObjectClass *) klass; gstelement_class = (GstElementClass *) klass; gstrtpbasepayload_class = (GstRTPBasePayloadClass *...
false
false
false
false
false
0
awt_create_selection_box(AW_window *aws, const char *awar_prefix,const char *at_prefix,const char *pwd, bool show_dir, bool allow_wildcards) { AW_root *aw_root = aws->get_root(); struct adawcbstruct *acbs = new adawcbstruct; memset(acbs, 0, sizeof(*acbs)); acbs->aws = (AW_window *)aws; ...
false
false
false
false
false
0
edit_startup(File *file) { int chg1 = False, chg2 = False; if (mod_usebg && (delstr(file, "\n" "PIDFILE=/var/run/kdmdesktop-$DISPLAY.pid\n" "if [[] -f $PIDFILE ] ; then\n" " kill `cat $PIDFILE`\n" "fi\n") || delstr(file, "\n" ...
false
false
false
false
false
0
entry_find_oldest(void *data, void *cookie) { struct cache_entry *entry = (struct cache_entry *) data; struct cache_entry **oldest = (struct cache_entry **) cookie; if (*oldest == NULL) { *oldest = entry; return; } if (entry->data->refcount > (*oldest)->data->refcount) retur...
false
false
false
false
false
0
ui_draw_status(char *filename,char *misc, char *author,int track,char *playingstr) { static gchar buf[256]; char *ptr=strrchr(filename,'/'); int tbl_row=0; if(!window) return; gtk_label_set_text(GTK_LABEL(detaillabel[tbl_row]),ptr?ptr+1:filename); tbl_row++; gtk_label_set_text(GTK_LABEL(det...
false
false
false
false
false
0
addFilters(Object *dict, int recursion) { Object obj, obj2; Object params, params2; Stream *str; int i; str = this; dict->dictLookup("Filter", &obj, recursion); if (obj.isNull()) { obj.free(); dict->dictLookup("F", &obj); } dict->dictLookup("DecodeParms", &params, recursion); if (params.isN...
false
false
false
false
false
0
SUBR_neg(ushort code) { static void *jump[] = { &&__VARIANT, &&__BOOLEAN, &&__BYTE, &&__SHORT, &&__INTEGER, &&__LONG, &&__SINGLE, &&__FLOAT, &&__ERROR }; VALUE *P1; TYPE type; P1 = SP - 1; type = code & 0x0F; goto *jump[type]; __BOOLEAN: return; __BYTE: P1->_integer.value = (unsigned char...
false
false
false
false
false
0
stp_escp2_get_media_type(const stp_vars_t *v, int ignore_res) { stpi_escp2_printer_t *printdef = stp_escp2_get_printer(v); const stp_string_list_t *p = printdef->papers; if (p) { const char *name = stp_get_string_parameter(v, "MediaType"); if (name) return get_media_type_named(v, name, ignore_res...
false
false
false
false
false
0
nextipage ( IFILE *f, int dp ) { int err=0 ; char *message ; #ifdef ENABLE_NLS gsize written = 0 ; char *conv_fname ; #endif int ( *reset [NPFORMATS] ) ( IFILE * ) = { raw_reset, fax_reset, pbm_reset, text_reset, pcx_reset }, (*pf)(IFILE*) ; /* close current file if any and set to NULL */ if ( f...
false
false
false
false
true
1
nss_SetError ( PRUint32 error) { error_stack *es; if( 0 == error ) { nss_ClearErrorStack(); return; } es = error_get_my_stack(); if( (error_stack *)NULL == es ) { /* Oh, well. */ return; } if (es->header.count < es->header.space) { es->stack[ es->header.count++ ] = error; } else {...
false
false
false
false
true
1
VehicleTypeSelectionItemFactory( Resources plantResources, const Container& types, const Player& player ) : actplayer(player), showResourcesForUnit(true), original_items( types ) { restart(); setAvailableResource( plantResources ); }
false
false
false
false
false
0
_PyLong_NumBits(PyObject *vv) { PyLongObject *v = (PyLongObject *)vv; size_t result = 0; Py_ssize_t ndigits; assert(v != NULL); assert(PyLong_Check(v)); ndigits = ABS(Py_SIZE(v)); assert(ndigits == 0 || v->ob_digit[ndigits - 1] != 0); if (ndigits > 0) { digit msd = v->ob_digit[n...
false
false
false
false
false
0
drm_bridge_mode_set(struct drm_bridge *bridge, struct drm_display_mode *mode, struct drm_display_mode *adjusted_mode) { if (!bridge) return; if (bridge->funcs->mode_set) bridge->funcs->mode_set(bridge, mode, adjusted_mode); drm_bridge_mode_set(bridge->next, mode, adjusted_mode); }
false
false
false
false
false
0
gst_base_video_decoder_get_frame (GstBaseVideoDecoder * base_video_decoder, int frame_number) { GList *g; GstVideoFrame *frame = NULL; GST_BASE_VIDEO_CODEC_STREAM_LOCK (base_video_decoder); for (g = g_list_first (GST_BASE_VIDEO_CODEC (base_video_decoder)->frames); g; g = g_list_next (g)) { GstVid...
false
false
false
true
false
1
recent(I,resp,wt,p,s,x) double *I, *resp, *wt, x; INT p, s; { INT i, j; /* first, use W taylor series I -> resp */ for (i=0; i<=p; i++) { resp[i] = 0.0; for (j=0; j<s; j++) resp[i] += wt[j]*I[i+j]; } /* now, recenter x -> 0 */ if (x==0) return; for (j=0; j<=p; j++) for (i=p; i>j; i--) resp[i] += x*r...
false
false
false
false
false
0
CMod_LoadLeafBrushes (lump_t *l) { int i; unsigned short *out; unsigned short *in; int count; in = (void *)(cmod_base + l->fileofs); if (l->filelen % sizeof(*in)) Com_Error (ERR_DROP, "CMod_LoadLeafBrushes: funny lump size"); count = l->filelen / sizeof(*in); if (count < 1) Com_Error (ER...
false
false
false
false
false
0
perspectiveMessCallback(void *data, t_symbol *, int argc, t_atom *argv) { if (argc != 6) { GetMyClass(data)->error("perspec message needs 6 arguments"); return; } GemMan::m_perspect[0] = atom_getfloat(&argv[0]); // left GemMan::m_perspect[1] = atom_getfloat(&argv[1]); // right GemMan::m_pers...
false
false
false
false
false
0
Process(void) { if (g_parser) { g_parser->Close(); if (!g_parser->Open(g_strPort.c_str())) { PrintToStdOut("Failed to reconnect\n"); g_bExit = true; } } return NULL; }
false
false
false
false
false
0
session_query_cname(dns_session_t *session, dns_msg_question_t *q, dns_cache_rrset_t *rrset, int nlevel) { dns_cache_res_t *cache; dns_cache_rrset_t *rr_cname; dns_config_zone_t *zone; dns_msg_question_t q_cname; if (nlevel > DNS_CNAME_NEST_MAX) { plog(LOG_DEBUG, "%s: CNAME nested too deep"...
false
true
false
false
false
1
gallop_right(PyObject *key, PyObject **a, Py_ssize_t n, Py_ssize_t hint) { Py_ssize_t ofs; Py_ssize_t lastofs; Py_ssize_t k; assert(key && a && n > 0 && hint >= 0 && hint < n); a += hint; lastofs = 0; ofs = 1; IFLT(key, *a) { /* key < a[hint] -- gallop left, until * a[...
false
false
false
false
false
0
vmspphot_create(cpl_plugin *plugin) { cpl_recipe *recipe = (cpl_recipe *)plugin; cpl_parameter *p; cxint status = 0; /* * Create the list of options we accept and hook it into the * recipe interface. */ recipe->parameters = cpl_parameterlist_new(); if (recipe->parameters == ...
false
false
false
false
false
0
cache_user_id( KBNODE keyblock ) { user_id_db_t r; const char *uid; size_t uidlen; keyid_list_t keyids = NULL; KBNODE k; for (k=keyblock; k; k = k->next ) { if ( k->pkt->pkttype == PKT_PUBLIC_KEY || k->pkt->pkttype == PKT_PUBLIC_SUBKEY ) { keyid_list_t a = xmall...
false
false
false
false
false
0
areBlanks(xmlParserCtxtPtr ctxt, const xmlChar *str, int len, int blank_chars) { int i, ret; xmlNodePtr lastChild; /* * Don't spend time trying to differentiate them, the same callback is * used ! */ if (ctxt->sax->ignorableWhitespace == ctxt->sax->characters) ...
false
false
false
false
false
0
yuv_bgr24_c(SHORTLINEARGS) { const yuv* s = (const yuv*) src; col* d = (col*) dest; while (w--) *d++ = *s++; }
false
false
false
false
false
0
test_threaded_job_successful (void) { UDisksThreadedJob *job; job = udisks_threaded_job_new (threaded_job_successful_func, NULL, NULL, NULL, NULL); _g_assert_signal_received (job, "completed", G_CALLBACK (on_completed_expect_success), NULL); g_object_unref (job); }
false
false
false
false
false
0
make_object_born (ira_object_t obj) { live_range_t lr = OBJECT_LIVE_RANGES (obj); sparseset_set_bit (objects_live, OBJECT_CONFLICT_ID (obj)); IOR_HARD_REG_SET (OBJECT_CONFLICT_HARD_REGS (obj), hard_regs_live); IOR_HARD_REG_SET (OBJECT_TOTAL_CONFLICT_HARD_REGS (obj), hard_regs_live); if (lr == NULL || ...
false
false
false
false
false
0
gar_lbl_init_obj_counts(struct gar_subfile *sub, struct hdr_lbl_t *lbl) { if (lbl->lbl2_rec_size) sub->lbl_countries = lbl->lbl2_length/lbl->lbl2_rec_size; if (lbl->lbl3_rec_size) sub->lbl_regions = lbl->lbl3_length/lbl->lbl3_rec_size; if (lbl->lbl4_rec_size) sub->lbl_cities = lbl->lbl4_length/lbl->lbl4_rec_si...
false
false
false
false
false
0
ptaaAddPta(PTAA *ptaa, PTA *pta, l_int32 copyflag) { l_int32 n; PTA *ptac; PROCNAME("ptaaAddPta"); if (!ptaa) return ERROR_INT("ptaa not defined", procName, 1); if (!pta) return ERROR_INT("pta not defined", procName, 1); if (copyflag == L_INSERT) { ...
false
false
false
false
false
0
storeRegToStackSlot(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, unsigned SrcReg, bool isKill, int FrameIdx, const TargetRegisterClass *RC, const T...
false
false
false
false
false
0
Cns_insert_lnk_entry(dbfd, lnk_entry) struct Cns_dbfd *dbfd; struct Cns_symlinks *lnk_entry; { char escaped_name[CA_MAXPATHLEN*2+1]; char fileid_str[21]; char func[21]; static char insert_stmt[] = "INSERT INTO Cns_symlinks \ (FILEID, LINKNAME) \ VALUES \ (%s, '%s')"; PGresult *res; char sql_stmt[2130]; ...
false
false
false
false
false
0
at76_config(struct ieee80211_hw *hw, u32 changed) { struct at76_priv *priv = hw->priv; at76_dbg(DBG_MAC80211, "%s(): channel %d", __func__, hw->conf.chandef.chan->hw_value); at76_dbg_dump(DBG_MAC80211, priv->bssid, ETH_ALEN, "bssid:"); mutex_lock(&priv->mtx); priv->channel = hw->conf.chandef.chan->hw_value; ...
false
false
false
false
false
0
add_AT_lbl_id (dw_die_ref die, enum dwarf_attribute attr_kind, const char *lbl_id) { dw_attr_node attr; attr.dw_attr = attr_kind; attr.dw_attr_val.val_class = dw_val_class_lbl_id; attr.dw_attr_val.val_entry = NULL; attr.dw_attr_val.v.val_lbl_id = xstrdup (lbl_id); if (dwarf_split_debug_info)...
false
false
false
false
false
0
AVM_card_msg(struct IsdnCardState *cs, int mt, void *arg) { u_long flags; switch (mt) { case CARD_RESET: spin_lock_irqsave(&cs->lock, flags); byteout(cs->hw.avm.cfg_reg + ASL0_OFFSET, 0x00); HZDELAY(HZ / 5 + 1); byteout(cs->hw.avm.cfg_reg + ASL0_OFFSET, ASL0_W_RESET); HZDELAY(HZ / 5 + 1); byteout(cs->hw...
false
false
false
false
false
0
shared_open (ACE_SOCK_SEQPACK_Association &new_association, int protocol_family, int protocol, int reuse_addr) { ACE_TRACE ("ACE_SOCK_SEQPACK_Connector::shared_open"); // Only open a new socket if we don't already ...
false
false
false
false
false
0
vStoreChar(ULONG ulChar, BOOL bChangeAllowed, output_type *pOutput) { char szResult[4]; size_t tIndex, tLen; fail(pOutput == NULL); if (tOptions.eEncoding == encoding_utf_8 && bChangeAllowed) { DBG_HEX_C(ulChar > 0xffff, ulChar); fail(ulChar > 0xffff); tLen = tUcs2Utf8(ulChar, szResult, sizeof(szResult)); ...
false
false
false
false
false
0
put_directory(const char *dirname, const char *remotedirname, struct work_queue *q, struct work_queue_worker *w, int taskid, INT64_T * total_bytes, int flags) { DIR *dir = opendir(dirname); if(!dir) return 0; struct dirent *file; char buffer[WORK_QUEUE_LINE_MAX]; char *localname, *remotename; int result; str...
true
true
false
false
false
1
process_pipe_term () { if (endpoint) endpoint->detach_outpipe (this); reader_t *p = peer; peer = NULL; send_pipe_term_ack (p); }
false
false
false
false
false
0
allRowsForTrack( const Meta::TrackPtr& track ) const { QSet<int> proxyModelRows; foreach( int sourceModelRow, m_belowModel->allRowsForTrack( track ) ) { int proxyModelRow = rowFromSource( sourceModelRow ); if ( proxyModelRow != -1 ) proxyModelRows.insert( proxyModelRow ); } ...
false
false
false
false
false
0
print_usage(char *argv0, int print_level) { int c; printf("Usage: %s [--version] [--print-config] [--help] [--long-help] [options] [config files]\n\n", argv0); printf("Options:\n"); for (c = 0; config_names[c].name != NULL; c++) { if (config_names[c].long_only > print_level) continue; printf(" %s %s\n",...
false
false
false
false
false
0
timblogiw_enuminput(struct file *file, void *priv, struct v4l2_input *inp) { struct video_device *vdev = video_devdata(file); int i; dev_dbg(&vdev->dev, "%s: Entry\n", __func__); if (inp->index != 0) return -EINVAL; inp->index = 0; strncpy(inp->name, "Timb input 1", sizeof(inp->name) - 1); inp->type = V...
false
false
false
false
false
0
set_grid() { TBOOLEAN explicit_change = FALSE; c_token++; #define GRID_MATCH(axis, string) \ if (almost_equals(c_token, string+2)) { \ if (string[2] == 'm') \ axis_array[axis].gridminor = TRUE; \ else \ axis_array[axis].gridmajor = TRUE; \ explicit_change = TRUE; \ ++c_...
false
false
false
false
false
0
vxlan_fill_metadata_dst(struct net_device *dev, struct sk_buff *skb) { struct vxlan_dev *vxlan = netdev_priv(dev); struct ip_tunnel_info *info = skb_tunnel_info(skb); __be16 sport, dport; sport = udp_flow_src_port(dev_net(dev), skb, vxlan->cfg.port_min, vxlan->cfg.port_max, true); dport = info->key.tp_dst ?...
false
false
false
false
false
0
openoverlay_cb(Fl_Object *, void *i) { IMAGEPARM *pp = (IMAGEPARM *)mainMenuBar->getSelectedItemArgument(IMAGE_LIST_ID); static const char *currentfile = 0, *p = 0; #ifdef HAVE_NATIVE_CHOOSER char locfilename[DFLTSTRLEN]; ImviewNFC->type(Fl_Native_File_Chooser::BROWSE_FILE); ImviewNF...
false
false
false
false
false
0
setMarker1Position(double mrk_pos) { marker_1_position = mrk_pos; if(marker_1_position > 1.01) marker_1_position = 1.01; if(marker_1_position < 0.0001) marker_1_position = 0.0001; update(); }
false
false
false
false
false
0
findPackage (const string &name) { Package *pkg ; int npkgs ; Scope *scope = currentScope ; while (scope != NULL) { if ((pkg = scope->findPackage (name, npkgs)) != NULL) { if (npkgs != 1) { error ("Ambiguous use of %s, I can find %d of them", name.c_str(), npkgs) ; ...
false
false
false
false
false
0
get_Length() const { double dfLength = 0.0; for( int iGeom = 0; iGeom < nGeomCount; iGeom++ ) { OGRGeometry* geom = papoGeoms[iGeom]; switch( wkbFlatten(geom->getGeometryType()) ) { case wkbLinearRing: case wkbLineString: dfLength += ((OGRCurve...
false
false
false
false
false
0
gnumeric_r_dnbinom (GnmFuncEvalInfo *ei, GnmValue const * const *args) { gnm_float x = value_get_as_float (args[0]); gnm_float n = value_get_as_float (args[1]); gnm_float psuc = value_get_as_float (args[2]); gboolean give_log = args[3] ? value_get_as_checked_bool (args[3]) : FALSE; return value_new_float (dnbinom...
false
false
false
false
false
0
optst(struct vars * v, struct subre * t) { if (t == NULL) return; /* recurse through children */ if (t->left != NULL) optst(v, t->left); if (t->right != NULL) optst(v, t->right); }
false
false
false
false
false
0
gkrellm_disk_assign_data_by_device(gint device_number, gint unit_number, guint64 rb, guint64 wb, gboolean virtual) { DiskMon *disk; gchar *name; gint order = -1; assign_method = DISK_ASSIGN_BY_DEVICE; disk = lookup_disk_by_device(device_number, unit_number); if (!disk && name_from_device) { name = (*name...
false
false
false
false
false
0
vevop(l,r,f) vari *l, *r; double (*f)(); { INT i, n; vari *v; double z; if ((l==NULL) | (r==NULL)) return(NULL); n = vlength(l); if (n<vlength(r)) n = vlength(r); v = createvar("_vevop",STHIDDEN,n,VDOUBLE); if (lf_error) return(NULL); for (i=0; i<n; i++) { z = f(vitem(l,i),vitem(r,i)); vassn(v,i,z...
false
false
false
false
false
0
extract_key(__isl_keep isl_stream *s, struct isl_token *tok) { int type; char *name; enum isl_schedule_key key; isl_ctx *ctx; ctx = isl_stream_get_ctx(s); type = isl_token_get_type(tok); if (type != ISL_TOKEN_IDENT && type != ISL_TOKEN_STRING) { isl_stream_error(s, tok, "expecting key"); return isl_schedul...
false
false
false
false
false
0
widget( QWidget* parent ) { QWidget *widget = new QWidget( parent ); QVBoxLayout *layout = new QVBoxLayout( widget ); QLabel *imageLabel = new QLabel(); imageLabel->setPixmap( QPixmap( KStandardDirs::locate( "data", "amarok/images/echonest.png" ) ) ); QLabel *label = new QLabel( i18n( "<a href=\"ht...
false
false
false
false
false
0
qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a) { if (_c == QMetaObject::InvokeMetaMethod) { Q_ASSERT(staticMetaObject.cast(_o)); QtLuaPainter *_t = static_cast<QtLuaPainter *>(_o); switch (_id) { case 0: _t->showpage(); break; case 1: _t->refresh();...
false
false
false
false
false
0
df_lr_bb_local_compute (unsigned int bb_index) { basic_block bb = BASIC_BLOCK (bb_index); struct df_lr_bb_info *bb_info = df_lr_get_bb_info (bb_index); rtx insn; df_ref *def_rec; df_ref *use_rec; /* Process the registers set in an exception handler. */ for (def_rec = df_get_artificial_defs (bb_index); *...
false
false
false
false
false
0
assignment(LexState*ls,struct LHS_assign*lh,int nvars){ expdesc e; check_condition(ls,VLOCAL<=lh->v.k&&lh->v.k<=VINDEXED, "syntax error"); if(testnext(ls,',')){ struct LHS_assign nv; nv.prev=lh; primaryexp(ls,&nv.v); if(nv.v.k==VLOCAL) check_conflict(ls,lh,&nv.v); luaY_checklimit(ls->fs,nvars,200-ls->L->nCcalls, "varia...
false
false
false
false
false
0
g2_FIG_polygon(int pid, void *pdp, int N, int *points) { g2_FIG_device *fig=&g2_FIG_dev[pid]; int i; if(N<2) { return -1; } fprintf(fig->fp,"2 3 %d %d %d -1 1 1 -1 %d 1 0 -1 0 0 %d\n", fig->line_style, fig->thickness, fig->pen_color, fig->style_val, N+1); for(i=0;i<2*N;i+=2) { fprin...
false
false
false
false
false
0
crypto_init_ablkcipher_ops(struct crypto_tfm *tfm, u32 type, u32 mask) { struct ablkcipher_alg *alg = &tfm->__crt_alg->cra_ablkcipher; struct ablkcipher_tfm *crt = &tfm->crt_ablkcipher; if (alg->ivsize > PAGE_SIZE / 8) return -EINVAL; crt->setkey = setkey; crt->encrypt = alg->encrypt; crt->decrypt =...
false
false
false
false
false
0
WaitForSection(ifstream& fileData, const string& match) { string line; while (! fileData.eof() ) { getline (fileData,line); if (TrimStr(line) == match) return; } }
false
false
false
false
false
0
swap_bytes(unsigned char *item1_p, unsigned char *item2_p, int ele_size) { unsigned char char_temp; for (; ele_size > 0; ele_size--) { char_temp = *item1_p; *item1_p = *item2_p; *item2_p = char_temp; item1_p++; item2_p++; } }
false
false
false
false
false
0
RemoveSelected() { long item; item = m_pPanel->GetListCtrl()->GetNextItem(-1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED); while (item != -1) { m_texts.erase(m_pPanel->GetListCtrl()->GetItemText(item)); m_pPanel->GetListCtrl()->DeleteItem(item); // -1 because the indices were shift...
false
false
false
false
false
0
pop_scope (tree t) { if (t == NULL_TREE) return; if (TREE_CODE (t) == NAMESPACE_DECL) pop_decl_namespace (); else if CLASS_TYPE_P (t) pop_nested_class (); }
false
false
false
false
false
0
store_selargs_to_rec(PART_PRUNE_PARAM *ppar, SEL_ARG **start, int num) { KEY_PART *parts= ppar->range_param.key_parts; for (SEL_ARG **end= start + num; start != end; start++) { SEL_ARG *sel_arg= (*start); store_key_image_to_rec(sel_arg->field, sel_arg->min_value, ...
false
false
false
false
false
0
EVP_PBE_find(int type, int pbe_nid, int *pcnid, int *pmnid, EVP_PBE_KEYGEN **pkeygen) { EVP_PBE_CTL *pbetmp = NULL, pbelu; int i; if (pbe_nid == NID_undef) return 0; pbelu.pbe_type = type; pbelu.pbe_nid = pbe_nid; if (pbe_algs) { i = sk_EVP_PBE_CTL_find(pbe_algs, &pbelu); if (i != -1) pbetmp = sk...
false
false
false
false
false
0
piece_button_press (GooCanvasItem *item, GooCanvasItem *target, GdkEventButton *event, gpointer data) { GooCanvas *canvas; GooCanvasItem **board; GooCanvasItem *text G_GNUC_UNUSED; int num G_GNUC_UNUSED, pos, newpos; int x, y; double dx = 0.0, dy = 0.0; int move; canvas = goo_canvas_it...
false
false
false
false
false
0
cpl_propertylist_has(const cpl_propertylist *self, const char *name) { if (self == NULL || name == NULL) { cpl_error_set_(CPL_ERROR_NULL_INPUT); return 0; } return _cpl_propertylist_get(self, name) != NULL ? 1 : 0; }
false
false
false
false
false
0
clear_modify_mem_tables (void) { unsigned i; bitmap_iterator bi; EXECUTE_IF_SET_IN_BITMAP (modify_mem_list_set, 0, i, bi) { VEC_free (rtx, heap, modify_mem_list[i]); VEC_free (modify_pair, heap, canon_modify_mem_list[i]); } bitmap_clear (modify_mem_list_set); bitmap_clear (blocks_with_cal...
false
false
false
false
false
0
my_lock(CURL *handle, curl_lock_data data, curl_lock_access laccess, void *useptr ) { const char *what; struct userdata *user = (struct userdata *)useptr; int locknum; (void)handle; (void)laccess; switch ( data ) { case CURL_LOCK_DATA_SHARE: what = "share"; locknum = 0; bre...
false
false
false
false
false
0
printAnnotation(raw_ostream &OS, StringRef Annot) { if (!Annot.empty()) { if (CommentStream) { (*CommentStream) << Annot; // By definition (see MCInstPrinter.h), CommentStream must end with // a newline after each comment. if (Annot.back() != '\n') (*CommentStream) << '\n'; } e...
false
false
false
false
false
0
textbuffer_view_create(TEXT_BUFFER_REC *buffer, int width, int height, int scroll, int utf8) { TEXT_BUFFER_VIEW_REC *view; g_return_val_if_fail(buffer != NULL, NULL); g_return_val_if_fail(width > 0, NULL); view = g_new0(TEXT_BUFFER_VIEW_REC, 1); view->buffer = buffer; vi...
false
false
false
false
false
0
fast_disconnect(int str1, int str2, int *move) { int result; int save_limit = connection_node_limit; int save_verbose = verbose; if (board[str1] == EMPTY || board[str2] == EMPTY) return WIN; str1 = find_origin(str1); str2 = find_origin(str2); if (str1 > str2) { int tmp = str1; str1 = str2; ...
false
false
false
false
false
0
ar5523_hwconfig(struct ieee80211_hw *hw, u32 changed) { struct ar5523 *ar = hw->priv; ar5523_dbg(ar, "config called\n"); mutex_lock(&ar->mutex); if (changed & IEEE80211_CONF_CHANGE_CHANNEL) { ar5523_dbg(ar, "Do channel switch\n"); ar5523_flush_tx(ar); ar5523_switch_chan(ar); } mutex_unlock(&ar->mutex); re...
false
false
false
false
false
0
php_replace_controlchars_ex(char *str, int len) { unsigned char *s = (unsigned char *)str; unsigned char *e = (unsigned char *)str + len; if (!str) { return (NULL); } while (s < e) { if (iscntrl(*s)) { *s='_'; } s++; } return (str); }
false
false
false
false
false
0
pkt_iosched_process_queue(struct pktcdvd_device *pd) { if (atomic_read(&pd->iosched.attention) == 0) return; atomic_set(&pd->iosched.attention, 0); for (;;) { struct bio *bio; int reads_queued, writes_queued; spin_lock(&pd->iosched.lock); reads_queued = !bio_list_empty(&pd->iosched.read_queue); writes...
false
false
false
false
false
0
client_challenge( GuiWidget *widget, GuiEvent *event ) { #ifdef NETWORK_ENABLED if ( event->type != GUI_CLICKED ) return; /* everything valid? */ if ( client_user == 0 ) { client_popup_info( _("You must select a user for a challenge.") ); return; } if ( client_levelset == 0 ) { client_popup_info( _("You mu...
false
true
false
false
false
1
_cr_notify_step_launch(slurm_step_ctx_t *ctx) { int fd, len, rc = 0; char *cr_sock_addr = NULL; cr_sock_addr = getenv("SLURM_SRUN_CR_SOCKET"); if (cr_sock_addr == NULL) { /* not run under srun_cr */ return 0; } if ((fd = _connect_srun_cr(cr_sock_addr)) < 0) { debug2("failed connecting srun_cr. take it not r...
false
false
false
false
true
1
print_uptime(const struct ap_session *ses, char *buf) { time_t uptime; int day,hour,min,sec; char time_str[14]; if (ses->stop_time) uptime = ses->stop_time - ses->start_time; else { uptime = _time(); uptime -= ses->start_time; } day = uptime/ (24*60*60); uptime %= (24*60*60); hour = uptime / (60*60); up...
true
true
false
false
false
1
mod_fill_do_entry_changed(PlayQueuePlugin * self) { const gchar *text2 = gtk_entry_get_text(GTK_ENTRY(self->priv->filter_entry)); if (strlen(text2) > 0) { MpdData *data = NULL; data = advanced_search(text2, TRUE); gmpc_mpddata_model_set_mpd_data(GMPC_MPDDATA_MODEL(self->priv->mod_fill), data); self->priv->...
false
false
false
false
false
0
clutter_desaturate_effect_init (ClutterDesaturateEffect *self) { ClutterDesaturateEffectClass *klass = CLUTTER_DESATURATE_EFFECT_GET_CLASS (self); if (G_UNLIKELY (klass->base_pipeline == NULL)) { CoglContext *ctx = clutter_backend_get_cogl_context (clutter_get_default_backend ()); CoglSnipp...
false
false
false
false
false
0
sb_put(SB *sb, const char *bytes, int count) { sb_need(sb, count); memcpy(sb->cur, bytes, count); sb->cur += count; }
false
false
false
false
false
0
dht_is_subvol_filled (xlator_t *this, xlator_t *subvol) { int i = 0; dht_conf_t *conf = NULL; gf_boolean_t subvol_filled_inodes = _gf_false; gf_boolean_t subvol_filled_space = _gf_false; gf_boolean_t is_subvol_filled = _gf_false; conf = this->private; /* Check for values above specified percent or free...
false
false
false
false
false
0
load_single_tx( GncSqlBackend* be, GncSqlRow* row ) { const GncGUID* guid; GncGUID tx_guid; Transaction* pTx; g_return_val_if_fail( be != NULL, NULL ); g_return_val_if_fail( row != NULL, NULL ); guid = gnc_sql_load_guid( be, row ); if ( guid == NULL ) return NULL; tx_guid = *guid; ...
false
false
false
false
false
0
storeUnlockObjectDebug(StoreEntry * e, const char *file, const int line) { e->lock_count--; debug(20, 3) ("storeUnlockObject: (%s:%d): key '%s' count=%d\n", file, line, storeKeyText(e->hash.key), e->lock_count); if (e->lock_count) return (int) e->lock_count; if (e->store_status == STORE_PENDING) EBIT...
false
false
false
false
false
0
gtk_meter_adjustment_value_changed (GtkAdjustment *adjustment, gpointer data) { GtkMeter *meter; g_return_if_fail (adjustment != NULL); g_return_if_fail (data != NULL); meter = GTK_METER (data); if (meter->old_value != adjustment->value) { gtk_meter_update (meter); meter->old...
false
false
false
false
false
0
netsys_queue_add(struct nqueue *q, void *elem) { int code; unsigned long new_end; new_end = q->table_end + 1; if (new_end == q->table_size) new_end = 0; if (new_end == q->table_start) { /* We have to resize */ struct nqueue q1; int n; code = netsys_queue_init(&q1, q->table_size * 2); if (co...
false
true
false
false
false
1
eval_D2_uh_fast(const REAL_D Lambda[N_LAMBDA], const REAL *uh_loc, const REAL (*D2_phi)[N_LAMBDA][N_LAMBDA], int n_bas_fcts, REAL_DD D2_uh) { static REAL_DD D2; int i, j, k, l; REAL (*val)[DIM_OF_WORLD], D2_tmp[N_LAMBDA][N_LAMBDA] = {{0}}; val = D2_uh ?...
false
false
false
false
false
0
gnapplet_write_phonebook(gn_data *data, struct gn_statemachine *state) { gn_phonebook_subentry *se; int i, need_defnumber; REQUEST_DEF; if (!data->phonebook_entry) return GN_ERR_INTERNALERROR; if (!data->phonebook_entry->name[0]) return gnapplet_delete_phonebook(data, state); need_defnumber = 1; for (i = 0; ...
false
false
false
false
false
0
is_hrule(uint8_t *data, size_t size) { size_t i = 0, n = 0; uint8_t c; /* skipping initial spaces */ if (size < 3) return 0; if (data[0] == ' ') { i++; if (data[1] == ' ') { i++; if (data[2] == ' ') { i++; } } } /* looking at the hrule uint8_t */ if (i + 2 >= size || (data[i] != '*' && data[i] != '-' && dat...
false
false
false
false
false
0
from_iovec (struct Mono_Posix_Iovec *iov, gint32 iovcnt) { struct iovec* v; gint32 i; if (iovcnt < 0) { errno = EINVAL; return NULL; } v = malloc (iovcnt * sizeof (struct iovec)); if (!v) { return NULL; } for (i = 0; i < iovcnt; i++) { if (Mono_Posix_FromIovec (&iov[i], &v[i]) != 0) { free (v); ...
false
false
false
false
false
0
ctl_pdu_to_str(dchat_pdu_t* pdu, char** value) { // check if content-length is valid if (!is_valid_content_length(pdu->content_length)) { return -1; } *value = malloc(MAX_INT_STR + 1); if (*value == NULL) { ui_fatal("Memory allocation for content-length failed!"); } ...
false
false
false
false
false
0
weighted_interleave(double* weights, int n, int k, int* v, int* count) { double *x = (double*) calloc(n, sizeof(double)); int i; for (i=0; i<n; i++) { // make sure apps with no weight get no slots if (weights[i] == 0) { x[i] = 1e-100; } count[i] = 0; } for...
false
false
false
false
false
0
deprecated_attr_warn(const char *name) { pr_warn_once("%d (%s) Attribute %s (and others) will be removed. %s\n", task_pid_nr(current), current->comm, name, "See zram documentation."); }
false
false
false
false
false
0
password20_commit (const char *section_name, const struct config_keyvalue *kv, void *arg) { bmc_config_state_data_t *state_data; uint8_t userid; fiid_obj_t obj_cmd_rs = NULL; config_err_t rv = CONFIG_ERR_FATAL_ERROR; assert (section_name); assert (kv); assert (arg); ...
false
false
false
false
true
1
ois_expand_gsm7(char *raw8, const char *raw7, int len) { int i; char bits[8*(BUFLEN+1)]; SAY2(3, "ois_expand_gsm7 len=%d", len); /* yeah, there are also better algorithms, but... */ /* well, at least this is fairly portable and ok for small messages... */ ois_expand_gsm7_to_bits(bits, raw7, l...
true
true
false
false
false
1
serport_serio_close(struct serio *serio) { struct serport *serport = serio->port_data; unsigned long flags; spin_lock_irqsave(&serport->lock, flags); clear_bit(SERPORT_ACTIVE, &serport->flags); set_bit(SERPORT_DEAD, &serport->flags); spin_unlock_irqrestore(&serport->lock, flags); wake_up_interruptible(&serport...
false
false
false
false
false
0
tp_base_contact_list_delete_group_by_handle_cb (GObject *source, GAsyncResult *result, gpointer user_data) { TpBaseContactList *self = TP_BASE_CONTACT_LIST (source); GError *error = NULL; g_return_if_fail (TP_IS_BASE_CONTACT_LIST (source)); if (tp_base_contact_list_remove_group_finish (self, result, &...
false
false
false
false
false
0
isInCurrentFrame(VarDeclaration *v) { if (v->isDataseg() && !v->isCTFE()) return false; // It's a global return v->ctfeAdrOnStack >= framepointer; }
false
false
false
false
false
0
fromutf8(std::string str) { return mail::iconvert::convert(str, "utf-8", unicode_default_chset()); }
false
false
false
false
false
0
areNeighbours( GenericFightCell * cell1, GenericFightCell * cell2 ) { bool ret = false; if( !cell1 || !cell2 ) { return ret; } if( ( getNeighbour1( cell1 ) == cell2 ) || ( getNeighbour2( cell1 ) == cell2 ) || ( getNeighbour3( cell1 ) == cell2 ) || ( getNeighbour4( cell1 ) == cell2 ) || ( get...
false
false
false
false
false
0
GetPixelData(int x1, int y1, int x2, int y2, int front, unsigned char* data) { int y_low, y_hi; int x_low, x_hi; // set the current window this->MakeCurrent(); if (y1 < y2) { y_low = y1; y_hi = y2; } ...
false
false
false
false
false
0