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
first_dentry (xfs_ino_t *ino) { xfs.forw = 0; switch (icore.di_format) { case XFS_DINODE_FMT_LOCAL: xfs.dirmax = inode->di_u.di_dir2sf.hdr.count; xfs.i8param = inode->di_u.di_dir2sf.hdr.i8count ? 0 : 4; xfs.dirpos = -2; break; case XFS_DINODE_FMT_EXTENTS: case XFS_DINODE_FMT_BTREE: filepos = 0; xfs_rea...
false
false
false
false
false
0
addPendingElement(int layer, int element_tag) { if (!checkLayerIndex(layer)) return 0; pendingElementTags[layer]->push_back(element_tag); return 0; }
false
false
false
false
false
0
intel_pmu_setup_sw_lbr_filter(struct perf_event *event) { u64 br_type = event->attr.branch_sample_type; int mask = 0; if (br_type & PERF_SAMPLE_BRANCH_USER) mask |= X86_BR_USER; if (br_type & PERF_SAMPLE_BRANCH_KERNEL) mask |= X86_BR_KERNEL; /* we ignore BRANCH_HV here */ if (br_type & PERF_SAMPLE_BRANCH_...
false
false
false
false
false
0
iscyber(int id) { switch (id) { case CYBER9388: case CYBER9382: case CYBER9385: case CYBER9397: case CYBER9397DVD: case CYBER9520: case CYBER9525DVD: case CYBERBLADEE4: case CYBERBLADEi7D: case CYBERBLADEi1: case CYBERBLADEi1D: case CYBERBLADEAi1: case CYBERBLADEAi1D: case CYBERBLADEXPAi1: return 1; ...
false
false
false
false
false
0
MyMalloc (long Mamount) { void *Mptr = NULL; // make Gnu-compatible even if on a broken system: if (Mamount == 0) Mamount = 1; if ((Mptr = calloc (1, (size_t) Mamount)) == NULL) { DebugPrintf (0, " MyMalloc(%ld) did not succeed!\n", Mamount); Terminate(ERR); } return Mptr; }
false
false
false
false
false
0
resof12s_process_lp(resof12s_t *rf, int *buf, unsigned frames) { int d1l = rf->d1l; int d1r = rf->d1r; int d2l = rf->d2l; int d2r = rf->d2r; int f = rf->f; int q = rf->q; int ll, bl, hl; int lr, br, hr; unsigned s; frames <<= 1; for(s = 0; s < frames; s += 2) { ll = d2l + (f*d1l >> 8); lr = d2r + (f*d1r...
false
false
false
false
false
0
nd_namespace_store(struct device *dev, struct nd_namespace_common **_ndns, const char *buf, size_t len) { struct nd_namespace_common *ndns; struct device *found; char *name; if (dev->driver) { dev_dbg(dev, "%s: -EBUSY\n", __func__); return -EBUSY; } name = kstrndup(buf, len, GFP_KERNEL); if (!name) r...
false
false
false
false
false
0
ne_net_accept(NSOCK **sock, int sfd, int data_timeout) { NSOCK *my_sock; int fd; struct sockaddr_in client_addr; socklen_t len; len = sizeof(struct sockaddr_in); while (1) { fd = accept(sfd, (struct sockaddr *)&client_addr, &len); if (fd >= 0) break; if (ShutdownAccept || errno != EINTR) ...
false
false
false
false
false
0
r300_fini(struct radeon_device *rdev) { radeon_pm_fini(rdev); r100_cp_fini(rdev); radeon_wb_fini(rdev); radeon_ib_pool_fini(rdev); radeon_gem_fini(rdev); if (rdev->flags & RADEON_IS_PCIE) rv370_pcie_gart_fini(rdev); if (rdev->flags & RADEON_IS_PCI) r100_pci_gart_fini(rdev); radeon_agp_fini(rdev); radeon_ir...
false
false
false
false
false
0
own_mouseButton(const MouseStroke &stroke) { t_widgets::iterator end = m_widgets.end(); for (t_widgets::iterator i = m_widgets.begin(); i != end; ++i) { (*i)->mouseButton(stroke); } }
false
false
false
false
false
0
reset_parser () { dstack.delimiter_depth = 0; /* No delimiters found so far. */ open_brace_count = 0; #if defined (EXTENDED_GLOB) /* Reset to global value of extended glob */ if (parser_state & PST_EXTPAT) extended_glob = global_extglob; #endif parser_state = 0; #if defined (ALIAS) || defined (DPAREN_A...
false
false
false
false
false
0
alive(krb5_int32 mytime, krb5_donot_replay *new1, krb5_deltat t) { if (mytime == 0) return CMP_HOHUM; /* who cares? */ /* I hope we don't have to worry about overflow */ if (new1->ctime + t < mytime) return CMP_EXPIRED; return CMP_HOHUM; }
false
false
false
false
false
0
js_NewSrcNote(JSContext *cx, JSCodeGenerator *cg, JSSrcNoteType type) { intN index, n; jssrcnote *sn; ptrdiff_t offset, delta, xdelta; /* * Claim a note slot in CG_NOTES(cg) by growing it if necessary and then * incrementing CG_NOTE_COUNT(cg). */ index = AllocSrcNote(cx, cg); if ...
false
false
false
false
false
0
to_strings (guint groups, std::map<std::string,std::string> &map, gboolean nosave, gboolean empty) { if (empty) map.clear (); iterator opt = options_.begin (); while (opt != options_.end ()) { Option *option = opt->second; if (option && (groups & option->group ()) && (!nosave || !(option->flags() & O...
false
false
false
false
false
0
DXMakeGridPositionsV(int n, int *counts, float *origin, float *deltas) { Array as[100]; float zero[100]; int i; ASSERT(n<100); /* zero */ for (i=0; i<n; i++) zero[i] = 0; /* create the terms */ for (i=0; i<n; i++) { as[i] = (Array) DXNewRegularArray(TYPE_FLOAT, n, counts[i], ...
false
false
false
false
false
0
ar9003_hw_bb_watchdog_dbg_info(struct ath_hw *ah) { struct ath_common *common = ath9k_hw_common(ah); u32 status; if (likely(!(common->debug_mask & ATH_DBG_RESET))) return; status = ah->bb_watchdog_last_status; ath_dbg(common, RESET, "\n==== BB update: BB status=0x%08x ====\n", status); ath_dbg(common, RESET...
false
false
false
false
false
0
out( MifOutputByteStream &os ) { os << '\n' << MifOutputByteStream::INDENT << "<TabStop "; os.indent(); CHECK_PROPERTY( TSX ); CHECK_PROPERTY( TSType ); CHECK_PROPERTY( TSLeaderStr ); CHECK_PROPERTY( TSDecimalChar ); os.undent(); os << '\n' << MifOutputByteStream::INDENT << ">"; }
false
false
false
false
false
0
MarkGrowBonds(Pattern *pat) { int i; OBBitVec bv; for (i = 0;i < pat->bcount;++i) { pat->bond[i].grow = (bv[pat->bond[i].src] && bv[pat->bond[i].dst])? false:true; bv.SetBitOn(pat->bond[i].src); bv.SetBitOn(pat->bond[i].dst); } }
false
false
false
false
false
0
DecompressNextPicture(ParseUnitByteIO* p_parseunit_byteio) { //this function decodes the next picture in coding order and returns the next picture in display order //In general these will differ, and because of re-ordering there is a m_delay which needs to be imposed. //This creates problems at the start an...
false
false
false
false
false
0
ajSeqBamHeaderWrite(AjPSeqBamBgzf fp, const AjPSeqBamHeader header) { char buf[4]; ajint i; ajint name_len; ajint x; char *p = NULL; if(!bamInitialized) { bamInitialized = ajTrue; bamBigendian = ajUtilGetBigendian(); } /* write "BAM1" */ strncpy(buf, "BAM\001", 4); ...
true
true
false
false
false
1
parse_config_file (IniFile& inifile_) { trace_with_mask ("CmdLineOpts::parse_config_file", CMDLINEOPTS); unsigned int count = 0; string v; string s; string optsect_name ("options"); OptionSet::iterator pos = m_opts_set.begin (); if (inifile_.find_section (optsect_name) == inifile_.sect_end ()) { optsect...
false
false
false
false
false
0
isFieldUsable( const MapCoordinate& pos ) { vector<MapCoordinate> fields = getFields(); return find( fields.begin(), fields.end(), pos ) != fields.end() ; }
false
false
false
false
false
0
ndmp_connection_scsi_close( NDMPConnection *self) { g_assert(!self->startup_err); NDMP_TRANS_NO_REQUEST(self, ndmp4_scsi_close) NDMP_CALL(self); NDMP_FREE(); NDMP_END return TRUE; }
false
false
false
false
false
0
read_user_chunk_callback(png_struct *png_ptr, png_unknown_chunkp chunk) { struct user_chunk_data *my_user_chunk_data = (struct user_chunk_data*)png_get_user_chunk_ptr(png_ptr); if (my_user_chunk_data == NULL) png_error(png_ptr, "lost user chunk pointer"); /* Return one of the following: * ...
false
false
false
false
false
0
check_namespace(const struct qstr *nm) { int type; if (nm->len > UBIFS_MAX_NLEN) return -ENAMETOOLONG; if (!strncmp(nm->name, XATTR_TRUSTED_PREFIX, XATTR_TRUSTED_PREFIX_LEN)) { if (nm->name[sizeof(XATTR_TRUSTED_PREFIX) - 1] == '\0') return -EINVAL; type = TRUSTED_XATTR; } else if (!strncmp(nm->nam...
false
false
false
false
false
0
operator<<( OrmLight value ) { //Add in either a hash value or an array value if ( Key.isEmpty() ) add( value ); else add( Key, value ); //Empty out my key value Key = QString(); return *this; }
false
false
false
false
false
0
button_below(WinManager *man, Button *b) { int n = man->buttons.num_windows; int i = -1; if (b) { i = box_to_index(man, index_to_box(man, b->index) + man->geometry.cols); } if (i < 0 || i >= n) return b; else return man->buttons.buttons[i]; }
false
false
false
false
false
0
PyParser_ParseFileFlagsEx(FILE *fp, const char *filename, grammar *g, int start, char *ps1, char *ps2, perrdetail *err_ret, int *flags) { struct tok_state *tok; initerr(err_ret, filename); if ((tok = PyTokenizer_FromFile(fp, ps1, ps2)) == NULL) { err_ret->error = E_NOMEM;...
false
false
false
false
false
0
mainloop_high_flow_callback(IPC_Channel* ch, void* userdata) { struct iterinfo* i = (struct iterinfo*) userdata; if (userdata == NULL){ cl_log(LOG_ERR, "userdata is NULL"); return; } i->sendingsuspended = TRUE; }
false
false
false
false
false
0
FindStringRouter( void *theEnv, char *name) { struct stringRouter *head; head = StringRouterData(theEnv)->ListOfStringRouters; while (head != NULL) { if (strcmp(head->name,name) == 0) { return(head); } head = head->next; } return(NULL); }
false
false
false
false
false
0
gcd(unsigned int a, unsigned int b) { if(a > b) return gcd(b, a); else if(b % a) return gcd(b % a, a); else return a; }
false
false
false
false
false
0
FixVectors(double **prev, double **current, int iv, int ix, int iy) { double p0[3], p1[3], p2[3]; double v0[3], v1[3], v2[3]; double temp[3]; int i; for (i=0; i<3; i++) { v0[i] = current[i][iv]; v1[i] = current[i][ix]; v2[i] = current[i][iy]; } if ( prev == NULL ) //make sure coord sys...
false
false
false
false
false
0
winbrowsefile(char *buffer) { *buffer = 0; GtkWidget * openDlg = gtk_file_chooser_dialog_new(AppName, NULL, GTK_FILE_CHOOSER_ACTION_OPEN, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, ...
false
true
false
false
true
1
text() const { kDebug() << d->severityButtons[d->currentSeverity()]->objectName(); // Prepend the pseudo-headers to the contents of the mail QString severity = d->severityButtons[d->currentSeverity()]->objectName(); QString appname = d->appcombo->currentText(); QString os = QString::fromLatin1("OS: %1 (%2...
false
false
false
false
false
0
popup_properties(struct tile *ptile) { struct tile_list *tiles; if (!ptile) { return; } tiles = tile_list_new(); if (editor_tile_is_selected(ptile)) { tile_hash_iterate(editor->selected_tile_table, sel_tile) { if (can_edit_tile_properties(sel_tile)) { tile_list_append(tiles, sel_tile)...
false
false
false
false
false
0
addHighLevelShaderMaterialFromFiles( const io::path& vertexShaderProgramFileName, const c8* vertexShaderEntryPointName, E_VERTEX_SHADER_TYPE vsCompileTarget, const io::path& pixelShaderProgramFileName, const c8* pixelShaderEntryPointName, E_PIXEL_SHADER_TYPE psCompileTarget, const io::path& geometr...
false
false
false
false
false
0
hspi_hw_setup(struct hspi_priv *hspi, struct spi_message *msg, struct spi_transfer *t) { struct spi_device *spi = msg->spi; struct device *dev = hspi->dev; u32 spcr, idiv_clk; u32 rate, best_rate, min, tmp; /* * find best IDIV/CLKCx settings */ min = ~0; best_rate = 0; spcr = 0; for (idiv_clk = ...
false
false
false
false
false
0
setDecorations(FXuint decorations){ FXuint opts=(options&~DECOR_ALL) | (decorations&DECOR_ALL); if(options!=opts){ options=opts; if(xid) setdecorations(); recalc(); } }
false
false
false
false
false
0
tm_woy(time_t stime) { int woy, fty, tm_yday; time_t time4; struct tm tm; memset(&tm, 0, sizeof(struct tm)); (void)localtime_r(&stime, &tm); tm_yday = tm.tm_yday; tm.tm_mon = 0; tm.tm_mday = 4; tm.tm_isdst = 0; /* 4 Jan is not DST */ time4 = mktime(&tm); (void)localt...
false
false
false
false
false
0
splitName(const XMLChar* qname, XMLString& uri, XMLString& localName, XMLString& prefix) { const XMLChar* p = qname; while (*p && *p != '\t') ++p; if (*p) { uri.assign(qname, p - qname); ++p; const XMLChar* loc = p; while (*p && *p != '\t') ++p; localName.assign(loc, p - loc); if (*p) prefix.assign(+...
false
false
false
true
false
1
compare(char *ls1, char **rs1, char *ls2, char **rs2) { unsigned int common, maxchars = 0; bool some_similarity = FALSE; char *s1, *s2; char *maxs1 = NULL, *maxs2 = NULL, *maxe1 = NULL, *maxe2 = NULL; char *cs1, *cs2, *start1, *end1, *end2; end1 = ls1 + strlen(ls1); end2 = ls2 + strlen(ls2); start1 = ls1; fo...
false
false
false
false
false
0
mousePressEvent(QMouseEvent* event) { QListWidgetItem* item = itemAt(event->pos()); if(event->button() != Qt::LeftButton || item == 0) { event->ignore(); } else if(item == currentItem()) { editItemColor(item); } else { setCurrentItem(item); } }
false
false
false
false
false
0
get_user_file(const ntlm_name target_name, char **username, struct ntlm_buf *key) { const char *fn; if (issuid()) return ENOENT; fn = getenv("NTLM_USER_FILE"); if (fn == NULL) return ENOENT; if (from_file(fn, target_name->domain, username, key) == 0) return 0; return ENOENT; }
false
false
false
false
false
0
_create_cluster_core_bitmap(bitstr_t **core_bitmap) { *core_bitmap = bit_alloc(cr_get_coremap_offset(node_record_count)); if (*core_bitmap == NULL) fatal("bit_alloc: malloc failure"); }
false
false
false
false
false
0
it8709_init_hardware(struct ite_dev *dev) { ite_dbg("%s called", __func__); /* disable all the interrupts */ it8709_wr(dev, it8709_rr(dev, IT85_C0IER) & ~(IT85_IEC | IT85_RFOIE | IT85_RDAIE | IT85_TLDLIE), IT85_C0IER); /* program the baud rate divisor */ it8709_wr(dev, ITE_BAUDRATE_DIVISOR & 0xff, IT85_C0...
false
false
false
false
false
0
remote_find_tracking(struct remote *remote, struct refspec *refspec) { int i; for (i = 0; i < remote->fetch_refspec_nr; i++) { struct refspec *fetch = &remote->fetch[i]; if (!fetch->dst) continue; if (fetch->pattern) { if (!prefixcmp(refspec->src, fetch->src)) { refspec->dst = xmalloc(strlen(fetc...
false
true
false
false
false
1
print_fujifilm_makervalue(struct ifd_entry *entry_ptr,int make,int model, char *prefix) { int noteversion = 0; if(entry_ptr && (PRINT_VALUE)) { noteversion = getnoteversion(); switch(noteversion) { case 1: print_fujifilm1_makervalue(en...
false
false
false
false
false
0
guess_hosts_reply(enum udp_ping_ret type, const struct gnutella_node *n, void *data) { gnet_host_t *h = data; /* * This routine must be prepared to get invoked well after the GUESS * layer was shutdown (due to previous UDP pings expiring). */ switch (type) { case UDP_PING_TIMEDOUT: /* * Host did not r...
false
false
false
false
false
0
event_cb (dc_device_t *device, dc_event_type_t event, const void *data, void *userdata) { const dc_event_progress_t *progress = (dc_event_progress_t *) data; const dc_event_devinfo_t *devinfo = (dc_event_devinfo_t *) data; const dc_event_clock_t *clock = (dc_event_clock_t *) data; const dc_event_vendor_t *vendor = ...
false
false
false
false
false
0
send_reply (GVfsJob *job) { GVfsJobDBus *dbus_job = G_VFS_JOB_DBUS (job); GVfsJobDBusClass *class; g_debug ("send_reply(%p), failed=%d (%s)\n", job, job->failed, job->failed?job->error->message:""); class = G_VFS_JOB_DBUS_GET_CLASS (job); if (job->failed) g_dbus_method_invocation_return_gerror (dbu...
false
false
false
false
false
0
__propagate_pkey_ev(struct mlx4_ib_dev *dev, int port_num, int block, u32 change_bitmap) { int i, ix, slave, err; int have_event = 0; for (slave = 0; slave < dev->dev->caps.sqp_demux; slave++) { if (slave == mlx4_master_func_num(dev->dev)) continue; if (!mlx4_is_slave_active(dev->dev, slave)) continue...
false
false
false
false
false
0
Cns_list_group_entry(dbfd, bol, group_entry, endlist, dblistptr) struct Cns_dbfd *dbfd; int bol; struct Cns_groupinfo *group_entry; int endlist; DBLISTPTR *dblistptr; { char func[21]; static char query[] = "SELECT \ GID, GROUPNAME, BANNED \ FROM Cns_groupinfo \ ORDER BY gid"; MYSQL_ROW row; strcpy (func, ...
false
false
false
false
false
0
osinfo_install_config_param_set_value_map(OsinfoInstallConfigParam *config_param, OsinfoDatamap *datamap) { g_return_if_fail(OSINFO_IS_INSTALL_CONFIG_PARAM(config_param)); if (config_param->priv->value_map != NULL) g_object_unref(G_OBJECT(config_param->priv->value_map)); config_param->priv->value_m...
false
false
false
false
false
0
linkmod(modptr) struct modstruct *modptr; { char buf[ABS_TEXT_MAX]; int command; unsigned char modify; bin_off_t offset; int symbolnum; struct symstruct **symparray; struct symstruct *symptr; setseg(0); relocsize = 2; symparray = modptr->symparray; openin(modptr->filename); ...
false
false
false
false
false
0
show_system_line_max(void) { long m = 0L; #ifdef HAVE_SYSCONF #ifdef _SC_LINE_MAX if (0L == m) m = sysconf(_SC_LINE_MAX); if (m < 0L) m = 0L; // there was an error, use LINE_MAX instead #endif #endif #ifdef LINE_MAX /* LINE_MAX is a conservative value - _SC_LINE_MAX is likely * to be larger. *...
false
false
false
false
false
0
show(void) { if (mapped()==MSFalse) { if (scrollWindow()!=0) scrollWindow()->show(); map(); } }
false
false
false
false
false
0
oserror_init(PyOSErrorObject *self, PyObject **p_args, PyObject *myerrno, PyObject *strerror, PyObject *filename #ifdef MS_WINDOWS , PyObject *winerror #endif ) { PyObject *args = *p_args; Py_ssize_t nargs = PyTuple_GET_SIZE(args); /* self->filename will ...
false
false
false
false
false
0
twl4030_charger_enable_ac(struct twl4030_bci *bci, bool enable) { int ret; if (bci->ac_mode == CHARGE_OFF) enable = false; if (enable) ret = twl4030_clear_set_boot_bci(0, TWL4030_BCIAUTOAC); else ret = twl4030_clear_set_boot_bci(TWL4030_BCIAUTOAC, 0); return ret; }
false
false
false
false
false
0
vlv_detach_power_sequencer(struct intel_dp *intel_dp) { struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp); struct drm_i915_private *dev_priv = intel_dig_port->base.base.dev->dev_private; enum pipe pipe = intel_dp->pps_pipe; i915_reg_t pp_on_reg = VLV_PIPE_PP_ON_DELAYS(pipe); edp_panel_vdd_off_s...
false
false
false
false
false
0
status_window_new(GtkWidget *parent) { GtkWidget *window; GtkWidget *alignment; GtkWidget *label; GtkStyleContext* style_context; GtkBorder padding; GtkBorder border; if (parent == NULL) return NULL; window = gtk_window_new (GTK_WINDOW_POPUP); gtk_container_set_border_width (GTK_...
false
false
false
false
false
0
tool_progress_cb(void *clientp, curl_off_t dltotal, curl_off_t dlnow, curl_off_t ultotal, curl_off_t ulnow) { /* The original progress-bar source code was written for curl by Lars Aas, and this new edition inherits some of his concepts. */ char line[MAX_BARLENGTH+1]; ...
false
false
false
false
false
0
set_vereinigung (G, n) graph *G; node *n; #endif { edge *e; int ei; node *nod = G->nodelist; node *c = n; node *stop = G->nodelist - 1; #if PRINT_LEVEL printf (" set_vereinigung (%i)", (int) (n - PG->nodelist)); fflush (stdout); #endif /* this is called only for PLUS nodes */ whil...
false
false
false
false
false
0
dispatch_image(const char *mname, const unsigned char *data, const size_t len) { char buf[PATH_MAX + 1]; int fd; sprintf(buf, "%s/driftnet-%d.%d.%s", tmpdir, (int)time(NULL), rand(), mname); fd = open(buf, O_WRONLY | O_CREAT | O_EXCL, 0644); if (fd == -1) return; write(fd, data, len); close(...
true
true
false
false
true
1
auth_get_htpasswd_auth (auth_t *authenticator, config_options_t *options) { htpasswd_auth_state *state; authenticator->authenticate = htpasswd_auth; authenticator->free = htpasswd_clear; authenticator->adduser = htpasswd_adduser; authenticator->deleteuser = htpasswd_deleteuser; authenticator->l...
false
false
false
false
false
0
ReadPrimaryElement(vtkXMLDataElement* ePrimary) { if(!this->Superclass::ReadPrimaryElement(ePrimary)) { return 0; } // Get the image's origin. if(ePrimary->GetVectorAttribute("Origin", 3, this->Origin) != 3) { this->Origin[0] = 0; this->Origin[1] = 0; this->Origin[2] = 0; } // Get the ...
false
false
false
false
false
0
ClearConfLines() { #ifdef ALLOW_JUPES struct Jupe *tempjupe; #endif #ifdef ALLOW_GLINES struct Gline *tempgline; #endif struct Userlist *tempuser; /* struct Servlist *tempserv; */ struct Botlist *tempbot; struct rHost *temphost; #if defined AUTO_ROUTING && defined SPLIT_INFO struct cHost *tempchost; #endif ...
false
false
false
false
false
0
udisks_linux_swapspace_update (UDisksLinuxSwapspace *swapspace, UDisksLinuxBlockObject *object) { UDisksMountMonitor *mount_monitor; UDisksLinuxDevice *device; UDisksMountType mount_type; gboolean active; mount_monitor = udisks_daemon_get_mount_monitor (udisks_linux_block_obj...
false
false
false
false
false
0
resetStackedDatas() { if (!current) return; int _stackWidth = stackWidth; if (allPlot->bydist) _stackWidth = stackWidth/3; for(int i = 0 ; i < allPlots.count() ; i++) { AllPlot *plot = allPlots[i]; int startIndex, stopIndex; if (plot->bydist) { startInde...
false
false
false
false
false
0
__get_txreq(struct qib_ibdev *dev, struct qib_qp *qp) { struct qib_verbs_txreq *tx; unsigned long flags; spin_lock_irqsave(&qp->s_lock, flags); spin_lock(&dev->pending_lock); if (!list_empty(&dev->txreq_free)) { struct list_head *l = dev->txreq_free.next; list_del(l); spin_unlock(&dev->pending_loc...
false
false
false
false
false
0
sanei_hp_scsi_destroy (HpScsi this,int completely) { /* Moved to hp_scsi_close(): * assert(this->fd >= 0); * DBG(3, "scsi_close: closing fd %d\n", this->fd); */ hp_scsi_close (this, completely); if ( this->devname ) sanei_hp_free (this->devname); sanei_hp_free(this); }
false
false
false
false
false
0
iTIFFSeekProc(thandle_t fd, toff_t off, int whence) { imBinFile* file_bin = (imBinFile*)fd; switch (whence) { case SEEK_SET: imBinFileSeekTo(file_bin, (unsigned long)off); break; case SEEK_CUR: imBinFileSeekOffset(file_bin, (unsigned long)off); break; case SEEK_END: imBinFileSeekFrom(fi...
false
false
false
false
false
0
sig_alarm(int) { // Only exit for the sessions which run in another process, // as the alarm handler is there to kill timed out login sessions if (getpid() == global::crashd_pid) return; exit(1); }
false
false
false
false
false
0
set_prop(VMG_ CVmUndo *undo, vm_obj_id_t self, vm_prop_id_t prop, const vm_val_t *val) { vm_tadsobj_prop *entry; vm_val_t oldval; vm_tadsobj_hdr *hdr = get_hdr(); /* look for an existing property entry */ entry = hdr->find_prop_entry(prop); /* check for an e...
false
false
false
false
false
0
MarkLiveOutputs(Thread& thread) { // Can find live outputs in the stack or in the recorded set of environments for(size_t i = 0; i < nodes.size(); i++) { nodes[i].liveOut = false; } for(Value* v = thread.registers; v < thread.frame.registers + thread.frame.prototype->registers; v++) { if(v->isFuture(...
false
false
false
false
false
0
final() { if(mode == Read) { QByteArray out; if(state == Partial) { out.resize(1); out[0] = '\r'; } return out; } else { return QByteArray(); } }
false
false
false
false
false
0
ExecuteVirtualPart (ObjStruct *inputStruct, PTreeNode *tree, int parallel) { ObjStruct *subStruct; #ifdef COMP_DEBUG DXDebug ("C", "ExecuteVirtualPart (parallel = %d)", parallel); #endif /* Execute each child */ if (!IS_CONTAINER_CLASS(inputStruct->class)) { if (ExecutePart (inputStruct, tree, parall...
false
false
false
false
false
0
sq_getfreevariable(HSQUIRRELVM v,SQInteger idx,SQUnsignedInteger nval) { SQObjectPtr &self = stack_get(v,idx); const SQChar *name = NULL; if(type(self) == OT_CLOSURE) { if(_closure(self)->_outervalues.size()>nval) { v->Push(_closure(self)->_outervalues[nval]); SQFunctionProto *fp = _funcproto(_closure(self)-...
false
false
false
false
false
0
getDefaultHeight(){ if(visible) return visible*(4+font->getFontHeight())+header->getDefaultHeight(); return FXScrollArea::getDefaultHeight(); }
false
false
false
false
false
0
DeleteAllTracksText( MIDIMultiTrack &tracks ) { int num_tracks = tracks.GetNumTracksWithEvents(); for ( int nt = 0; nt < num_tracks; ++nt ) { MIDITrack &trk = *tracks.GetTrack( nt ); int num_events = trk.GetNumEvents(); for ( int ne = 0; ne < num_events; ++ne ) { ...
false
false
false
false
false
0
OpenFile(wxFileSystem& WXUNUSED(fs), const wxString& strLocation) { wxString strMIME; if (b_ShuttingDown) return NULL; if (m_Hash) { BOINCMemFSHashObj* obj = (BOINCMemFSHashObj*)m_Hash->Get(strLocation); if (obj == NULL) { wxString right = GetProtocol(strLocation) +...
false
false
false
false
false
0
GetIdFromString(const wxString& str) { uint32 id = 0; for (unsigned i = 0; i < str.Length(); ++i) { unsigned old_id = id; id += (uint32)str.GetChar(i); id <<= 2; id ^= old_id; id -= old_id; } return (((id >> 1) + id) | 0x00000100...
false
false
false
false
false
0
procmime_get_first_text_content(MsgInfo *msginfo) { FILE *outfp = NULL; MimeInfo *mimeinfo, *partinfo; gboolean empty_ok = FALSE, short_scan = TRUE; cm_return_val_if_fail(msginfo != NULL, NULL); /* first we try to short-scan (for speed), refusing empty parts */ scan_again: if (short_scan) mimeinfo = procm...
false
false
false
false
false
0
compute_theoritical_f_nu( void ) { // We first have to collect information about genome structure. // Abbreviations are chosen according to Carole's formula. // Please notice that compared to the formula we have the beginning // and ends of neutral regions instead of 'functional regions' ae_genetic_unit* chro...
false
false
false
false
false
0
rd_check_readonly_access(REMDATA_S *rd) { if(rd && rd->read_status == 'R'){ switch(rd->type){ case RemImap: rd_open_remote(rd); if(rd->t.i.stream && !rd->t.i.stream->rdonly){ rd->read_status = 'W'; rd->access = ReadWrite; } break; default: q_status_message(SM_ORDER, 3, 5, ...
false
false
false
false
false
0
has_group(int group, struct svc_req *req) { struct authunix_parms *auth = (void *) req->rq_clntcred; unsigned int i; if (req->rq_cred.oa_flavor == AUTH_UNIX) { if (mangle(auth->aup_gid, squash_gid) == group) return TRUE; /* search groups */ for (i = 0; i < auth->aup_len; i++) if (mangle(auth-...
false
false
false
false
false
0
b_malloc(const char *file, int line, size_t size) { void *buf; #ifdef SMARTALLOC buf = sm_malloc(file, line, size); #else buf = malloc(size); #endif if (buf == NULL) { berrno be; e_msg(file, line, M_ABORT, 0, _("Out of memory: ERR=%s\n"), be.bstrerror()); } return buf; }
false
false
false
false
false
0
dotconf_get_here_document(configfile_t *configfile, const char *delimit) { /* it's a here-document: yeah, what a cool feature ;) */ unsigned int limit_len; char here_string; char buffer[CFG_BUFSIZE]; char *here_doc = 0; char here_limit[9]; /* max length for here-document delimiter: 8 */ st...
false
false
false
false
true
1
flat() { if (sequenceHasBeenSet) { double v = sequence[nInSeq++]; if (nInSeq >= sequence.size() ) sequenceHasBeenSet = false; return v; } if ( !nextHasBeenSet ) { std::cout << "Attempt to use NonRandomEngine without setting next random!\n"; exit(1); } double a = nextRandom; nextHasB...
false
false
false
false
false
0
rio_lock_device(struct rio_mport *port, u16 destid, u8 hopcount, int wait_ms) { u32 result; int tcnt = 0; /* Attempt to acquire device lock */ rio_mport_write_config_32(port, destid, hopcount, RIO_HOST_DID_LOCK_CSR, port->host_deviceid); rio_mport_read_config_32(port, destid, hopcount, RIO_HOST_D...
false
false
false
false
false
0
session_finalize (GObject *object) { Session *self = SESSION (object); int i; if (self->priv->config) g_object_unref (self->priv->config); if (self->priv->display_server) g_object_unref (self->priv->display_server); if (self->priv->pid) kill (self->priv->pid, SIGKILL); c...
false
false
false
false
false
0
rational_sample(struct isl_basic_set *bset) { struct isl_tab *tab; struct isl_vec *sample; if (!bset) return NULL; tab = isl_tab_from_basic_set(bset, 0); sample = isl_tab_get_sample_value(tab); isl_tab_free(tab); isl_basic_set_free(bset); return sample; }
false
false
false
false
false
0
ovl_set_regs( RadeonDriverData *rdrv, RadeonOverlayLayerData *rovl ) { RadeonDeviceData *rdev = rdrv->device_data; volatile u8 *mmio = rdrv->mmio_base; radeon_waitfifo( rdrv, rdev, 1 ); radeon_out32( mmio, OV0_REG_LOAD_CNTL, REG_LD_CTL_LOCK ); while(!(radeon_in32(...
false
false
false
false
false
0
CreateRadianceProbesRenderer(const Camera *camera, SurfaceIntegrator *surf, VolumeIntegrator *vol, const ParamSet &params) { bool includeDirect = params.FindOneBool("directlighting", true); bool includeIndirect = params.FindOneBool("indirectlighting", true); int lmax = params.FindOneInt("lma...
false
false
false
false
false
0
removeProperty(int propertyID, DOM::DOMString* old) { if(!m_lstValues) return; bool changed = false; static QHash<int, PropertyLonghand> shorthandMap; if (shorthandMap.isEmpty()) initShorthandMap(shorthandMap); PropertyLonghand longhand = shorthandMap.value(propertyID); if (lo...
false
false
false
false
false
0
read_line( void *fdata, int y, char *dst ) { if (TIFFReadScanline((TIFF *)fdata, (tdata_t)dst, y, 0) < 0) return 1; return 0; }
false
false
false
false
false
0
__fimc_md_modify_pipeline(struct media_entity *entity, bool enable) { struct exynos_video_entity *ve; struct fimc_pipeline *p; struct video_device *vdev; int ret; vdev = media_entity_to_video_device(entity); if (vdev->entity.use_count == 0) return 0; ve = vdev_to_exynos_video_entity(vdev); p = to_fimc_pipel...
false
false
false
false
false
0
MakeBiggestPart(int i, int type) { uint64_t start = UINT64_C(1); // starting point for each search uint64_t firstBlock; // first block in a segment uint64_t lastBlock; // last block in a segment uint64_t segmentSize; // size of segment in blocks uint64_t selectedSegment = UINT64_C(0); // location of larg...
false
false
false
false
false
0
store_pwm(struct device *dev, struct device_attribute *da, const char *buf, size_t count) { struct sensor_device_attribute *attr = to_sensor_dev_attr(da); struct w83781d_data *data = dev_get_drvdata(dev); int nr = attr->index; unsigned long val; int err; err = kstrtoul(buf, 10, &val); if (err) return err; ...
false
false
false
false
false
0
writeDouble(double x, ostream &out) { if (x == JAGS_NA) { out << "NA"; } else if (jags_isnan(x)) { out << "NaN"; } else if (!jags_finite(x)) { if (x > 0) out << "Inf"; else out << "-Inf"; } else { out << x; } }
false
false
false
false
false
0
get_annotationsButtonClicked() { int i, awake = 1, filenum, marker_start, marker_end; struct annotationblock *annotation; if((epoch_cntr < 2) || (zscore_pages < 1)) { return; } marker_start = curve1->getMarker1Position() * zscore_pages; if(marker_start < 0) { marker_s...
false
false
false
false
false
0