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
info (const char *format, ...) { va_list arg_ptr; if (verbose) { va_start( arg_ptr, format ) ; vfprintf (stderr, format, arg_ptr ); va_end(arg_ptr); if (*format && format[strlen(format)-1] != '\n') putc ('\n', stderr); } }
false
false
false
false
true
1
gt_suftabSequentialsuffixarrayreader( const Sequentialsuffixarrayreader *ssar) { gt_assert(ssar->seqactype != SEQ_scan); if (ssar->seqactype == SEQ_mappedboth) { return ssar->suffixarray->suftab; } return ssar->suftab; }
false
false
false
false
false
0
png_handle_sCAL(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length) { png_bytep buffer; png_size_t i; int state; png_debug(1, "in png_handle_sCAL"); if (!(png_ptr->mode & PNG_HAVE_IHDR)) png_chunk_error(png_ptr, "missing IHDR"); else if (png_ptr->mode & PNG_HAVE_IDAT) { pn...
false
false
false
false
false
0
btc_populate_ulv_state(struct radeon_device *rdev, RV770_SMC_STATETABLE *table) { int ret = -EINVAL; struct evergreen_power_info *eg_pi = evergreen_get_pi(rdev); struct rv7xx_pl *ulv_pl = eg_pi->ulv.pl; if (ulv_pl->vddc) { ret = cypress_convert_power_level_to_smc(rdev, ulv_pl, &table->ULVSt...
false
false
false
false
false
0
libfvalue_floating_point_copy_to_integer( libfvalue_floating_point_t *floating_point, uint64_t *integer_value, size_t *integer_value_size, libcerror_error_t **error ) { byte_stream_float64_t value_float64; static char *function = "libfvalue_floating_point_copy_to_integer"; if( floating_point ==...
false
false
false
false
false
0
x38_remove_one(struct pci_dev *pdev) { struct mem_ctl_info *mci; edac_dbg(0, "\n"); mci = edac_mc_del_mc(&pdev->dev); if (!mci) return; iounmap(mci->pvt_info); edac_mc_free(mci); }
false
false
false
false
false
0
simple_pwclear (const char *cacheid) { char line[500]; char *p; /* We need not more than 50 characters for the command and the terminating nul. */ if (strlen (cacheid) * 3 > sizeof (line) - 50) return SPWQ_PROTOCOL_ERROR; strcpy (line, "CLEAR_PASSPHRASE "); p = line + 17; p = copy_and_escape (...
true
true
false
false
false
1
base64_init(char *rank) { int i; memset(rank, 0xff, sizeof(rank)); for (i=0;i<64;i++) { rank[(unsigned int)base64_alphabet[i]] = i; } rank['='] = 0; }
false
false
false
false
false
0
do_frame(faifa_t *faifa, u_int16_t mmtype, u_int8_t *da, u_int8_t *sa, void *user) { u_int8_t frame_buf[1518]; int frame_len = sizeof(frame_buf); int i; /* Dispatch the frame construction */ if ((i = hpav_mmtype2index(mmtype)) >= 0) frame_len = hpav_do_frame(frame_buf, frame_len, mmtype, da, sa, user); else if...
false
false
false
false
false
0
saver_completed_cb (GthTask *task, GError *error, gpointer user_data) { DialogData *data = user_data; GthMonitor *monitor; GList *scan; monitor = gth_main_get_default_monitor (); for (scan = data->parents; scan; scan = scan->next) gth_monitor_resume (monitor, (GFile *) scan->data); if (er...
false
false
false
false
false
0
EnvDeftemplateSlotCardinality( void *theEnv, void *vTheDeftemplate, char *slotName, DATA_OBJECT *result) { struct deftemplate *theDeftemplate = (struct deftemplate *) vTheDeftemplate; short position; struct templateSlot *theSlot; /*===============================================*/ /...
false
false
false
false
false
0
pk_marshal_VOID__STRING_STRING_STRING_BOOLEAN_STRING_UINT_STRING_UINT_STRING (GClosure *closure, GValue *return_value G_GNUC_UNUSED, guint n_param...
false
false
false
false
false
0
eval(SeVec3d& result) const { if (_var) { // eval expression and store in variable const SeExprNode* node = child(0); node->eval(_var->val); if (_var->isVec() && !node->isVec()) _var->val[1] = _var->val[2] = _var->val[0]; } else result = 0.0; }
false
false
false
false
false
0
assert_is_equivalent(const void *array, const void *copy, size_t cnt, size_t isize) { htable_t *aht, *cht; htable_iter_t *iter; const void *key; void *value; aht = htable_create(HASH_KEY_FIXED, isize); cht = htable_create(HASH_KEY_FIXED, isize); count_items(aht, array, cnt, isize); count_items(cht, copy, cnt...
false
false
false
false
false
0
combo_disconnect_signals (ComboCell *cell) { PopBox *box = cell->cell.gui_private; if (!box->signals_connected) return; g_signal_handlers_disconnect_matched (G_OBJECT (box->item_list), G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, cell); box->signals_connect...
false
false
false
false
false
0
op(int op, int z,int w,int x,int y) { int w0, w1; extern int dsp_code[DSP_CODE_SIZE]; extern int ip; extern char op_codes[35][9]; extern char listtemp[60]; if (ip >= 0x200) as_exit("to many instructions"); if (op >= 0x10 || op < 0x00) as_exit("illegal op code"); //ch...
false
false
false
false
false
0
get_stream(const char *id) { uint64_t n_id; int ok; connection_t *conn; n_id = tor_parse_uint64(id, 10, 0, UINT64_MAX, &ok, NULL); if (!ok) return NULL; conn = connection_get_by_global_id(n_id); if (!conn || conn->type != CONN_TYPE_AP || conn->marked_for_close) return NULL; return TO_ENTRY_CONN(...
false
false
false
false
false
0
Hunk_Begin (int maxsize) { // reserve a huge chunk of memory, but don't commit any yet maxhunksize = maxsize; curhunksize = 0; membase = malloc(maxhunksize); if (membase == NULL) Sys_Error("Hunk_Begin: unable to virtual allocate %d bytes", maxsize); memset( membase, 0, maxhunksize ); return membase; }
false
false
false
false
false
0
absolute(const path& p, const path& base) { // if ( p.empty() || p.is_absolute() ) // return p; // // recursively calling absolute is sub-optimal, but is simple // path abs_base(base.is_absolute() ? base : absolute(base)); //# ifdef BOOST_WINDOWS_API // if (p.has_root_directory()) // return abs...
false
false
false
false
false
0
mark_allocated(void *obj, bool to_new, uint *psize) { obj_header_t *pre = (obj_header_t *)obj - 1; uint size = pre_obj_contents_size(pre); ref_packed *prp = (ref_packed *) (pre + 1); ref_packed *next = (ref_packed *) ((char *)prp + size); #ifdef ALIGNMENT_ALIASING_BUG ref *rpref; # defin...
false
false
false
false
false
0
editFont() { QWidget *focused = QApplication::activeWindow(); QFontDialog dlg; QFont useMe; if (_currentDefined) useMe = _current; else useMe = _default; dlg.setCurrentFont(useMe); if (dlg.exec()==QDialog::Accepted) { if (useMe!=dlg.currentFont()) { _fontC...
false
false
false
false
false
0
gst_camera_bin_handle_message (GstBin * bin, GstMessage * message) { GstCameraBin2 *camerabin = GST_CAMERA_BIN2_CAST (bin); gboolean dec_counter = FALSE; switch (GST_MESSAGE_TYPE (message)) { case GST_MESSAGE_ELEMENT:{ const GstStructure *structure = gst_message_get_structure (message); const gch...
false
false
false
false
false
0
rend_client_get_random_intro_impl(const rend_cache_entry_t *entry, const int strict, const int warnings) { int i; rend_intro_point_t *intro; const or_options_t *options = get_options(); smartlist_t *usable_nodes; int n_excluded = 0; /* We...
false
false
false
false
false
0
meshGetMessage(uint8_t type){ int free=-1; for(int i=0;i<MESHBUFSIZE;i++){ if ( ((meshbuffer[i].flags&MF_USED)==0) && free<0 ) free=i; if ( (meshbuffer[i].flags&MF_USED) && (MO_TYPE(meshbuffer[i].pkt) == type)){ free=i; break; }; };...
false
false
false
false
false
0
GetIndex() { /* -------------------------------------------------------------------- */ /* Load block map if needed. */ /* -------------------------------------------------------------------- */ if( !block_initialized ) { bool needs_swap = !BigEndianSystem(); ...
false
false
false
false
false
0
i1480_print_state(struct i1480 *i1480) { int result; u32 *buf = (u32 *) i1480->cmd_buf; result = i1480->read(i1480, 0x80080000, 2 * sizeof(*buf)); if (result < 0) { dev_err(i1480->dev, "cannot read U & L states: %d\n", result); goto error; } dev_info(i1480->dev, "state U 0x%08x, L 0x%08x\n", buf[0], buf[1]);...
false
true
false
false
true
1
line_alignment(struct view *view, position_t lnstart0) { position_t lnstart, offset, at, corr; Unicode_t ch; unsigned indent, brindent; unsigned tabstop = view->text->tabstop; Boolean_t is_nested; if (!lnstart0) return 0; lnstart = lnstart0 - 1; tabstop |= !tabstop; /* Find previous non-blank line */ again...
false
false
false
false
false
0
getApplicationPath(Poco::Path& appPath) const { #if defined(POCO_OS_FAMILY_UNIX) && !defined(POCO_VXWORKS) if (_command.find('/') != std::string::npos) { Path path(_command); if (path.isAbsolute()) { appPath = path; } else { appPath = _workingDirAtLaunch; appPath.append(path); } } else { i...
false
false
false
false
false
0
main(int argc, char *argv[]) { ui_data_t* ui; gtk_init(&argc, &argv); ui = create_ui(); gtk_widget_show_all(ui->main_window); if (ui->codec_selection_combo) update_codec_ui(ui, true); gtk_main(); return 0; }
false
false
false
false
false
0
gtp_does_defend(char *s) { int i, j; int ti, tj; int defense_code; int n; n = gtp_decode_coord(s, &ti, &tj); if (n == 0) return gtp_failure("invalid coordinate"); if (BOARD(ti, tj) != EMPTY) return gtp_failure("move vertex must be empty"); n = gtp_decode_coord(s + n, &i, &j); if (n == 0) ...
false
false
false
false
false
0
pg_decode_windows(BITBUFFER *bb, BD_PG_WINDOWS *p) { unsigned ii; p->num_windows = bb_read(bb, 8); p->window = calloc(p->num_windows, sizeof(BD_PG_WINDOW)); for (ii = 0; ii < p->num_windows; ii++) { pg_decode_window(bb, &p->window[ii]); } return 1; }
false
false
false
false
false
0
gitg_revision_panel_get_panel_impl (GitgRevisionPanel *panel) { GtkBuilder *builder; GtkWidget *ret; GitgRevisionFilesPanel *files_view_panel; files_view_panel = GITG_REVISION_FILES_PANEL (panel); if (files_view_panel->priv->panel) { return GTK_WIDGET (files_view_panel->priv->panel); } builder = gitg_utils...
false
false
false
false
false
0
_script_agent (void *args) { while (1) { struct jobcomp_info *job; pthread_mutex_lock(&comp_list_mutex); if (list_is_empty(comp_list) && !agent_exit) pthread_cond_wait(&comp_list_cond, &comp_list_mutex); /* * It is safe to unlock list mutex here. List has its * own internal mutex that protects the...
false
false
false
false
false
0
ConversionXYNotifyProc(w, event, args, num_args) Widget w; XEvent *event; String *args; Cardinal *num_args; { KinputProtocolWidget kpw = (KinputProtocolWidget)w; XClientMessageEvent *ev = &event->xclient; Window reqwin; ConvClient *ccp; JinputData *jdp; TRACE(("ConversionXYNotifyProc(window=0x%...
false
false
false
false
false
0
StateSav_ReadUWORD(UWORD *data, int num) { if (!StateFile || nFileError != Z_OK) return; while (num > 0) { UBYTE byte1, byte2; if (GZREAD(StateFile, &byte1, 1) == 0) { GetGZErrorText(); break; } if (GZREAD(StateFile, &byte2, 1) == 0) { GetGZErrorText(); break; } *data++ = (byte2 << 8) | ...
false
false
false
false
false
0
fsm_input(f, inpacket, l) fsm *f; u_char *inpacket; int l; { u_char *inp, *outp; u_char code, id; int len; /* * Parse header (code, id and length). * If packet too short, drop it. */ inp = inpacket; if (l < HEADERLEN) { FSMDEBUG((LOG_WARNING, "fsm_input(%x): Rcvd sho...
false
false
false
false
false
0
get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { NMSettingPPP *setting = NM_SETTING_PPP (object); switch (prop_id) { case PROP_NOAUTH: g_value_set_boolean (value, nm_setting_ppp_get_noauth (setting)); break; case PROP_REFUSE_EAP: g_value_set_boolean (value, nm_setting_p...
false
false
false
false
false
0
previewgui_stop_preview (GuPreviewGui* pc) { pc->preview_on_idle = FALSE; if (pc->update_timer != 0) g_source_remove (pc->update_timer); pc->update_timer = 0; }
false
false
false
false
false
0
vmm_resize(void *p, size_t size, size_t new_size) { size_t asize, anew; void *np; asize = round_pagesize(size); /* Allocated size */ anew = round_pagesize(new_size); if (asize == anew) return p; if G_UNLIKELY(vmm_crashing) { if (anew < asize) return p; np = vmm_valloc(NULL, anew); memcpy(np, p, siz...
false
false
false
false
false
0
snd_mts64_rawmidi_output_trigger(struct snd_rawmidi_substream *substream, int up) { struct mts64 *mts = substream->rmidi->private_data; u8 data; unsigned long flags; spin_lock_irqsave(&mts->lock, flags); while (snd_rawmidi_transmit_peek(substream, &data, 1) == 1) { mts64_write_midi(mts, data, substrea...
false
false
false
false
false
0
dataToLabel( const Meta::DataPtr& data ) const { if ( data != Meta::DataPtr() ) { if ( Meta::TrackPtr track = Meta::TrackPtr::dynamicCast( data ) ) { return QString( i18n("Track: %1", track->prettyName() ) ); } else if ( Meta::AlbumPtr album = Meta::AlbumPtr::dynamicCast( data ) ) { ...
false
false
false
false
false
0
alloc_tcb(int pid, int command_options_parsed) { int i; struct tcb *tcp; if (nprocs == tcbtabsize) expand_tcbtab(); for (i = 0; i < tcbtabsize; i++) { tcp = tcbtab[i]; if ((tcp->flags & TCB_INUSE) == 0) { tcp->pid = pid; tcp->parent = NULL; tcp->nchildren = 0; tcp->nzombies = 0; #ifdef TCB_CLONE...
false
false
false
false
false
0
flac__analyze_finish(analysis_options aopts) { if(aopts.do_residual_gnuplot) { compute_stats(&all_); (void)dump_stats(&all_, "all"); } }
false
false
false
false
false
0
bucket_range(const struct tally *tally, unsigned b, size_t *err) { ssize_t min, max; min = bucket_min(tally->min, tally->step_bits, b); if (b == tally->buckets - 1) { max = tally->max; } else { max = bucket_min(tally->min, tally->step_bits, b+1) - 1; } /* FIXME: Think harder about cumulative error; is this ...
false
false
false
false
false
0
_handle_path(void *ctx, int fields, char **row) { if (bvfs_is_dir(row)) { /* can have the same path 2 times */ if (strcmp(row[BVFS_Name], prev_dir)) { pm_strcpy(prev_dir, row[BVFS_Name]); return list_entries(user_data, fields, row); } } return 0; }
false
false
false
false
false
0
reg_read(struct dsa_switch *ds, int addr, int reg) { struct mii_bus *bus = dsa_host_dev_to_mii_bus(ds->master_dev); if (bus == NULL) return -EINVAL; return mdiobus_read_nested(bus, ds->pd->sw_addr + addr, reg); }
false
false
false
false
false
0
UPNP_GetSpecificPortMappingEntry(const char * controlURL, const char * servicetype, const char * extPort, const char * proto, char * intClient, char * intPort) { struct NameVa...
false
false
false
false
false
0
readahead_tree_block(struct btrfs_root *root, u64 bytenr) { struct extent_buffer *buf = NULL; struct inode *btree_inode = root->fs_info->btree_inode; buf = btrfs_find_create_tree_block(root, bytenr); if (!buf) return; read_extent_buffer_pages(&BTRFS_I(btree_inode)->io_tree, buf, 0, WAIT_NONE, btree_get_ext...
false
false
false
false
false
0
writeToStream(mrpt::utils::CStream &out, int *version) const { MRPT_UNUSED_PARAM(out); if (version) *version = 3; else { // The data out << speed << direction << sensorLabel << timestamp << sensorPoseOnRobot; } }
false
false
false
false
false
0
qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = GcChartWindow::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { if (_id < 11) qt_static_metacall(this, _c, _id, _a); _id -= 11; } #ifndef QT_NO_PROPERTIES ...
false
false
false
false
false
0
iscsit_na_default_erl( struct iscsi_node_acl *acl, u32 default_erl) { struct iscsi_node_attrib *a = &acl->node_attrib; if (default_erl != 0 && default_erl != 1 && default_erl != 2) { pr_err("Requested default ERL: %u not 0, 1, or 2\n", default_erl); return -EINVAL; } a->default_erl = default_erl; pr_de...
false
false
false
false
false
0
gst_dvswitch_parse_uri (const gchar * uristr, GstDvswitchUri * uri) { gchar *protocol; gchar *location, *location_end; gchar *colptr; /* consider no protocol to be dvswitch:// */ protocol = gst_uri_get_protocol (uristr); if (!protocol) goto no_protocol; if (strcmp (protocol, "dvswitch") != 0) got...
false
false
false
false
false
0
open_book(file) uchr *file; { if (rfd != -1) close_book(); if ((rfd = open(file, O_RDONLY|O_BINARY)) < 0) return ERR; rblkno = 0L; if (read_block() == ERR) return ERR; return OK; }
false
false
false
false
false
0
dowieldquiver(void) { register struct obj *newquiver; const char *quivee_types = (uslinging() || (uswapwep && objects[uswapwep->otyp].oc_skill == P_SLING)) ? bullets : ready_objs; /* Since the quiver isn't in your hands, don't check cantwield(), */ /* will_weld()...
false
false
false
false
false
0
testBinarySearchTree() { cout << "Testing Binary Search Tree..."; BinarySearchTree tree; tree.add(5); tree.add(4); tree.add(6); tree.add(8); tree.add(3); tree.add(1); tree.add(9); tree.add(7); tree.preorder(); tree.inorder(); tree.postorder(); BinarySearchTreeNo...
false
false
false
false
false
0
ranges_overlap(const struct sqnode *a, const struct sqnode *b) { if(a->len && b->len) { const uint64_t aend = a->offset + a->len - 1; const uint64_t bend = b->offset + b->len - 1; if(aend >= b->offset && aend <= bend) return 1; if(bend >= a->offset && bend <= aend...
false
false
false
false
false
0
completed_messagedialog_response_cb (GtkDialog *dialog, int response_id, gpointer user_data) { DialogData *data = user_data; switch (response_id) { case GTK_RESPONSE_DELETE_EVENT: case GTK_RESPONSE_CLOSE: gtk_widget_destroy (GTK_WIDGET (dialog)); gtk_dialog_response (GTK_DIALOG (data...
false
false
false
false
false
0
download_move_to_list(struct download *d, enum dl_list idx) { struct dl_server *server = d->server; enum dl_list old_idx = d->list_idx; download_check(d); server = d->server; old_idx = d->list_idx; g_assert(dl_server_valid(server)); g_assert(d->list_idx != DL_LIST_INVALID); /* In some list */ g_assert(d->li...
false
false
false
false
false
0
geoclue_manual_set_address_fields (GeoclueManual *manual, int valid_for, char *country_code, char *country, char *region, char *locality, ...
false
false
false
false
false
0
directory(const KUrl& url, bool ignore_trailing_slash) const { QString dir = url.directory(ignore_trailing_slash ? KUrl::DirectoryOptions(KUrl::IgnoreTrailingSlash) : KUrl::ObeyTrailingSlash); return encode(dir); }
false
false
false
false
false
0
log_exec_internal(Log_desc *logd, Log_filter *lf, Log_level level, const char *fmt, va_list ap) { char *prefix; Log_output *out; va_list ap2; if (logd == NULL || logd->state != LOG_ENABLED) return; prefix = logd->default_prefix; if (logd->event.msg == NULL && logd->user_prefix != NULL) prefix = lo...
false
false
false
false
false
0
set_dei_regs(struct vpe_ctx *ctx) { struct vpe_mmr_adb *mmr_adb = ctx->mmr_adb.addr; struct vpe_q_data *s_q_data = &ctx->q_data[Q_DATA_SRC]; unsigned int src_h = s_q_data->c_rect.height; unsigned int src_w = s_q_data->c_rect.width; u32 *dei_mmr0 = &mmr_adb->dei_regs[0]; bool deinterlace = true; u32 val = 0; /*...
false
false
false
false
false
0
glade_gtk_tool_button_read_widget (GladeWidgetAdaptor *adaptor, GladeWidget *widget, GladeXmlNode *node) { if (!glade_xml_node_verify (node, GLADE_XML_TAG_WIDGET (glade_project_get_format (widget->project)))) return; /* First chain up and read in all the normal properties.. */ ...
false
false
false
false
false
0
md5_hasher_create(hash_algorithm_t algo) { private_md5_hasher_t *this; if (algo != HASH_MD5) { return NULL; } INIT(this, .public = { .hasher_interface = { .get_hash = _get_hash, .allocate_hash = _allocate_hash, .get_hash_size = _get_hash_size, .reset = _reset, .destroy = _destroy, }...
false
false
false
false
false
0
Li(const Scene *scene, const Renderer *renderer, const RayDifferential &ray, const Sample *sample, RNG &rng, Spectrum *T, MemoryArena &arena) const { VolumeRegion *vr = scene->volumeRegion; Assert(sample != NULL); float t0, t1; if (!vr || !vr->IntersectP(ray, &t0, &t1) || (t1-t0)...
false
false
false
false
false
0
source_registry_server_auth_request_next (ESourceRegistryServer *server, const gchar *uid) { AuthRequest *request = NULL; g_return_val_if_fail (uid != NULL, NULL); g_mutex_lock (&server->priv->auth_lock); /* If we're already busy processing an authentication request * ...
false
false
false
false
false
0
ml_gdome_di_createDocumentType(value self, value qualifiedName, value publicId, value systemId) { CAMLparam4(self, qualifiedName, publicId, systemId); GdomeException exc_; GdomeDocumentType* res_; res_ = gdome_di_createDocumentType(DOMImplementation_val(self), DOMString_val(qualifiedName), DOMString_val(publicI...
false
false
false
false
false
0
Stream_Gets_Prompt(char *prompt, StmInf *pstm_o, char *str, int size, StmInf *pstm_i) { #ifndef NO_USE_LINEDIT char *save_le_prompt = le_prompt; int save_use_le_prompt = use_le_prompt; le_prompt = prompt; use_le_prompt = 1; if (pstm_i->fct_getc != TTY_Getc) #endif Stream_Printf(pstm_o, prompt); ...
false
false
false
false
false
0
procmime_mimeinfo_next(MimeInfo *mimeinfo) { cm_return_val_if_fail(mimeinfo != NULL, NULL); cm_return_val_if_fail(mimeinfo->node != NULL, NULL); if (mimeinfo->node->children) return (MimeInfo *) mimeinfo->node->children->data; if (mimeinfo->node->next) return (MimeInfo *) mimeinfo->node->next->data; if (mime...
false
false
false
false
false
0
alloc_gtt_mem(struct kgd_dev *kgd, size_t size, void **mem_obj, uint64_t *gpu_addr, void **cpu_ptr) { struct amdgpu_device *rdev = (struct amdgpu_device *)kgd; struct kgd_mem **mem = (struct kgd_mem **) mem_obj; int r; BUG_ON(kgd == NULL); BUG_ON(gpu_addr == NULL); BUG_ON(cpu_ptr == NULL); *mem = kmalloc...
false
false
false
false
false
0
ast_interp_set(struct lgfs2_lang_state *state, struct ast_node *ast, struct gfs2_sbd *sbd) { struct ast_node *lookup = ast->ast_right; struct ast_node *fieldspec; struct ast_node *fieldname; struct ast_node *fieldval; int i = 0; int ret = 0; unsigned ver = sbd->gfs1 ? LGFS2_MD...
false
false
false
false
false
0
finalize (bool no_backend) { /* Close the dump files. */ if (flag_gen_aux_info) { fclose (aux_info_file); if (seen_error ()) unlink (aux_info_file_name); } /* Close non-debugging input and output files. Take special care to note whether fclose returns an error, since the pages might s...
false
false
false
false
false
0
FCEU_SaveGameSave(CartInfo *LocalHWInfo) { if (LocalHWInfo->battery && LocalHWInfo->SaveGame[0]) { FILE *sp; std::string soot = FCEU_MakeFName(FCEUMKF_SAV, 0, "sav"); if ((sp = FCEUD_UTF8fopen(soot, "wb")) == NULL) { FCEU_PrintError("WRAM file \"%s\" cannot be written to.\n", soot.c_str()); } else { for...
false
false
false
false
false
0
client_submit_vec_request (xlator_t *this, void *req, call_frame_t *frame, rpc_clnt_prog_t *prog, int procnum, fop_cbk_fn_t cbkfn, struct iovec *payload, int payloadcnt, struct iobref *iobref, xdrproc_t xdrpro...
false
false
false
false
false
0
i2400m_rx_release(struct i2400m *i2400m) { unsigned long flags; if (i2400m->rx_reorder) { spin_lock_irqsave(&i2400m->rx_lock, flags); kref_put(&i2400m->rx_roq_refcount, i2400m_rx_roq_destroy); spin_unlock_irqrestore(&i2400m->rx_lock, flags); } /* at this point, nothing can be received... */ i2400m_report_ho...
false
false
false
false
false
0
Image_baselineHeight(Image *self) { //size_t numPixels = self->width * self->height; /* printf("self->componentCount: %i\n", self->componentCount); printf("numPixels: %i\n", (int)numPixels); printf("height: %i\n", (int)self->height); printf("width: %i\n", (int)self->width); */ // optimize later int componentCo...
false
false
false
false
false
0
send_ready( autofs_wqt_t wait_queue_token ) { if( ioctl( autodir.ioctlfd, AUTOFS_IOC_READY, wait_queue_token ) < 0 ) msglog( MSG_ERR|LOG_ERRNO, "ioctl AUTOFS_IOC_READY" ); }
false
false
false
false
false
0
remove_listitem(struct mailboxlist *remitem) { struct mailboxlist *item; struct mailboxlist *previtem = NULL; for (item = open_mailboxes; item; item = item->next) { if (item == remitem) { if (previtem) previtem->next = item->next; else open_mailboxes = item->next; free(item); retur...
true
true
false
false
false
1
interface_detect_beat_iff(int fd, const char *iface) { struct ifreq ifr; if (interface_auto_up) interface_up(fd, iface); memset(&ifr, 0, sizeof(ifr)); strncpy(ifr.ifr_name, iface, sizeof(ifr.ifr_name)-1); if (ioctl(fd, SIOCGIFFLAGS, &ifr) == -1) { if (interface_do_message) ...
false
true
false
false
false
1
L11() {register object *base=vs_base; register object *sup=base+VM11; VC11 vs_check; {object V27; V27=(base[0]); vs_top=sup; goto TTL; TTL:; base[1]= CMPcar((V27)); vs_top=(vs_base=base+1)+1; (void) (*Lnk64)(); vs_top=sup; V28= vs_base[0]; base[1]= ((CMPcar(V28))==(((object)VV[19]))?Ct:Cnil); vs_top=(vs_ba...
false
false
false
false
false
0
col_fit_right(const column_sampler *s, const glam2_aln *aln, const mfasta *m) { const int w = aln->width; int i; int min = INT_MAX; for (i = 0; i < aln->seq_num; ++i) if (ALIGNED(aln, i)) { const int fit = m->f[i].seqlen - RIGHT_POS(&aln->cols[w-1], i) - s->offsets[i] - s->col.matches[i] + 1; ...
false
false
false
false
false
0
pr_log __V((void *arg, char *fmt, ...)) { int l, n; va_list pvar; char *p, *eol; char buf[256]; #if defined(__STDC__) va_start(pvar, fmt); #else void *arg; char *fmt; va_start(pvar); arg = va_arg(pvar, void *); fmt = va_arg(pvar, char *); #endif n = vslprintf(buf, sizeof(buf), fmt, pvar); va_end(pvar); ...
false
false
false
false
false
0
_eina_share_common_head_find(Eina_Share_Common_Head *head, const char *str, unsigned int slen) { Eina_Share_Common_Node *node, *prev; node = head->head; if (_eina_share_common_node_eq(node, str, slen)) return node; prev = node; node = node...
false
false
false
false
false
0
PrintString( lListElem *ep, lListElem *jat, lList *eleml, int nm ) { String str; StringConst temp; DENTER(GUI_LAYER, "PrintString"); temp = lGetString(ep, nm); str = XtNewString(temp?temp:""); DEXIT; return str; }
false
false
false
false
false
0
is_valid_model_function (CFunctionInfo* fi) const { // Don't consider // * member functions of an invalid class // * ac++ generated functions // * pointcuts CRecord *cls = fi->ClassScope (); if (cls && !is_valid_model_class ((CClassInfo*)cls->DefObject ())) return false; CFunctionInfo *def = fi->Def...
false
false
false
false
false
0
bch_cache_accounting_destroy(struct cache_accounting *acc) { kobject_put(&acc->total.kobj); kobject_put(&acc->five_minute.kobj); kobject_put(&acc->hour.kobj); kobject_put(&acc->day.kobj); atomic_set(&acc->closing, 1); if (del_timer_sync(&acc->timer)) closure_return(&acc->cl); }
false
false
false
false
false
0
ext4_xattr_check_names(struct ext4_xattr_entry *entry, void *end, void *value_start) { struct ext4_xattr_entry *e = entry; while (!IS_LAST_ENTRY(e)) { struct ext4_xattr_entry *next = EXT4_XATTR_NEXT(e); if ((void *)next >= end) return -EFSCORRUPTED; e = next; } while (!IS_LAST_ENTRY(entry)) { ...
false
false
false
false
false
0
sil_set_dma_mode(ide_hwif_t *hwif, ide_drive_t *drive) { static const u8 ultra6[] = { 0x0F, 0x0B, 0x07, 0x05, 0x03, 0x02, 0x01 }; static const u8 ultra5[] = { 0x0C, 0x07, 0x05, 0x04, 0x02, 0x01 }; static const u16 dma[] = { 0x2208, 0x10C2, 0x10C1 }; struct pci_dev *dev = to_pci_dev(hwif->dev); unsigned long base...
false
false
false
false
false
0
delete_trie(Trie *trie, char *name, CloseMapper closemapper) { Trie *tr; unsigned int idx; if (trie==NULL) { return NULL; } idx=(unsigned int) name[0]; if (trie->text[idx]==NULL) { return NULL; } if (starts_with(name,trie->text[idx])==0) { tr=delete_trie(trie->childs[idx],name+trie->textlen[idx],close...
false
false
false
false
false
0
qmonStopPolling(void) { DENTER(GUI_LAYER, "qmonStopPolling"); XtRemoveTimeOut(timer_struct.timerid); DEXIT; }
false
false
false
false
false
0
cc_wacom_page_dispose (GObject *object) { CcWacomPagePrivate *priv = CC_WACOM_PAGE (object)->priv; if (priv->area) { calib_area_free (priv->area); priv->area = NULL; } if (priv->button_map) { gtk_widget_destroy (priv->button_map); priv->button_map = NULL; } if (priv->dialog) { gtk_widget_destroy (pri...
false
false
false
false
false
0
applySpecificSectionMappings(RuntimeDyldChecker &Checker) { std::map<void*, uint64_t> SpecificMappings; for (StringRef Mapping : SpecificSectionMappings) { size_t EqualsIdx = Mapping.find_first_of("="); std::string SectionIDStr = Mapping.substr(0, EqualsIdx); size_t ComaIdx = Mapping.find_first_of(",...
false
false
false
false
false
0
sisusb_is_inactive(struct vc_data *c, struct sisusb_usb_data *sisusb) { if (sisusb->is_gfx || sisusb->textmodedestroyed || c->vc_mode != KD_TEXT) return 1; return 0; }
false
false
false
false
false
0
bzImage_load(int argc, char **argv, const char *buf, off_t len, struct kexec_info *info) { char *command_line = NULL; const char *ramdisk, *append = NULL; char *ramdisk_buf; off_t ramdisk_length; int command_line_len; int debug, real_mode_entry; int opt; int result; /* See options.h -- add any more there, t...
false
true
false
false
true
1
Load (xmlNodePtr node) { char* tmp; tmp = (char*) xmlGetProp (node, (xmlChar*) "id"); if (tmp) { SetId (tmp); xmlFree (tmp); if (strcmp (GetId(), "a1")) return false; } if (!ReadPosition (node, NULL, &m_x, &m_y, &m_z)) return false; GetDocument ()->ObjectLoaded (this); return true; }
false
false
false
false
false
0
Create( double *x_data, double *y_data, int points, bool static_data ) { wxCHECK_MSG((points > 0) && x_data && y_data, false, wxT("Can't create wxPlotData with < 1 points or invalid data") ); UnRef(); m_refData = new wxPlotDataRefData(); if ( !M_PLOTDATA ) { wxFAIL_MSG(wxT(...
false
false
false
false
false
0
tile_active_window (config_t *conf, w_data *d, action_t ac) { int i; w_winspec act; geo_t tmpgeo; debugln("------------------------------\n"); if (w_active_win(d, &act) != 0) return -1; debugln("active window is at %d,%d %ux%u\n", act.geo.x, act.geo.y, act.geo.w, act.geo.h); // see if the...
false
false
false
false
false
0
SelectElt (AtomsDlg *pBox) { for (unsigned i = 0; i < pBox->m_pDoc->GetAtomList ()->size (); i++) if (pBox->m_Atoms[i]->GetZ () == pBox->m_nElt) gcr_grid_add_row_to_selection (pBox->m_Grid, i); }
false
false
false
false
false
0
terminal_app_system_font_notify_cb (GSettings *settings, const char *key, TerminalApp *app) { const char *font = NULL; PangoFontDescription *font_desc; g_settings_get (settings, MONOSPACE_FONT_KEY_NAME, "&s", &font); font_desc = pango_...
false
false
false
false
false
0
readString(int length) { ByteVector data = readBlock(length); unsigned int size = data.size(); while (size >= 2) { if(data[size - 1] != '\0' || data[size - 2] != '\0') { break; } size -= 2; } if(size != data.size()) { data.resize(size); } return String(data, String::UTF16LE); }
false
false
false
false
false
0