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
update_file_date_info(FStream & f) { RET_ON_ERR(update_file_info(f)); cur_file_date = get_modification_time(f); return no_err; }
false
false
false
false
false
0
cli_print_volume_status_call_stack (dict_t *dict, char *prefix) { int ret = -1; char key[1024] = {0,}; int uid = 0; int gid = 0; int pid = 0; uint64_t unique = 0; //char *op = NULL; ...
false
false
false
false
false
0
configstrlist(void *opt, char *cmd, char *arg1, char *arg2, int rc) { Strlist **list = (Strlist **)opt; Strlist *lp = NULL; char *t; if (rc == 0) { shortwarn(cmd, arg1, rc); return; } if (rc == -1) /* have to be careful because can't strtok a const string */ t = arg1; else if ((t = strtok(ar...
false
false
false
false
false
0
wacom_handle_coordinates_response(struct wacom *wacom) { int r; dev_dbg(&wacom->dev->dev, "Coordinates string: %s\n", wacom->data); r = sscanf(wacom->data, "~C%u,%u", &wacom->max_x, &wacom->max_y); if (r != 2) dev_warn(&wacom->dev->dev, "could not get max coordinates\n"); }
false
false
false
false
false
0
getClientId(Window leader) { /// !!! fix if (!prop.sm_client_id) return null; union { char *ptr; unsigned char *xptr; } cid = { 0 }; Atom r_type; int r_format; unsigned long count; unsigned long bytes_remain; if (XGetWindowProperty(xapp->display(), ...
false
false
false
true
false
1
GenerateTypeDependencies(Oid typeNamespace, Oid typeObjectId, Oid relationOid, /* only for 'c'atalog types */ char relationKind, /* ditto */ Oid owner, Oid inputProcedure, Oid outputProcedure, Oid receiveProcedure, Oid sendProcedure, Oid analyzeProcedure,...
false
false
false
false
false
0
compareTo(const LineSegment& other) const { int comp0=p0.compareTo(other.p0); if (comp0!=0) return comp0; return p1.compareTo(other.p1); }
false
false
false
false
false
0
get_server_source_address(struct in_addr *from, struct option_state *options, struct packet *packet) { unsigned option_num; struct option_cache *oc; struct data_string d; struct in_addr *a; memset(&d, 0, sizeof(d)); option_num = DHO_DHCP_SERVER_IDENTIFIER; oc = lookup_option(&dhcp_unive...
false
true
false
false
false
1
is_conflict_marker(const char *line, unsigned long len) { char firstchar; int cnt; if (len < 8) return 0; firstchar = line[0]; switch (firstchar) { case '=': case '>': case '<': break; default: return 0; } for (cnt = 1; cnt < 7; cnt++) if (line[cnt] != firstchar) return 0; /* line[0] thru line[6] ...
false
false
false
false
false
0
sec_asn1e_allocate_item (PLArenaPool *poolp, SECItem *dest, unsigned long len) { if (poolp != NULL) { void *release; release = PORT_ArenaMark (poolp); if (dest == NULL) dest = (SECItem*)PORT_ArenaAlloc (poolp, sizeof(SECItem)); if (dest != NULL) { dest->data = (unsigned char*)PORT_ArenaAlloc (poolp, ...
false
false
false
false
false
0
tpg_write(void) { int s; unsigned char header_bytes[] = { 0xFF, 0xFF, 0x01, 0x00, 0x0D, 0x00, 0x43, 0x54, 0x6F, 0x70, 0x6F, 0x57, 0x61, 0x79, 0x70, 0x6F, 0x69, 0x6E, 0x74 }; s...
false
false
false
false
false
0
setValue(QString node, QVariant value) { QString key, subnode; if (getKeyRest(node, key, subnode)) { //not this tier Q_ASSERT(isValidNodeName(key)); if (!trees_.contains(key)) { if (values_.contains(key)) { qWarning(qPrintable(QString("Error: Trying to add option node %1 but it already exists as a v...
false
false
false
false
false
0
gsql_session_class_init (GSQLSessionClass *klass) { GSQL_TRACE_FUNC; GObjectClass *obj_class = G_OBJECT_CLASS (klass); GtkObjectClass *gtkobject_class = GTK_OBJECT_CLASS (klass); GtkContainerClass *container_class = GTK_CONTAINER_CLASS (klass); GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass); parent_cl...
false
false
false
false
false
0
comment_view_button_released (GocItem *item, int button, double x, double y) { SheetObject *so; int ix, iy; if (button != 1) return FALSE; gnm_canvas_get_screen_position (item->canvas, x, y, &ix, &iy); so = sheet_object_view_get_so (SHEET_OBJECT_VIEW (item)); scg_comment_display (GNM_PANE (item->canvas)->simp...
false
false
false
false
false
0
game_call_rule_handler(const char *name, int params) { lua_pushliteral(L, "rules_call"); // arg* 'rules_call' lua_rawget(L, LUA_GLOBALSINDEX); // arg* rules_call lua_insert(L, -1 - params); // rules_call arg* lua_pushstring(L, name); // rules_call arg* name lua_insert(L, -1 ...
false
false
false
false
false
0
pipe_fork (int pipefds[2], size_t tries) { #if HAVE_WORKING_FORK struct tempnode *saved_temphead; int saved_errno; double wait_retry = 0.25; pid_t pid IF_LINT ( = -1); struct cs_status cs; if (pipe (pipefds) < 0) return -1; /* At least NMERGE + 1 subprocesses are needed. More could be created, but ...
false
false
false
false
false
0
delpool(reg Sfpool_t * p) #else static int delpool(p) reg Sfpool_t *p; #endif { POOLMTXSTART(p); if (p->s_sf && p->sf != p->array) free((Void_t *) p->sf); p->mode = SF_AVAIL; POOLMTXRETURN(p, 0); }
false
false
false
false
false
0
sync2disk(int n) { if (fork() == 0) { // be nice if (nice(n) == -1) perror("couldn't nice rsync process"); printf(" - child (rsync): syncing db file to disk...\n"); execlp("rsync", "rsync", "-a", DB_RAM, DB_DISK, NULL); _exit(0); } }
false
false
false
false
false
0
TrLinkChildNode ( ACPI_PARSE_OBJECT *Op1, ACPI_PARSE_OBJECT *Op2) { ACPI_PARSE_OBJECT *Next; DbgPrint (ASL_PARSE_OUTPUT, "\nLinkChildNode: Parent=%p (%s), Child=%p (%s)\n\n", Op1, Op1 ? UtGetOpName(Op1->Asl.ParseOpcode): NULL, Op2, Op2 ? UtGetOpName(Op2->Asl.P...
false
false
false
false
false
0
HandleModPowerRegenPCT(bool /*apply*/, bool Real) { // spells required only Real aura add/remove if (!Real) { return; } if (GetTarget()->GetTypeId() != TYPEID_PLAYER) { return; } // Update manaregen value if (m_modifier.m_miscvalue == POWER_MANA) { ((Player*)GetTarget())->U...
false
false
false
false
false
0
find_visual_by_class_name( const String& name, WindowVisualInfo& info ) { for (VisualTable* v = &visual_classes[0]; v->class_name != nil; v++) { if (name == v->class_name) { XVisualInfo xinfo; xinfo.c_class = v->class_tag; find_visual_by_info(xinfo, VisualClassMask, info); return; } } ...
false
false
false
false
false
0
data_changed_idle (GladeEditorProperty * eprop) { GladeEPropModelData *eprop_data = GLADE_EPROP_MODEL_DATA (eprop); GladeProperty *property = glade_editor_property_get_property (eprop); GNode *data_tree = NULL, *new_tree, *row; GtkTreeIter iter; gint rownum; glade_property_get (property, &data_tree); g_a...
false
false
false
false
false
0
gmenubar_mouse(GGadget *g, GEvent *event) { GMenuBar *mb = (GMenuBar *) g; int which; if ( mb->child!=NULL && mb->child->hidden ) return( true ); if ( event->type == et_mousedown ) { mb->pressed = true; if ( mb->child!=NULL ) GMenuSetPressed(mb->child,true); which = GMenuBarIndex(mb,event->u.m...
false
false
false
false
false
0
oauth2_proxy_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec) { OAuth2ProxyPrivate *priv = ((OAuth2Proxy*)object)->priv; switch (property_id) { case PROP_CLIENT_ID: if (priv->client_id) g_free (priv->client_id); priv->client_id ...
false
false
false
false
false
0
watcher_idle_notice_cb (GSWatcher *watcher, gboolean in_effect, GSMonitor *monitor) { gboolean activation_enabled; gboolean handled; gs_debug ("Idle notice signal detected: %d", in_effect); /* only fade if screensaver can activate */ ...
false
false
false
false
false
0
revmap_get_blkno(BrinRevmap *revmap, BlockNumber heapBlk) { BlockNumber targetblk; /* obtain revmap block number, skip 1 for metapage block */ targetblk = HEAPBLK_TO_REVMAP_BLK(revmap->rm_pagesPerRange, heapBlk) + 1; /* Normal case: the revmap page is already allocated */ if (targetblk <= revmap->rm_lastRevmapPa...
false
false
false
false
false
0
slapi_pw_set_entry_ext(Slapi_Entry *entry, Slapi_Value **vals, int flags) { struct slapi_pw_entry_ext *extp = NULL; if ((-1 == pw_entry_objtype) || (-1 == pw_entry_handle)) { slapi_log_error(SLAPI_LOG_TRACE, NULL, "slapi_pw_set_entry_ext: " "pw_entry_extension is not registered\...
false
false
false
false
false
0
clocks_calc_mult_shift(u32 *mult, u32 *shift, u32 from, u32 to, u32 maxsec) { u64 tmp; u32 sft, sftacc= 32; /* * Calculate the shift factor which is limiting the conversion * range: */ tmp = ((u64)maxsec * from) >> 32; while (tmp) { tmp >>=1; sftacc--; } /* * Find the conversion shift/mult pair whi...
true
true
false
false
false
1
new_section (BusDesktopFile *desktop_file, const char *name) { int n; char *name_copy; if (desktop_file->n_allocated_sections == desktop_file->n_sections) { if (!grow_sections (desktop_file)) return NULL; } name_copy = _dbus_strdup (name); if (name_copy == NULL) ...
false
false
false
false
false
0
deadline_merged_request(struct request_queue *q, struct request *req, int type) { struct deadline_data *dd = q->elevator->elevator_data; /* * if the merge was a front merge, we need to reposition request */ if (type == ELEVATOR_FRONT_MERGE) { elv_rb_del(deadline_rb_root(dd, req), req); deadline_add_...
false
false
false
false
false
0
vsspan(sELEMENT *a, int alen, sELEMENT *b, int blen) { int x; /* should not happen */ if (!b) return (0); for (x = 0; x != alen; ++x) { int z = vsbsearch(b, blen, a[x]); if (z == blen || scmp(b[z], a[x])) break; } return x; }
false
false
false
false
false
0
match_group_member (asection *sec, asection *group, struct bfd_link_info *info) { asection *first = elf_next_in_group (group); asection *s = first; while (s != NULL) { if (bfd_elf_match_symbols_in_sections (s, sec, info)) return s; s = elf_next_in_group (s); if (s == first) break; ...
false
false
false
false
false
0
ikarus_main(int argc, char** argv, char* boot_file){ if(! cpu_has_sse2()){ fprintf(stderr, "Ikarus Scheme cannot run on your computer because\n"); fprintf(stderr, "your CPU does not support the SSE2 instruction set.\n"); fprintf(stderr, "Refer to the Ikarus Scheme User's Guide for the\n"); fprintf(std...
false
false
false
false
false
0
mutex_init (ath_mutex_t *lock, int just_check) { int err = 0; if (just_check) (*ops.mutex_lock) (&check_init_lock); if (*lock == ATH_MUTEX_INITIALIZER || !just_check) err = (*ops.mutex_init) (lock); if (just_check) (*ops.mutex_unlock) (&check_init_lock); return err; }
false
false
false
false
false
0
reduce_to_bit_field_precision (rtx exp, rtx target, tree type) { HOST_WIDE_INT prec = TYPE_PRECISION (type); if (target && GET_MODE (target) != GET_MODE (exp)) target = 0; /* For constant values, reduce using build_int_cst_type. */ if (CONST_INT_P (exp)) { HOST_WIDE_INT value = INTVAL (exp); ...
false
false
false
false
false
0
ajSeqsetGetseqSeqS(const AjPSeqset seq, ajuint i) { ajDebug("ajSeqsetGetseqSeq '%S' %d/%d\n", seq->Name, i, seq->Size); if(i >= seq->Size) return NULL; if(seq->Seq[i]->Seq) return seq->Seq[i]->Seq; return ajStrConstEmpty(); }
false
false
false
false
false
0
xmlparse_SetParamEntityParsing(xmlparseobject *p, PyObject* args) { int flag; if (!PyArg_ParseTuple(args, "i", &flag)) return NULL; flag = XML_SetParamEntityParsing(p->itself, flag); return PyLong_FromLong(flag); }
false
false
false
false
false
0
streaming_init(struct url_t *url,struct download_opts_t *dlopts) { struct stream_t *stream = NULL; switch(dlopts->dl_protocol) { case MMST: stream = mmst_streaming_init(); break; case HTTP: stream = http_streaming_init(); break; case MMSH: stream = mmsh_streaming_init(); break; case FTP: ...
false
false
false
false
false
0
gschem_action_new (const gchar *name, const gchar *label, const gchar *tooltip, const gchar *stock_id, const gchar *multikey_accel) { g_return_val_if_fail (name != NULL, NULL); return...
false
false
false
false
false
0
bios_13_xxxx(struct regs *regs) { if (0x4a <= AH && AH <= 0x4d) { /* * El-torito functions. */ int13_eltorito(regs); } else if (ebda_get(cdemu.active)) { if (DL == ebda_get(cdemu.emulated_drive)) { /* * Emulated drive. */ int13_cdemu(regs); } else if ((DL & 0xe0) == ebda_get(cdemu.emulat...
false
false
false
false
false
0
make_recursive_union(List *tlist, Plan *lefttree, Plan *righttree, int wtParam, List *distinctList, long numGroups) { RecursiveUnion *node = makeNode(RecursiveUnion); Plan *plan = &node->plan; int numCols = list_length(distinctList); cost_recursive_union(plan, lefttree, righttree...
false
false
false
false
false
0
update_toolbar_button() { for( int i = 0; i < m_notebook_toolbar.get_n_pages(); ++i ){ SKELETON::ToolBar* toolbar = get_toolbar( i ); if( toolbar ) toolbar->update_button(); } }
false
false
false
false
false
0
mmo_wr_init(const char* fname) { fout = gbfopen_le(fname, "wb", MYNAME); objects = avltree_init(0, MYNAME); mmobjects = avltree_init(0, MYNAME); category_names = avltree_init(0, MYNAME); mmo_object_id = 0x8000; mmo_obj_ct = 1; /* ObjIcons always present */ mmo_version = 0x12; /* by default we write a...
false
false
false
false
false
0
lagrange_facet_tension_grad(f_info) struct qinfo *f_info; { REAL value = 0.0; int i,ii,m,j,k; REAL det; REAL density,fudge; int dim = web.dimension; struct gauss_lag *gl = &gauss_lagrange[dim][web.gauss2D_order]; MAT2D(mat,MAXCOORD,MAXCOORD); if ( METH_INSTANCE(f_info->method)->flags & USE_DENSITY ) ...
false
false
false
false
false
0
mdio_mux_read(struct mii_bus *bus, int phy_id, int regnum) { struct mdio_mux_child_bus *cb = bus->priv; struct mdio_mux_parent_bus *pb = cb->parent; int r; /* In theory multiple mdio_mux could be stacked, thus creating * more than a single level of nesting. But in practice, * SINGLE_DEPTH_NESTING will cover t...
false
false
false
false
false
0
timblogiw_s_fmt(struct file *file, void *priv, struct v4l2_format *format) { struct video_device *vdev = video_devdata(file); struct timblogiw *lw = video_get_drvdata(vdev); struct timblogiw_fh *fh = priv; struct v4l2_pix_format *pix = &format->fmt.pix; int err; mutex_lock(&lw->lock); err = timblogiw_try_fmt...
false
false
false
false
false
0
calculate_statistics_per_type (device_type dev_type, statistics_type num) { backend_entry *be = first_backend; while (be) { type_entry *type = be->type; while (type) { if (type->type == dev_type) { mfg_entry *mfg = type->mfg; model_entry *model; if (type->desc) { ...
false
false
false
false
false
0
e_table_item_compute_location (ETableItem *eti, gint *x, gint *y, gint *row, gint *col) { /* Save the grabbed row but make sure that we don't get flawed * results because the cursor is grabbed....
false
false
false
false
false
0
Dot( real* v1, real* v2, int k ) { real ret = 0; for( --k; k>=0; --k ) ret += v1[k] * v2[k]; return ret; }
false
false
false
false
false
0
BCMakeSpace(BDFFont *bdf, int gid, int width, int em) { BDFChar *bc; if ( (bc = bdf->glyphs[gid])==NULL ) { BDFMakeGID( bdf,gid ); } else { BCPreserveState(bc); BCFlattenFloat(bc); BCCompressBitmap(bc); free(bc->bitmap); bc->xmin = 0; bc->xmax = 1; bc->ymin = 0; bc->ymax = 1; bc->bytes_per_line =...
false
false
false
false
false
0
P12U_UnicodeConversion(PLArenaPool *arena, SECItem *dest, SECItem *src, PRBool toUnicode, PRBool swapBytes) { unsigned int allocLen; if(!dest || !src) { return SECFailure; } allocLen = ((toUnicode) ? (src->len << 2) : src->len); if(arena) { dest->data = PORT_ArenaZAlloc(arena, allocLen); ...
false
false
false
false
false
0
git_config_set_bool(git_config *cfg, const char *name, int value) { const char *str_value; if (value == 0) str_value = "false"; else str_value = "true"; return git_config_set_string(cfg, name, str_value); }
false
false
false
false
false
0
CreatePyListFromStringVector(const std::vector<std::string> &data) { PyObject* returnlist = PyList_New( data.size() ); if(!returnlist) return 0; for(unsigned int i =0; i<data.size(); ++i) { PyObject *str = PyString_FromString(data[i].c_str()); if (st...
false
false
false
false
false
0
_draw_rotated_shape (GogRenderer *renderer, GOPath const *path, gboolean fill, gboolean stroke, gboolean rotate_bg) { GOStyle const *style; GOPathOptions line_options; double width; g_return_if_fail (GOG_IS_RENDERER (renderer)); g_return_if_fail (renderer->cur_style != NULL); g_return_if_fail (GO_IS_PATH (path))...
false
false
false
false
false
0
callback_new_mask_button (GtkWidget * button, gpointer data) { gint32 layer_ID; NewLayerData *nl_data = NEW_LAYER_DATA (data); PreviewData *p_data = nl_data->preview_data; GimpImageType image_type; IMAGE_CHECK_ACTION(p_data->image_ID, gtk_dialog_response (GTK_DIALOG (dlg), RESPONSE_FATAL), ); switch (gimp...
false
false
false
false
false
0
ChooseFile(const wxString& title, const wxString& defaultFile, const wxString& filter) { wxFileDialog dlg(nullptr, title, wxEmptyString, Manager::Get()->GetMacrosManager()->ReplaceMacros(defaultFile), ...
false
false
false
false
false
0
curses_flush (Driver *drvthis) { PrivateData *p = drvthis->private_data; int c; if ((c = getch()) != ERR) { if (c == 0x0C) { /* ^L restores screen */ curses_restore_screen(drvthis); } ungetch(c); } if (p->drawBorder) curses_wborder(drvthis); wrefresh(p->win); }
false
false
false
false
false
0
DrawWrapMarker(Surface *surface, PRectangle rcPlace, bool isEndMarker, ColourDesired wrapColour) { surface->PenColour(wrapColour); enum { xa = 1 }; // gap before start int w = rcPlace.right - rcPlace.left - xa - 1; bool xStraight = isEndMarker; // x-mirrored symbol for start marker bool yStraight = true...
false
false
false
false
false
0
pdf_measure_text(fz_context *ctx, pdf_font_desc *fontdesc, unsigned char *buf, int len) { pdf_hmtx h; int gid; int i; float x = 0.0; fz_rect acc = fz_empty_rect; fz_rect bbox; for (i = 0; i < len; i++) { gid = pdf_font_cid_to_gid(ctx, fontdesc, buf[i]); h = pdf_lookup_hmtx(ctx, fontdesc, buf[i]); bbox = ...
false
false
false
false
false
0
Save (xmlDocPtr xml) const { // don't save an empty step, note that this might not occur return (GetChildrenNumber ())? gcu::Object::Save (xml): NULL; }
false
false
false
false
false
0
nfs4_xdr_minorversion(const struct nfs4_sequence_args *args) { #if defined(CONFIG_NFS_V4_1) struct nfs4_session *session = args->sa_slot->table->session; if (session) return session->clp->cl_mvops->minor_version; #endif /* CONFIG_NFS_V4_1 */ return 0; }
false
false
false
false
false
0
write_all(FileAccess& fa,const void* buf,size_t l) { for(;l>0;) { ssize_t ll = fa.fa_write(buf,l); if(ll == -1) { if(fa.geterrno() == EINTR) continue; return false; }; buf = (const void*)(((const char*)buf)+ll); l-=ll; } return true; }
false
false
false
false
false
0
process_line (TotemGalleryProgress *self, const gchar *line) { gfloat percent_complete; if (sscanf (line, "%f%% complete", &percent_complete) == 1) { gtk_progress_bar_set_fraction (self->priv->progress_bar, percent_complete / 100.0); return TRUE; } /* Error! */ return FALSE; }
false
false
false
false
false
0
tnLink3 ( tn* one , tn* two , tn* three ) { if (one) one->next = two ; if (three) three->prev = two ; two->prev = one ; two->next = three ; }
false
false
false
false
false
0
gcr_certificate_get_subject_part (GcrCertificate *self, const char *part) { GcrCertificateInfo *info; g_return_val_if_fail (GCR_IS_CERTIFICATE (self), NULL); g_return_val_if_fail (part != NULL, NULL); info = certificate_info_load (self); if (info == NULL) return NULL; return egg_dn_read_part (egg_asn1x_node ...
false
false
false
false
false
0
setup() { do { m_offset = rand() % m_gap; kDebug() << "offset =" << m_offset << " / " << m_gap; } while (!movesAvailable()); m_range = 0; for (int y = m_offset; y < m_sea->size().y; y += m_gap) { int diag = m_sea->size().y - y; if (dia...
false
false
false
false
false
0
HASH_Init(HASH_InitTypeDef* HASH_InitStruct) { /* Check the parameters */ assert_param(IS_HASH_ALGOSELECTION(HASH_InitStruct->HASH_AlgoSelection)); assert_param(IS_HASH_DATATYPE(HASH_InitStruct->HASH_DataType)); assert_param(IS_HASH_ALGOMODE(HASH_InitStruct->HASH_AlgoMode)); /* Configure the Algorit...
false
false
false
false
false
0
CreateLine(char *lines[], int line, const char *format, ...) { /* Guess we need no more than 80 bytes. */ int n, size = 100; char *p; va_list ap; if ((p = malloc(size)) == NULL) { lines[line] = NULL; return; } while (1) { /* Try to print in the allocated space. */ va_start(ap, format); n = vsnprintf(p,...
false
false
false
false
false
0
find_output_by_display (GnomeRRScreen *rr_screen, GsdWacomDevice *device) { gsize n; GSettings *tablet; GVariant *display; const gchar **edid; GnomeRROutput *ret; if (device == NULL) return NULL; ret = NULL; tablet = device->priv->wacom_settings; display = g_settings_get_value (tablet, "display"); ...
false
false
false
false
false
0
CL_ProcessSustain (void) { cl_sustain_t *s; int i; for (i = 0, s = cl_sustains; i < MAX_SUSTAINS; i++, s++) { if (s->id) { if (s->endtime >= cl.time && cl.time >= s->nextthink) s->think (s); else if (s->endtime < cl.time) s->id = 0; } } }
false
false
false
false
false
0
sgen_dump_section (GCMemSection *section, const char *type) { char *start = section->data; char *end = section->data + section->size; char *occ_start = NULL; fprintf (heap_dump_file, "<section type=\"%s\" size=\"%lu\">\n", type, (unsigned long)section->size); while (start < end) { guint size; //GCVTable vt; ...
false
false
false
false
false
0
AcpiDbWalkForPredefinedNames ( ACPI_HANDLE ObjHandle, UINT32 NestingLevel, void *Context, void **ReturnValue) { ACPI_NAMESPACE_NODE *Node = (ACPI_NAMESPACE_NODE *) ObjHandle; UINT32 *Count = (UINT32 *...
false
false
false
false
false
0
get_fields( const QString& txt_P ) { QString txt = txt_P.simplified(); QStringList ret; QString item = ""; bool in = false; bool escape = false; for( int pos = 0; pos < txt.length(); ++pos ) { if( escape ) { item += txt[ pos ]; ...
false
false
false
false
false
0
UtilSizeToHuman (unsigned long long Size, bool SI, int FracLen, int UnitThreshold) { QString SizeHuman; const char *pBaseUnit = "Byte"; const char *pUnit; double Sz; double Divisor; if (SI) Divisor = 1000.0; else Divisor = 1024.0; if (UnitThreshold == -1) // auto ...
false
false
false
false
false
0
unpackbuf(sge_pack_buffer *pb, char **buf_ptr, int buf_size) { DENTER(PACK_LAYER, "unpackbuf"); if (buf_size == 0) { DEXIT; return PACK_SUCCESS; } /* are there enough bytes ? */ if ((buf_size + pb->bytes_used) > pb->mem_size) { DEXIT; return PACK_FORMAT; } /* copy buffe...
false
true
false
false
false
1
applesmc_has_key(const char *key, bool *value) { const struct applesmc_entry *entry; entry = applesmc_get_entry_by_key(key); if (IS_ERR(entry) && PTR_ERR(entry) != -EINVAL) return PTR_ERR(entry); *value = !IS_ERR(entry); return 0; }
false
false
false
false
false
0
static_ok_global (gamgi_window *window_dialog) { gamgi_window *window_parent; gamgi_layer *layer_child, *layer_parent; gamgi_object *child, *parent; gamgi_dlist *dlist; gamgi_slist *start; cache.local = FALSE; /****************** * get light list * ******************/ if (gamgi->lights == NULL) { gamgi_gtk_dialo...
false
false
false
false
false
0
hurtmarmor(mdef, attk) struct monst *mdef; int attk; { int hurt; struct obj *target; switch(attk) { /* 0 is burning, which we should never be called with */ case AD_RUST: hurt = 1; break; case AD_CORR: hurt = 3; break; default: hurt = 2; break; } /* What the following code does: it keeps loopi...
false
false
false
false
false
0
devm_acpi_dma_controller_register(struct device *dev, struct dma_chan *(*acpi_dma_xlate) (struct acpi_dma_spec *, struct acpi_dma *), void *data) { void *res; int ret; res = devres_alloc(devm_acpi_dma_release, 0, GFP_KERNEL); if (!res) return -ENOMEM; ret = acpi_dma_controller_register(dev, acpi_dma_xlat...
false
false
false
false
false
0
save_list_bonds (struct Bond *list, FILE * file, const int debug, const int no_title) { struct Bond *current; struct Ornament *orn; if (!no_title) { fprintf (file, "# Save file for EasyChem (version " VERSION ")\n\n"); setlocale(LC_NUMERIC, "C"); gettext(""); /* to initialize */ } if (list =...
false
false
false
false
false
0
getDefaultHeight(){ register FXWindow *child; FXint t,h=0; for(child=getFirst(); child; child=child->getNext()){ if(child->shown()){ t=child->getY()+child->getHeight(); if(h<t) h=t; } } return h; }
false
false
false
false
false
0
pan_item_thumb_new(PanWindow *pw, FileData *fd, gint x, gint y) { PanItem *pi; pi = g_new0(PanItem, 1); pi->type = PAN_ITEM_THUMB; pi->fd = fd; pi->x = x; pi->y = y; pi->width = PAN_THUMB_SIZE + PAN_SHADOW_OFFSET * 2; pi->height = PAN_THUMB_SIZE + PAN_SHADOW_OFFSET * 2; pw->list = g_list_prepend(pw->list, ...
false
false
false
false
false
0
centerWidget() { /* m_pagesTabWidget = new QTabWidget; for (int i = 0; i < m_pageWidgets.size(); ++i) m_pagesTabWidget->addTab(m_pageWidgets.at(i), m_pageTitles.at(i)); return m_pagesTabWidget; */ // create list QListWidget *pagesListWidget = new QListWidget; pagesListWidget->setViewMode(QListView::IconMode); ...
false
false
false
false
false
0
fuse_write (xlator_t *this, fuse_in_header_t *finh, void *msg) { /* WRITE is special, metadata is attached to in_header, * and msg is the payload as-is. */ struct fuse_write_in *fwi = (struct fuse_write_in *) (finh + 1); fuse_private_t *p...
false
false
false
false
false
0
vme_irq_free(struct vme_dev *vdev, int level, int statid) { struct vme_bridge *bridge; bridge = vdev->bridge; if (bridge == NULL) { printk(KERN_ERR "Can't find VME bus\n"); return; } if ((level < 1) || (level > 7)) { printk(KERN_ERR "Invalid interrupt level\n"); return; } if (bridge->irq_set == NULL) ...
false
false
false
false
false
0
playlist_add_playlist_mrl (const char *mrl, gint ins_pos) { const char *extension = strrchr(mrl, '.'); if (extension) { if (!strncasecmp (extension, ".pls", 4)) return playlist_load_pls (mrl, ins_pos); if (!strncasecmp (extension, ".m3u", 4)) return playlist_load_m3u (mrl, ins_pos); if (...
false
false
false
false
false
0
ossl_x509_set_serial(VALUE self, VALUE num) { X509 *x509; GetX509(self, x509); x509->cert_info->serialNumber = num_to_asn1integer(num, X509_get_serialNumber(x509)); return num; }
false
false
false
false
false
0
readcheck (av) reg char **av; { auto Stat sb; auto char name[PATHSIZE]; auto char local[PATHSIZE]; int sel, res; #ifdef linux_tstamp auto struct utimbuf tstamp; #else auto time_t tstamp[2]; #endif if (*av) fatal (*av, "Extraneous argument"); name[0] = '\0'; while (inhead (name, &sb) == 0) ...
false
false
false
false
false
0
PR_DeleteSemaphore(const char *name) { key_t key; int semid; /* On some systems (e.g., glibc 2.0) semctl requires a fourth argument */ union semun unused; char osname[PR_IPC_NAME_SIZE]; if (_PR_MakeNativeIPCName(name, osname, sizeof(osname), _PRIPCSem) == PR_FAILURE) { retur...
false
false
false
false
false
0
qdiv(mr_small u,mr_small v) { /* fast division - small quotient expected */ mr_small x=u; x-=v; if (x<v) return 1; x-=v; if (x<v) return 2; return MR_DIV(u,v); }
false
false
false
false
false
0
gda_set_source_set_data_model (GdaSetSource *s, GdaDataModel *model) { g_return_if_fail (s); g_return_if_fail (GDA_IS_DATA_MODEL (model)); s->data_model = g_object_ref (model); }
false
false
false
false
false
0
mb_charlen_len(str, len) char_u *str; int len; { char_u *p = str; int count; for (count = 0; *p != NUL && p < str + len; count++) p += (*mb_ptr2len)(p); return count; }
false
false
false
false
false
0
pad_press(byte k) { if (hw.pad & k) return; hw.pad |= k; pad_refresh(); }
false
false
false
false
false
0
change(void) { if (scrolledWindow()->scrollWindow()!=0) { scrolledWindow()->scrollWindow()->moveTo(scrolledWindow()->scrollWindow()->x_origin(), min()-value()); XFlush(display()); } }
false
false
false
false
false
0
read_external_help(const char *filename) { int error, line; char *ptr, *eot; size_t filesize; filesize = HELP_FILESIZE_LIMIT; ext_help = read_file(filename,&filesize,&error); if (ext_help == 0) { switch (error) { case 1: help_error("Cannot open the file (%s)\n",strerror(errno)); break; case 2: hel...
false
false
false
false
false
0
Init0(uint32 seed) { // Detect computer architecture union {double f; uint32 i[2];} convert; convert.f = 1.0; if (convert.i[1] == 0x3FF00000) Architecture = LITTLE_ENDIAN1; else if (convert.i[0] == 0x3FF00000) Architecture = BIG_ENDIAN1; else Architecture = NONIEEE; // Seed generator m...
false
false
false
false
false
0
mark() { JSObject::mark(); if (screen && !screen->marked()) screen->mark(); if (console && !console->marked()) console->mark(); if (history && !history->marked()) history->mark(); if (external && !external->marked()) external->mark(); //kDebug(6070) << "Window::mark " << this << " marking lo...
false
false
false
false
false
0
AllocatePacket(int s) { DemuxPacket* d = PVR->AllocateDemuxPacket(s); if(d == NULL) return NULL; d->iSize = s; return (Packet*)d; }
false
false
false
false
false
0
ParseCoordinate(std::string const& text) { int pos = 0; const char* pszStr = text.c_str(); Coordinate *psTmp = new Coordinate(); // X coordinate psTmp->dfLongitude = CPLAtof(pszStr); while(isNumberDigit(pszStr[pos++])); // Y coordinate if(pszStr[pos - 1] != ',') { delete ps...
false
false
false
false
false
0
file_name(char const *path) { char const *name; name = strrchr(path, '/'); if (!name) { name = strrchr(path, '\\'); /* eww windows? */ } if (!name) { name = path; } else { name++; } return name; }
false
false
false
false
false
0