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
LimitPropertyEditing( wxPGPropArg id, bool limit ) { wxPG_PROP_ARG_CALL_PROLOG() m_pState->DoLimitPropertyEditing(p, limit); RefreshProperty(p); }
false
false
false
false
false
0
camel_content_info_dump (CamelMessageContentInfo *ci, gint depth) { gchar *p; p = alloca (depth * 4 + 1); memset (p, ' ', depth * 4); p[depth * 4] = 0; if (ci == NULL) { printf ("%s<empty>\n", p); return; } if (ci->type) printf ( "%scontent-type: %s/%s\n", p, ci->type->typ...
false
false
false
false
false
0
random_line (char *file_name) { FILE *fh; char buf[512]; int lines, ran; if (!file_name[0]) goto nofile; fh = hexchat_fopen_file (file_name, "r", 0); if (!fh) { nofile: /* reason is not a file, an actual reason! */ return strdup (file_name); } /* count number of lines in file */ lines = 0; while (...
false
false
false
false
false
0
bu_int(const char *p, const formatdef *f) { long x = 0; Py_ssize_t i = f->size; const unsigned char *bytes = (const unsigned char *)p; do { x = (x<<8) | *bytes++; } while (--i > 0); /* Extend the sign bit. */ if (SIZEOF_LONG > f->size) x |= -(x & (1L << ((8 * f->size) - 1)));...
false
false
false
false
false
0
bg_add(char *cmd) { G_debug(2, "bg_add(): cmd = %s", cmd); if (nbgcmd == abgcmd) { abgcmd += 10; Bgcmd = (BGCMD *) G_realloc(Bgcmd, abgcmd * sizeof(BGCMD)); } Bgcmd[nbgcmd].cmd = G_store(cmd); Bgcmd[nbgcmd].on = 1; nbgcmd++; return nbgcmd; }
false
false
false
false
false
0
unlink_anon_vmas(struct vm_area_struct *vma) { struct anon_vma_chain *avc, *next; struct anon_vma *root = NULL; /* * Unlink each anon_vma chained to the VMA. This list is ordered * from newest to oldest, ensuring the root anon_vma gets freed last. */ list_for_each_entry_safe(avc, next, &vma->anon_vma_chain,...
false
false
false
false
false
0
List_clear(DOH *lo) { List *l = (List *) ObjData(lo); int i; for (i = 0; i < l->nitems; i++) { Delete(l->items[i]); } l->nitems = 0; }
false
false
false
false
false
0
exec_instantiate(CONF_SECTION *conf, void **instance) { rlm_exec_t *inst; const char *xlat_name; /* * Set up a storage area for instance data */ inst = rad_malloc(sizeof(rlm_exec_t)); if (!inst) return -1; memset(inst, 0, sizeof(rlm_exec_t)); /* * If the configuration parameters can't be parsed, then ...
false
false
false
false
false
0
callbacks_layer_tree_button_press (GtkWidget *widget, GdkEventButton *event, gpointer user_data) { GtkTreePath *path; GtkTreeIter iter; GtkTreeViewColumn *column; gint x,y; gint columnIndex; GtkListStore *list_store = (GtkListStore *) gtk_tre...
false
false
false
false
false
0
knot_energy(v_info) struct qinfo *v_info; { REAL *x = get_coord(v_info->id); REAL energy = 0.0; /* for this vertex */ vertex_id v_id; /* other vertex */ int i; REAL d[MAXCOORD]; /* difference vector between vertices */ REAL rr,p; REAL vcharge = charge_attr >= 0 ? *((REAL*)get_extra(v_info->id,cha...
false
false
false
false
false
0
add_string(const char *src, int len, int *before) { if (len == 0) len = strlen(src); while (len > 0) { put_char(*src++); len--; if (before) add_thousand_sep(before); } }
false
false
false
false
false
0
agentcleanup(struct ChanSess * chansess) { char *path = NULL; uid_t uid; gid_t gid; int len; if (chansess->agentlistener != NULL) { remove_listener(chansess->agentlistener); chansess->agentlistener = NULL; } if (chansess->agentfile != NULL && chansess->agentdir != NULL) { /* Remove the dir as the user....
false
false
false
false
false
0
visit_rooms(int rn) { short i; short oth_rn; rooms_visited[rn] = 1; for (i = 0; i < 4; i++) { oth_rn = rooms[rn].doors[i].oth_room; if ((oth_rn >= 0) && (!rooms_visited[oth_rn])) { visit_rooms(oth_rn); } } }
false
false
false
false
false
0
cards_get_points(GList *list) { GList *l; /* Figure out how many point cards are in the list */ gint point_cards = 0; for (l = list; l; l = l->next) { Card* card = l->data; if (card == NULL) continue; if (card->suit == CARDS_HEARTS || (card->suit == CARDS_SPADES && card->rank == CARD_QUEEN)) poin...
false
false
false
false
false
0
kind_info(char *buf, size_t buf_len, char *dam, size_t dam_len, char *wgt, size_t wgt_len, int *lev, s32b *val, int k) { object_kind *k_ptr; object_type *i_ptr; object_type object_type_body; int i; /* Get local object */ i_ptr = &object_type_body...
false
false
false
false
false
0
ldns_dnssec_name_node_next_nonglue(ldns_rbnode_t *node) { ldns_rbnode_t *next_node = NULL; ldns_dnssec_name *next_name = NULL; bool done = false; if (node == LDNS_RBTREE_NULL) { return NULL; } next_node = node; while (!done) { if (next_node == LDNS_RBTREE_NULL) { return NULL; } else { next_name = (l...
false
false
false
false
false
0
libspamc_log (int flags, int level, char *msg, ...) { va_list ap; char buf[LOG_BUFSIZ+1]; int len = 0; va_start(ap, msg); if ((flags & SPAMC_LOG_TO_STDERR) != 0) { /* create a log-line buffer */ len = snprintf(buf, LOG_BUFSIZ, "spamc: "); len += vsnprintf(buf+len, LOG_BUFSI...
false
false
false
false
false
0
gt_reads2twobit_seek_sequence(const GtReads2Twobit *r2t, unsigned long seqnum, unsigned long *seqlen, GtTwobitencoding *firstcode, unsigned long *charsinfirstcode, GtTwobitencoding **nextcode_ptr) { unsigned long pos; *seqlen = r2t->seqlen_eqlen; if (*seqlen == 0) { if (seqnum == 0) { *seq...
false
false
false
false
false
0
cb_del_btn_clicked(GtkButton *button, gpointer data) { GtkTreeIter iter; GtkTreeModel *model; GtkTreeSelection *selection; ItemPerson *item; AddressDataSource *ds; GList *list; GList *ref_list; GList *walk; GtkTreeRowReference *ref; AlertValue aval; GtkTreeSelection *sel; gchar *email; selection = gtk_tre...
false
false
false
false
false
0
AnatomicalOrientationAcronym(void) const { int i; for(i=0; i<m_NDims; i++) { m_OrientationAcronym[i] = MET_OrientationTypeName[m_AnatomicalOrientation[i]][0]; } m_OrientationAcronym[i] = '\0'; return m_OrientationAcronym; }
false
false
false
false
false
0
gf_odf_get_field_type(GF_Descriptor *desc, char *fieldName) { switch (desc->tag) { case GF_ODF_IOD_TAG: case GF_ODF_OD_TAG: if (!stricmp(fieldName, "esDescr")) return GF_ODF_FT_OD_LIST; else if (!stricmp(fieldName, "ociDescr")) return GF_ODF_FT_OD_LIST; else if (!stricmp(fieldName, "ipmpDescrPtr")) return GF_O...
false
false
false
false
false
0
__idbm_print_all_by_drec(void *data, struct discovery_rec *drec) { int info_level = *(int *)data; if (info_level >= 1) { printf("DiscoveryAddress: %s,%d\n", drec->address, drec->port); idbm_print_discovered(drec, info_level); } else printf("%s:%d via %s\n", drec->address, drec->port, drec->t...
false
false
false
false
false
0
do_queue_select(struct adapter *padapter, struct pkt_attrib *pattrib) { u8 qsel; qsel = pattrib->priority; RT_TRACE(_module_rtl871x_xmit_c_, _drv_info_, ("### do_queue_select priority=%d , qsel = %d\n", pattrib->priority , qsel)); pattrib->qsel = qsel; }
false
false
false
false
false
0
renderPrintf(int x, int y, char* format, ...) { char tmp[256] = ""; va_list args; // format the text va_start(args, format); vsprintf(tmp, format, args); va_end(args); renderString(x, y, tmp); }
false
false
false
false
false
0
parse_float_vector(const gchar *value, guint n, ...) { va_list ap; gchar *end; guint i; va_start(ap, n); for (i = 0; i < n; i++) { gdouble *d = va_arg(ap, gdouble*); *d = g_ascii_strtod(value, &end); if (end == value || gwy_isnan(*d) |...
false
false
false
false
false
0
P_Add_Callbacks (Object w, Object name, Object cbl) { register char *s; register int n; XtCallbackList callbacks; Alloca_Begin; Check_Widget (w); Check_Callback_List (cbl); s = Get_Strsym (name); Make_Resource_Name (s); n = Fast_Length (cbl); Alloca (callbacks, XtCallbackRec*, (...
false
false
false
false
false
0
dwarf2out_do_cfi_startproc (bool second) { int enc; rtx ref; rtx personality = get_personality_function (current_function_decl); fprintf (asm_out_file, "\t.cfi_startproc\n"); if (personality) { enc = ASM_PREFERRED_EH_DATA_FORMAT (/*code=*/2, /*global=*/1); ref = personality; /* ??? Th...
false
false
false
false
false
0
set_temp_max(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { struct adm1031_data *data = dev_get_drvdata(dev); struct i2c_client *client = data->client; int nr = to_sensor_dev_attr(attr)->index; long val; int ret; ret = kstrtol(buf, 10, &val); if (ret) return ret; ...
false
false
false
false
false
0
glibtop_get_mountlist_s(glibtop *server, glibtop_mountlist *buf, int all_fs) { const struct mntent *mnt; FILE *fp; GArray* entries; IgnoreList* ig = NULL; glibtop_init_r(&server, 0, 0); memset(buf, 0, sizeof(glibtop_mountlist)); /* wild guess, preallocate 8 entries on a desktop, almost everyone has...
false
false
false
false
false
0
setTextInternal(DOM::DOMStringImpl *text) { if (m_firstLetter) { m_firstLetter->detach(); m_firstLetter = 0; } RenderText::setTextInternal(text); }
false
false
false
false
false
0
sisusb_free_outbuf(struct sisusb_usb_data *sisusb, int index) { if ((index >= 0) && (index < sisusb->numobufs)) sisusb->urbstatus[index] &= ~SU_URB_ALLOC; }
false
false
false
false
false
0
ImpliedPanning(const MediaAudioChannelDef& inDef) { tVal retVal; t4Val vecToSound = m_listenerPost.AngPos().Conjugate().RotatedVector(inDef.Position() - m_listenerPost.Pos()); tVal distToSound = vecToSound.Magnitude(); if (distToSound < 0.1) { retVal = 0.0; } else { ...
false
false
false
false
false
0
is_mdatabit(int32 c) { switch ((byte) c) { case 'z': case 'Z': case 'x': case 'X': case '?': case '0': case '1': break; default: return(FALSE); } return(TRUE); }
false
false
false
false
false
0
io_stdfile(lua_State *L, ptrdiff_t id) { IOFileUD *iof = IOSTDF_IOF(L, id); if (iof->fp == NULL) lj_err_caller(L, LJ_ERR_IOSTDCL); return iof->fp; }
false
false
false
false
false
0
dsp_pm_5(void) { Uint32 memspace, numreg, value, xy_addr, retour; /* 01dd 0ddd w0aa aaaa x:aa,D S,x:aa 01dd 0ddd w1mm mrrr x:ea,D S,x:ea #xxxxxx,D 01dd 1ddd w0aa aaaa y:aa,D S,y:aa 01dd 1ddd w1mm mrrr y:ea,D S,y:ea #xxxxxx,D */ value = (cur_inst>>8) & BITMASK(6); if (cur_ins...
false
false
false
false
false
0
getValue(char const * const & arg, char const * vptr) { if (vptr) { // ------------------------------------- eat leading garbage --- if (*vptr == '=') ++vptr; while (ASCII::isSpaceOrTab(*vptr)) ++vptr; } else { // ------------------------- value assumed in the...
false
false
false
false
false
0
max8907_rtc_read_time(struct device *dev, struct rtc_time *tm) { struct max8907_rtc *rtc = dev_get_drvdata(dev); u8 regs[TIME_NUM]; int ret; ret = regmap_bulk_read(rtc->regmap, MAX8907_REG_RTC_SEC, regs, TIME_NUM); if (ret < 0) return ret; regs_to_tm(regs, tm); return 0; }
false
false
false
false
false
0
brcmf_fws_hdrpull(struct brcmf_if *ifp, s16 siglen, struct sk_buff *skb) { struct brcmf_skb_reorder_data *rd; struct brcmf_fws_info *fws = ifp->drvr->fws; u8 *signal_data; s16 data_len; u8 type; u8 len; u8 *data; s32 status; s32 err; brcmf_dbg(HDRS, "enter: ifidx %d, skblen %u, sig %d\n", ifp->ifidx, skb...
false
false
false
false
false
0
rotateBy(double radians) { pointHash.clear(); // Moves relative to storedPointHash QPointF pt = getQtPoint(CentrePoint, true); setPoint(CentrePoint, QGLE::rotateAboutPoint(pt, radians, basePoint)); pt = getQtPoint(StartPoint, true); setPoint(StartPoint, QGLE::rotateAboutPoint(pt, radians, basePoint)); pt = get...
false
false
false
false
false
0
expandKekulize(OBMol *mol, int bond_idx, std::vector<int> &atomState, std::vector<int> &bondState, Timeout &timeout) { // Check for timeout first if (time(NULL) - timeout.startTime > timeout.maxTime) { // Only issue the error once, not for each recurison ...
false
false
false
false
false
0
getBestSizeScaled(double hei) { for (int i = 0; i < getNbFonts(); i++) { double size_i = getFontSize(i); if (size_i >= hei) { return i; } } return getNbFonts()-1; }
false
false
false
false
false
0
em2800_i2c_send_bytes(struct em28xx *dev, u8 addr, u8 *buf, u16 len) { unsigned long timeout = jiffies + msecs_to_jiffies(EM28XX_I2C_XFER_TIMEOUT); int ret; u8 b2[6]; if (len < 1 || len > 4) return -EOPNOTSUPP; BUG_ON(len < 1 || len > 4); b2[5] = 0x80 + len - 1; b2[4] = addr; b2[3] = buf[0]; if (len > 1) ...
false
false
false
false
false
0
gst_identity_sink_event (GstBaseTransform * trans, GstEvent * event) { GstIdentity *identity; gboolean ret = TRUE; identity = GST_IDENTITY (trans); if (!identity->silent) { const GstStructure *s; const gchar *tstr; gchar *sstr; GST_OBJECT_LOCK (identity); g_free (identity->last_message); ...
false
false
false
false
false
0
midgard_param_longtext_get_type(void) { static GType type = 0; if (type == 0) { { const GParamSpecTypeInfo pspec_info = { sizeof (MidgardParamSpecLongtext), /* instance_size */ 16, /* n_preallocs */ _param_string_init, /* instance_init */ MGD_TYPE_LONGT...
false
false
false
false
false
0
Close() { if( m_ModeSocket ) { m_socket->Close(); m_socket.reset(); m_ModeSocket = 0; } }
false
false
false
false
false
0
_findReplace(UT_uint32* pPrefix, bool& bDoneEntireDocument, bool bNoUpdate) { UT_ASSERT(m_sFind && m_sReplace); bool bRes = false; _saveAndNotifyPieceTableChange(); m_pDoc->beginUserAtomicGlob(); // Replace selection if it's due to a find operation if (m_doneFind && !isSelectionEmpty()) { bRes = true; PP...
false
false
false
false
false
0
so_line_view_set_bounds (SheetObjectView *sov, double const *coords, gboolean visible) { GocItem *view = GOC_ITEM (sov), *item = GOC_ITEM (GOC_GROUP (view)->children->data); SheetObject *so = sheet_object_view_get_so (sov); GOStyleLine const *style = &GNM_SO_LINE (so)->style->line; double scale = goc_canvas_get_pix...
false
false
false
false
false
0
Fd_Add_Dependency(WamWord *fdv_adr, int chain_nb, WamWord *CF) { WamWord **chain_adr; if (Fd_Variable_Is_Ground(fdv_adr)) return; Trail_Chains_If_Necessary(fdv_adr); Chains_Mask(fdv_adr) |= (1 << chain_nb); chain_adr = (WamWord **) (&Chain_Min(fdv_adr) + chain_nb); CF_Pointer(CS) = CF; Next_Chain...
false
false
false
false
false
0
docrit(v) vari *v; { double df, al; INT i; df = 0; al = 0.05; i = getarg(v,"df",1); if (i>0) sscanf(argval(v,i),"%lf",&df); i = getarg(v,"al",1); if (i>0) sscanf(argval(v,i),"%lf",&al); return(critval(lf.kap,lf.nk,lf.mi[MDIM],al,10,2,df)); }
false
false
false
false
false
0
cal_client_finalize (GObject *object) { ECalClientPrivate *priv; priv = E_CAL_CLIENT_GET_PRIVATE (object); if (priv->name_watcher_id > 0) g_bus_unwatch_name (priv->name_watcher_id); if (priv->default_zone && priv->default_zone != icaltimezone_get_utc_timezone ()) icaltimezone_free (priv->default_zone, 1); ...
false
false
false
false
false
0
dvb_frontend_is_exiting(struct dvb_frontend *fe) { struct dvb_frontend_private *fepriv = fe->frontend_priv; if (fe->exit != DVB_FE_NO_EXIT) return 1; if (fepriv->dvbdev->writers == 1) if (time_after_eq(jiffies, fepriv->release_jiffies + dvb_shutdown_timeout * HZ)) return 1; return 0; }
false
false
false
false
false
0
vis_window_split(EditorWin *win) { if (!editor_window_split(win)) return false; Syntax *s = window_syntax_get(vis->win->win); if (s) settings_apply(s->settings); return true; }
false
false
false
false
false
0
getHorizontalTextExtent() const { if (!d_formatValid) updateFormatting(); return d_formattedRenderedString ? d_formattedRenderedString->getHorizontalExtent() : 0.0f; }
false
false
false
false
false
0
find_bits (int n, int *lowest, int *n_set) { int i; *n_set = 0; for (i = 31; i >= 0; i--) if (n & (1 << i)) { *lowest = i; (*n_set)++; } }
false
false
false
false
false
0
read_json_value(std::istream &s) { // Peek a character - this tells us what type we're looking at. // All the JSON primitives differ in their first character. char c; c = s.peek(); check_stream(s); if(c == 'n') { read_string(s, "null"); return new json::Null(); } else if(c == 't') { read_string(s, "tru...
false
false
false
false
false
0
add_parent(struct strbuf *sb, const unsigned char *sha1) { struct object *obj = parse_object(sha1); const char *parent = sha1_to_hex(sha1); const char *cp; if (!obj) die("Unable to find commit parent %s", parent); if (obj->type != OBJ_COMMIT) die("Parent %s isn't a proper commit", parent); for (cp = sb->buf...
false
false
false
false
false
0
pk_engine_emit_changed (PkEngine *engine) { g_return_if_fail (PK_IS_ENGINE (engine)); g_debug ("emitting changed"); g_dbus_connection_emit_signal (engine->priv->connection, NULL, PK_DBUS_PATH, PK_DBUS_INTERFACE, "Changed", NULL, NULL); }
false
false
false
false
false
0
snd_hdac_refresh_widgets(struct hdac_device *codec) { hda_nid_t start_nid; int nums; nums = snd_hdac_get_sub_nodes(codec, codec->afg, &start_nid); if (!start_nid || nums <= 0 || nums >= 0xff) { dev_err(&codec->dev, "cannot read sub nodes for FG 0x%02x\n", codec->afg); return -EINVAL; } codec->num_nodes =...
false
false
false
false
false
0
no_bus_server_filter (DBusConnection *connection, DBusMessage *message, void *user_data) { ServerData *sd = user_data; if (dbus_message_is_signal (message, DBUS_INTERFACE_LOCAL, "Disco...
false
false
false
false
false
0
_PyLong_New(Py_ssize_t size) { if (size > (Py_ssize_t)MAX_LONG_DIGITS) { PyErr_SetString(PyExc_OverflowError, "too many digits in integer"); return NULL; } /* coverity[ampersand_in_size] */ /* XXX(nnorwitz): PyObject_NEW_VAR / _PyObject_VAR_SIZE need to detect ...
false
false
false
false
false
0
__ecereInstMeth___ecereNameSpace__ecere__gui__controls__EditBox_OnActivate__00000000(struct __ecereNameSpace__ecere__com__Instance * this, unsigned int active, struct __ecereNameSpace__ecere__com__Instance * previous, unsigned int * goOnWithActivation, unsigned int direct) { struct __ecereNameSpace__ecere__gui__control...
false
false
false
false
false
0
maki_server_away (gpointer data) { makiServer* serv = data; GHashTableIter iter; gpointer key, value; g_mutex_lock(serv->mutex.server); g_hash_table_iter_init(&iter, serv->channels); while (g_hash_table_iter_next(&iter, &key, &value)) { gchar const* chan_name = key; makiChannel* chan = value; if (maki_...
false
false
false
false
false
0
init_children_processes(void) { int start_seq = 1, lpc = 0; static int max = SIZEOF(pcmk_children); /* start any children that have not been detected */ for (start_seq = 1; start_seq < max; start_seq++) { /* dont start anything with start_seq < 1 */ for (lpc = 0; lpc < max; lpc++) { ...
false
false
false
false
false
0
gt_pch_pa_regno_reg_rtx (ATTRIBUTE_UNUSED void *this_obj, ATTRIBUTE_UNUSED void *x_p, ATTRIBUTE_UNUSED gt_pointer_operator op, ATTRIBUTE_UNUSED void * cookie) { if (regno_reg_rtx != NULL) { size_t i0; for (i0 = 0; i0 != (size_t)(crtl->emit.x_reg_rtx_no) && ((void *)regno_reg_rtx == this_obj)...
false
false
false
false
false
0
pm_qos_get_value(struct pm_qos_constraints *c) { struct plist_node *node; int total_value = 0; if (plist_head_empty(&c->list)) return c->no_constraint_value; switch (c->type) { case PM_QOS_MIN: return plist_first(&c->list)->prio; case PM_QOS_MAX: return plist_last(&c->list)->prio; case PM_QOS_SUM: pl...
false
false
false
false
false
0
Itcl_CreateMemberFunc(interp, cdefn, name, arglist, body, mfuncPtr) Tcl_Interp* interp; /* interpreter managing this action */ ItclClass *cdefn; /* class definition */ CONST char* name; /* name of new member */ CONST char* arglist; /* space-separated list o...
false
false
false
false
false
0
HandlePhysicalAddressChanged(uint16_t iNewAddress) { m_libcec->AddLog(CEC_LOG_NOTICE, "physical address changed to %04x", iNewAddress); CCECClient* client = GetPrimaryClient(); if (client) client->SetPhysicalAddress(iNewAddress); }
false
false
false
false
false
0
Protocol_BTSCANDEV(PROTO_PARMS) { btscan_network *bt = (btscan_network *) data; ostringstream osstr; cache->Filled(field_vec->size()); for (unsigned int x = 0; x < field_vec->size(); x++) { unsigned int fnum = (*field_vec)[x]; if (fnum >= BTSCANDEV_maxfield) { out_string = "Unknown field requested."; r...
false
false
false
false
false
0
BTDM_Legacy(struct rtw_adapter *padapter) { struct mlme_ext_priv *pmlmeext; u8 isLegacy = false; pmlmeext = &padapter->mlmeextpriv; if ((pmlmeext->cur_wireless_mode == WIRELESS_11B) || (pmlmeext->cur_wireless_mode == WIRELESS_11G) || (pmlmeext->cur_wireless_mode == WIRELESS_11BG)) isLegacy = true; return i...
false
false
false
false
false
0
validate(string) char *string; { int index, count; if (string == NULL) { return (FALSE); } /* CHECK IF THE SUPPLIED STRING IS A VALID INTEGER */ count = strlen(string); /* LOOP OVER THE WHOLE STRING MAKING SURE THAT EACH CHARACTER IS EITHER * A DIGIT OR A MINUS SIG...
false
false
false
false
false
0
try_to_switch_users(void) { static time_t last_try = 0; time_t now = time(NULL); char *users, *p; if (getuid() && geteuid()) { rfbLog("try_to_switch_users: not root\n"); started_as_root = 2; return; } if (!last_try) { last_try = now; } else if (now <= last_try + 2) { /* try every 3 secs or so */ ret...
false
false
false
false
false
0
run_func(ObActionsData *data, gpointer options) { Options *o = options; if (!o->interactive) end_cycle(FALSE, data->state, o); else { struct _ObClient *ft; ft = focus_directional_cycle(o->direction, o->dock_windows, ...
false
false
false
false
false
0
usdhi6_cmd_flags(struct usdhi6_host *host) { struct mmc_request *mrq = host->mrq; struct mmc_command *cmd = mrq->cmd; u16 opc = cmd->opcode; if (host->app_cmd) { host->app_cmd = false; opc |= USDHI6_SD_CMD_APP; } if (mrq->data) { opc |= USDHI6_SD_CMD_DATA; if (mrq->data->flags & MMC_DATA_READ) opc |...
false
false
false
false
false
0
mem_free(void *mem) /*====================================================================== ? Free memory given by argument, and unlink it from alloction list. | Currently FREEMEM(ptr) is defined to be mem_free(ptr). | & free() ~ mem_alloc(), mem_free_all() ^========================================================...
false
false
false
false
false
0
rights(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_bstream_t *bs) { aim_tlvlist_t *tlvlist; aim_rxcallback_t userfunc; int ret = 0; fu16_t maxsiglen = 0; tlvlist = aim_readtlvchain(bs); if (aim_gettlv(tlvlist, 0x0001, 1)) maxsiglen = aim_gettlv16(tlvlist, 0x0001, 1); i...
false
false
false
false
false
0
decode_longhaul(struct cpudata *cpu) { union msr_longhaul longhaul; if (read_msr(cpu->number, 0x110A, &longhaul.val) == 1) { dumpmsr (cpu->number, 0x110A, 64); if (longhaul.bits.RevisionID & 1) printf ("\tSoftVID support\n"); if (longhaul.bits.RevisionID & 2) printf ("\tSoftBSEL support\n"); if (longh...
false
false
false
false
false
0
addSectionLabel(DIE &Die, dwarf::Attribute Attribute, const MCSymbol *Label, const MCSymbol *Sec) { if (Asm->MAI->doesDwarfUseRelocationsAcrossSections()) return addLabel(Die, Attribute, DD->getDwarfVersion() >= 4 ? dwarf::DW_FORM_sec_offset ...
false
false
false
false
false
0
__intensity_to_led_brightness( struct v4l2_ctrl *ctrl, s32 intensity) { intensity -= ctrl->minimum; intensity /= (u32) ctrl->step; /* * Indicator LEDs, unlike torch LEDs, are turned on/off basing on * the state of V4L2_CID_FLASH_INDICATOR_INTENSITY control only. * Therefore it must be possible to set it ...
false
false
false
false
false
0
renderPixmap() { Display *disp = FbTk::App::instance()->display(); FbPixmap pixmap(RootWindow(disp, control.screenNumber()), width, height, control.depth()); if (pixmap.drawable() == None) { _FB_USES_NLS; cerr << "FbTk::TextureRender::renderPixmap(): " << _F...
false
false
false
false
false
0
enterEvent( QEvent* /* e */ ) { if ( m_enabled ) { if ( !m_hover.isNull() ) setPixmap( m_hover ); else setPixmap( m_normal ); emit urlHovered( m_url ); } }
false
false
false
false
false
0
set_srid(double d_srid) { if ( d_srid >= 0 ) d_srid+=0.1; else d_srid-=0.1; srid=(int)(d_srid+0.1); }
false
false
false
false
false
0
GetExtension(const std::string & filename) { std::string fileExt( itksys::SystemTools::GetFilenameLastExtension(filename) ); //If the last extension is .gz, then need to pull off 2 extensions. //.gz is the only valid compression extension. if ( fileExt == std::string(".gz") ) { fileExt = itksys::...
false
false
false
false
false
0
insn_variable_length_p (rtx insn ATTRIBUTE_UNUSED) { switch (recog_memoized (insn)) { case 76: case 75: case 74: return 1; case -1: if (GET_CODE (PATTERN (insn)) != ASM_INPUT && asm_noperands (PATTERN (insn)) < 0) fatal_insn_not_found (insn); default: retur...
false
false
false
false
false
0
slowlogPushEntryIfNeeded(robj **argv, int argc, long long duration) { if (server.slowlog_log_slower_than < 0) return; /* Slowlog disabled */ if (duration >= server.slowlog_log_slower_than) listAddNodeHead(server.slowlog,slowlogCreateEntry(argv,argc,duration)); /* Remove old entries if needed. */ ...
false
false
false
false
false
0
on_console_button_3_press(G_GNUC_UNUSED GtkWidget *widget, GdkEventButton *event, GtkMenu *menu) { if (event->button == 3) { gtk_menu_popup(menu, NULL, NULL, NULL, NULL, event->button, event->time); return TRUE; } return FALSE; }
false
false
false
false
false
0
adopt_paths (vector pathvec, struct multipath * mpp) { int i; struct path * pp; if (!mpp) return 0; if (update_mpp_paths(mpp, pathvec)) return 1; vector_foreach_slot (pathvec, pp, i) { if (!strncmp(mpp->wwid, pp->wwid, WWID_SIZE)) { condlog(3, "%s: ownership set to %s", pp->dev, mpp->alias); pp-...
false
false
false
false
false
0
yy_Entity() { int yypos0= yypos, yythunkpos0= yythunkpos; yyprintf((stderr, "%s\n", "Entity")); { int yypos331= yypos, yythunkpos331= yythunkpos; if (!yy_HexEntity()) goto l332; goto l331; l332:; yypos= yypos331; yythunkpos= yythunkpos331; if (!yy_DecEntity()) goto l333; goto l331; l333:; yypos= yypos...
false
false
false
false
false
0
reduce(void) { int i; for (;;) { /* keep looping until there is nothing left to reduce */ switch (parser_state_tos->p_stack[parser_state_tos->tos]) { case stmt: switch (parser_state_tos->p_stack[parser_state_tos->tos - 1]) { ...
false
false
false
false
false
0
load_metadata_cb (gpointer file) { char *uri = (char *)file; char **missing_plugins; char **plugin_descriptions; GError *error = NULL; RBMetaDataField f; if (strncmp (uri, "file://", 7)) { if (uri[0] == '/') { uri = g_filename_to_uri (uri, NULL, NULL); } else { char buf[1024]; if (getcwd (buf, sizeo...
true
true
false
false
false
1
gst_pnmdec_chain_raw (GstPnmdec * s, GstPad * src, GstBuffer * buf) { GstFlowReturn r = GST_FLOW_OK; GstBuffer *out; /* If we got the whole image, just push the buffer. */ if (GST_BUFFER_SIZE (buf) == s->size) { memset (&s->mngr, 0, sizeof (GstPnmInfoMngr)); s->size = 0; gst_buffer_set_caps (buf, G...
false
false
false
false
false
0
refers_to_mem_for_reload_p (x) rtx x; { const char *fmt; int i; if (GET_CODE (x) == MEM) return 1; if (GET_CODE (x) == REG) return (REGNO (x) >= FIRST_PSEUDO_REGISTER && reg_equiv_memory_loc[REGNO (x)]); fmt = GET_RTX_FORMAT (GET_CODE (x)); for (i = GET_RTX_LENGTH (GET_CODE (x)) - 1; i ...
false
false
false
false
false
0
ck_session_get_idle_since_hint (CkSession *session, char **iso8601_datetime, GError **error) { char *date_str; g_return_val_if_fail (CK_IS_SESSION (session), FALSE); date_str = NULL; if (session->priv->idle_hint) { ...
false
false
false
false
false
0
putInfoAll( GtkWidget *Wins, gpointer data ) { if(iinsert != 0) { reset_name_files(); ClearText(text); } else { GetLink1(); } data_modify(TRUE); GetInfoLink(); if(TestButtonActive(CheckButtons[4]) ) gabedit_text_insert (GABEDIT_TEXT(text), NULL, NULL, NULL,"#P ",-1); else gabedit_text_insert (GABEDIT...
false
false
false
false
false
0
pkix_pl_CertBasicConstraints_Equals( PKIX_PL_Object *firstObject, PKIX_PL_Object *secondObject, PKIX_Boolean *pResult, void *plContext) { PKIX_PL_CertBasicConstraints *firstCBC = NULL; PKIX_PL_CertBasicConstraints *secondCBC = NULL; PKIX_UInt32 secondType; ...
false
false
false
false
false
0
AllowDenyCmd(Server *servPtr, Tcl_Interp *interp, int argc, char **argv, int allow, int user) { Perm *permPtr; Ns_DString base; char *method, *url, *key; int flags, new; if (argc != 5 && argc != 6) { Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0], " cmd ?-noinherit? method url...
false
false
false
false
false
0
bfd_elf_lookup_section_flags (struct bfd_link_info *info, struct flag_info *flaginfo, asection *section) { const bfd_vma sh_flags = elf_section_flags (section); if (!flaginfo->flags_initialized) { bfd *obfd = info->output_bfd; const struct elf_backend_data *bed = get_elf_backend_d...
false
false
false
false
false
0
sieveSmall(unsigned char *array, unsigned size) { unsigned i; /* Loop index */ unsigned p; /* The current prime */ /* Initialize to all 1s */ memset(array, 0xFF, size); #if SMALLSTART == 1 /* Mark 1 as NOT prime */ array[0] = 0xfe; i = 1; /* Index of first prime */ #else i = 0; /* Index of first prime */ #e...
false
false
false
false
false
0
pp_c_attributes_display (c_pretty_printer *pp, tree a) { bool is_first = true; if (a == NULL_TREE) return; for (; a != NULL_TREE; a = TREE_CHAIN (a)) { const struct attribute_spec *as; as = lookup_attribute_spec (TREE_PURPOSE (a)); if (!as || as->affects_type_identity == false) ...
false
false
false
false
false
0
eina_array_iterator_new(const Eina_Array *array) { Eina_Iterator_Array *it; EINA_SAFETY_ON_NULL_RETURN_VAL(array, NULL); EINA_MAGIC_CHECK_ARRAY(array); eina_error_set(0); it = calloc(1, sizeof (Eina_Iterator_Array)); if (!it) { eina_error_set(EINA_ERROR_OUT_OF_MEMORY); return NU...
false
false
false
false
false
0
visitIVCast(CastInst *Cast, WideIVInfo &WI, ScalarEvolution *SE, const TargetTransformInfo *TTI) { bool IsSigned = Cast->getOpcode() == Instruction::SExt; if (!IsSigned && Cast->getOpcode() != Instruction::ZExt) return; Type *Ty = Cast->getType(); uint64_t Width = SE->getTypeSizeInB...
false
false
false
false
false
0