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
reset_dialog(GncGWENGui *gui) { gboolean cache_passwords; g_return_if_fail(gui); ENTER("gui=%p", gui); gtk_entry_set_text(GTK_ENTRY(gui->top_entry), ""); gtk_entry_set_text(GTK_ENTRY(gui->second_entry), ""); g_list_foreach(gui->progresses, (GFunc) free_progress, NULL); g_list_free(gui->pr...
false
false
false
false
false
0
ReverseBytesInPlace(unsigned char *inOutData,const unsigned int length) { unsigned char temp; BitSize_t i; for (i=0; i < (length>>1); i++) { temp = inOutData[i]; inOutData[i]=inOutData[length-i-1]; inOutData[length-i-1]=temp; } }
false
false
false
false
false
0
show_wlan(struct wlan_info *wlan) { if (verbose) { printf("Wireless LAN card information:\n"); printf("Components:\n"); printf(" NICID: 0x%04x v%u.%u.%u\n", wlan->nicid.platform, wlan->nicid.major, wlan->nicid.minor, wlan->nicid.variant); printf(" PRIID: 0x%04x v%u.%u.%u\n", wlan->...
false
false
false
false
false
0
set_mt_usage(Block *bp) { for ( ; bp ; bp=bp->next ) { set_mt_usage(bp->inner); if (bp->outer && bp->outer->hmdf && !is_delete_hmdf(bp->outer)) { if (bp->kind!=EMT) bp->usage=USE_MT; else bp->usage=USE_EMT; } } }
false
false
false
false
false
0
pcie_pme_walk_bus(struct pci_bus *bus) { struct pci_dev *dev; bool ret = false; list_for_each_entry(dev, &bus->devices, bus_list) { /* Skip PCIe devices in case we started from a root port. */ if (!pci_is_pcie(dev) && pci_check_pme_status(dev)) { if (dev->pme_poll) dev->pme_poll = false; pci_wakeup_e...
false
false
false
false
false
0
set_field_iterator() { DBUG_ENTER("Field_iterator_table_ref::set_field_iterator"); /* If the table reference we are iterating over is a natural join, or it is an operand of a natural join, and TABLE_LIST::join_columns contains all the columns of the join operand, then we pick the columns from TABLE_...
false
false
false
false
false
0
combobox_set_value_from_arrow_key(GtkComboBox *combobox, guint keyval) /* used from key_press events upon gtk_combo_box_entry with one text column (gtk_combo_box_new_text() and with GtkComboBoxEntry's for instance), make sure that up and down arrow keys behave the same as old with old gtk_combo widgets: ...
false
false
false
false
false
0
PyMethod_New(PyObject *func, PyObject *self) { PyMethodObject *im; if (self == NULL) { PyErr_BadInternalCall(); return NULL; } im = free_list; if (im != NULL) { free_list = (PyMethodObject *)(im->im_self); (void)PyObject_INIT(im, &PyMethod_Type); numfree--; ...
false
false
false
false
false
0
Open( GDALOpenInfo * poOpenInfo ) { /* -------------------------------------------------------------------- */ /* First we check to see if the file has the expected header */ /* bytes. For now we expect the XPM file to start with a line */ /* containing the letters XPM, and to have "static" i...
false
false
false
false
false
0
pixcmapShiftIntensity(PIXCMAP *cmap, l_float32 fraction) { l_int32 i, ncolors, rval, gval, bval; PROCNAME("pixcmapShiftIntensity"); if (!cmap) return ERROR_INT("cmap not defined", procName, 1); if (fraction < -1.0 || fraction > 1.0) return ERROR_INT("fraction not...
false
false
false
false
false
0
ajGraphicsDrawarcArc(PLFLT xcentre, PLFLT ycentre, PLFLT radius, PLFLT startangle, PLFLT endangle) { PLFLT angle; ajuint i; PLFLT x[361]; PLFLT y[361]; ajuint numofpoints; PLFLT stopangle = endangle; if(endangle < startangle) stopangle += 360.0; if((st...
false
false
false
false
false
0
addarg (const char *cp) { if (argcount >= ARGLISTLEN) { fprintf (stderr, _("rpcgen: too many defines\n")); crash (); /*NOTREACHED */ } arglist[argcount++] = cp; }
false
false
false
false
false
0
HuffmanTree_make2DTree(HuffmanTree* tree) { unsigned nodefilled = 0; /*up to which node it is filled*/ unsigned treepos = 0; /*position in the tree (1 of the numcodes columns)*/ unsigned n, i; uivector_resize(&tree->tree2d, tree->numcodes * 2); /*convert tree1d[] to tree2d[][]. In the 2D array, a value of ...
false
false
false
false
true
1
slotButtonClicked(int button) { if (button == KDialog::User1) { done (KDialog::User1); return; } KDialog::slotButtonClicked(button); }
false
false
false
false
false
0
operator==(const TimeZoneRule& that) const { return ((this == &that) || (typeid(*this) == typeid(that) && fName == that.fName && fRawOffset == that.fRawOffset && fDSTSavings == that.fDSTSavings)); }
false
false
false
false
false
0
SelectT2AddrModeExclusive(SDValue N, SDValue &Base, SDValue &OffImm) { // This *must* succeed since it's used for the irreplaceable ldrex and strex // instructions. Base = N; OffImm = CurDAG->getTargetConstant(0, SDLoc(N), MVT::i32); if (N.getOpcode() != ISD::A...
false
false
false
false
false
0
draw_rubberband(ArtTreeWidget w) { Widget pw = XtParent(w); long width = w->core.width; /* need to loose */ long height = w->core.height; /* unsignedness */ long pwidth = pw->core.width; long pheight = pw->core.height; int x, y; unsigned int dx, dy; x = - w->core.x - w->cor...
false
false
false
false
false
0
BN_GF2m_mod_inv_arr(BIGNUM *r, const BIGNUM *xx, const int p[], BN_CTX *ctx) { BIGNUM *field; int ret = 0; bn_check_top(xx); BN_CTX_start(ctx); if ((field = BN_CTX_get(ctx)) == NULL) goto err; if (!BN_GF2m_arr2poly(p, field)) goto err; ret = BN_GF2m_mod_inv(r, xx, field, ctx); bn_check_top(r); err: BN_CTX...
false
false
false
false
false
0
lRemoveElem(lList *lp, lListElem **ep1) { lListElem *ep = NULL; DENTER(CULL_LAYER, "lRemoveElem"); if (lp == NULL || ep1 == NULL || *ep1 == NULL) { DRETURN(-1); } ep = *ep1; if (lp->descr != ep->descr) { CRITICAL((SGE_EVENT, "Removing element from other list !!!\n")); DEXIT; ...
false
false
false
false
false
0
MPI_Recv(void *buf, int count, MPI_Datatype datatype, int source, int tag, MPI_Comm comm, MPI_Status *status) { FUNCTION_ENTRY; MPI_Recv_prolog(buf, count, datatype, source, tag, comm, status); int ret = MPI_Recv_core(buf, count, datatype, source, tag, comm, status); MPI_Recv_epilog(buf, count, datatype, source...
false
false
false
false
false
0
_elm_direction_arrows_eval(Smart_Data *sd) { Eina_Bool go_left = EINA_TRUE, go_right = EINA_TRUE; Eina_Bool go_up = EINA_TRUE, go_down = EINA_TRUE; Evas_Coord x = 0, y = 0, mx = 0, my = 0, minx = 0, miny = 0; if (!sd->edje_obj || !sd->pan_obj) return; sd->pan_func.max_get(sd->pan_obj, &mx, &my); ...
false
false
false
false
false
0
plrdata_slot_init(struct plrdata_slot *plrdata, const char *name) { fc_assert_ret(plrdata->name == NULL); plrdata->name = fc_calloc(MAX_LEN_NAME, sizeof(plrdata->name)); plrdata_slot_replace(plrdata, name); }
false
false
false
false
false
0
ixgbe_free_tx_resources(struct ixgbe_ring *tx_ring) { ixgbe_clean_tx_ring(tx_ring); vfree(tx_ring->tx_buffer_info); tx_ring->tx_buffer_info = NULL; /* if not set, then don't free */ if (!tx_ring->desc) return; dma_free_coherent(tx_ring->dev, tx_ring->size, tx_ring->desc, tx_ring->dma); tx_ring->desc =...
false
false
false
false
false
0
EvaluateComponents( vtkDataArray *scalars, vtkIdType id ) { int keepCell = 0; int numComp = scalars->GetNumberOfComponents(); int c; switch ( this->ComponentMode ) { case VTK_COMPONENT_MODE_USE_SELECTED: c = (this->SelectedComponent < numComp)?(this->SelectedComponent):(0); keepCell = ...
false
false
false
false
false
0
qib_cancel_sends(struct qib_pportdata *ppd) { struct qib_devdata *dd = ppd->dd; struct qib_ctxtdata *rcd; unsigned long flags; unsigned ctxt; unsigned i; unsigned last; /* * Tell PSM to disarm buffers again before trying to reuse them. * We need to be sure the rcd doesn't change out from under us * while ...
false
false
false
false
false
0
poly_genkey(struct aead_request *req) { struct crypto_aead *tfm = crypto_aead_reqtfm(req); struct chachapoly_ctx *ctx = crypto_aead_ctx(tfm); struct chachapoly_req_ctx *rctx = aead_request_ctx(req); struct chacha_req *creq = &rctx->u.chacha; int err; rctx->assoclen = req->assoclen; if (crypto_aead_ivsize(tfm) ...
false
false
false
false
false
0
dm_requeue_original_request(struct mapped_device *md, struct request *rq) { int rw = rq_data_dir(rq); rq_end_stats(md, rq); dm_unprep_request(rq); if (!rq->q->mq_ops) old_requeue_request(rq); else { blk_mq_requeue_request(rq); blk_mq_kick_requeue_list(rq->q); } rq_completed(md, rw, false); }
false
false
false
false
false
0
mono_identifier_unescape_type_name_chars(char* identifier) { char *w, *r; if (!identifier) return NULL; for (w = r = identifier; *r != 0; r++) { char c = *r; if (c == '\\') { r++; if (*r == 0) break; c = *r; } *w = c; w++; } if (w != r) *w = 0; return identifier; }
false
false
false
false
false
0
iscsi_sysfs_for_each_flashnode(void *data, uint32_t host_no, int *nr_found, iscsi_sysfs_flashnode_op_fn *fn) { struct dirent **namelist; int rc = 0, i, n; struct flashnode_rec *fnode; uint32_t flashnode_idx; uint32_t hostno; fnode = malloc(sizeof(*fnode)); if (!fnode) return ISCSI_ERR_NOMEM; n = scan...
false
false
false
false
false
0
includeInRadius(FXdouble x,FXdouble y,FXdouble z){ register FXdouble dx,dy,dz,dist; if(0.0<=radius){ dx=x-center.x; dy=y-center.y; dz=z-center.z; dist=sqrt(dx*dx+dy*dy+dz*dz); if(radius<dist) radius=dist; return *this; } center.x=x; center.y=y; center.z=z; radius=0.0; return *t...
false
false
false
false
false
0
parseparm(valptr) long *valptr; { register char c = token[fieldx]; if (isdigit(c) || c == '-') { *valptr = scansgnint(); return TRUE; } else { switch (c) { case 'P': fieldx++; *valptr = doabspitch(); return TRUE; case 'A': ...
false
false
false
false
false
0
sf_set_reply_mode(unsigned char buf[], int buflen) { unsigned char partition; if (buflen < 5) { trace_ds(" error: wrong field length %d\n", buflen); return PDS_BAD_CMD; } partition = buf[3]; trace_ds("(0x%02x)", partition); if (partition != 0x00) { trace_ds(" error: illegal partition\n"); return PDS_BAD...
false
false
false
false
false
0
mcp251x_hw_reset(struct spi_device *spi) { struct mcp251x_priv *priv = spi_get_drvdata(spi); u8 reg; int ret; /* Wait for oscillator startup timer after power up */ mdelay(MCP251X_OST_DELAY_MS); priv->spi_tx_buf[0] = INSTRUCTION_RESET; ret = mcp251x_spi_trans(spi, 1); if (ret) return ret; /* Wait for osci...
false
false
false
false
false
0
step_launch_state_create(slurm_step_ctx_t *ctx) { struct step_launch_state *sls; slurm_step_layout_t *layout = ctx->step_resp->step_layout; int ii; sls = xmalloc(sizeof(struct step_launch_state)); sls->slurmctld_socket_fd = -1; #if defined HAVE_BGQ /* This means we are on an emulated system, so only launch 1 ...
false
false
false
false
false
0
check_symlinks(struct archive_write_disk *a) { #if !defined(HAVE_LSTAT) /* Platform doesn't have lstat, so we can't look for symlinks. */ (void)a; /* UNUSED */ return (ARCHIVE_OK); #else char *pn, *p; char c; int r; struct stat st; /* * Guard against symlink tricks. Reject any arc...
false
false
false
false
false
0
CreateLinksToSubprojects( cmGeneratedFileStream& fout, const std::string& baseDir) { // for each sub project create a linked resource to the source dir // - only if it is an out-of-source build this->AppendLinkedResource(fout, "[Subprojects]", "virtual:/virtual"...
false
false
false
false
false
0
MR_projectTreeOntoSet(Tree *tree,int ck,set *ckset) #else void MR_projectTreeOntoSet(tree,ck,ckset) Tree *tree; int ck; set *ckset; #endif { if (tree == NULL) return; require(tree->token != EpToken,"MR_projectTreeOntoSet: EpToken unexpected\n"); MR_projectTreeOntoSet(tree->right,ck,ckset); ...
false
false
false
false
false
0
containsAlertUuid(const QString &alertUid) { for(int i = 0; i < alerts.count(); ++i) { if (alerts.at(i).uuid() == alertUid) return true; } return false; }
false
false
false
false
false
0
efi_init(void) { efi_char16_t *c16; char vendor[100] = "unknown"; int i = 0; void *tmp; #ifdef CONFIG_X86_32 if (boot_params.efi_info.efi_systab_hi || boot_params.efi_info.efi_memmap_hi) { pr_info("Table located above 4GB, disabling EFI.\n"); return; } efi_phys.systab = (efi_system_table_t *)boot_param...
true
true
false
false
false
1
AddVertex( GLUtesselator *tess, GLdouble coords[3], void *data ) { GLUhalfEdge *e; e = tess->lastEdge; if( e == NULL ) { /* Make a self-loop (one vertex, one edge). */ e = __gl_meshMakeEdge( tess->mesh ); if (e == NULL) return 0; if ( !__gl_meshSplice( e, e->Sym ) ) return 0; } else { /* C...
false
false
false
false
false
0
gst_real_audio_demux_handle_seek (GstRealAudioDemux * demux, GstEvent * event) { GstFormat format; GstSeekFlags flags; GstSeekType cur_type, stop_type; gboolean flush, update; gdouble rate; guint64 seek_pos; gint64 cur, stop; if (!demux->seekable) goto not_seekable; if (demux->byterate_num == 0 ...
false
false
false
false
false
0
refmpn_lshift (mp_ptr rp, mp_srcptr sp, mp_size_t size, unsigned shift) { mp_limb_t ret; mp_size_t i; ASSERT (refmpn_overlap_high_to_low_p (rp, sp, size)); ASSERT (size >= 1); ASSERT (shift >= 1 && shift < GMP_NUMB_BITS); ASSERT_MPN (sp, size); ret = lshift_make (CNST_LIMB(0), sp[size-1], shift); f...
false
false
false
false
true
1
customer_dom_tree_create (GncCustomer *cust) { xmlNodePtr ret, kvpnode; gnc_numeric num; GncBillTerm *term; GncTaxTable *taxtable; ret = xmlNewNode(NULL, BAD_CAST gnc_customer_string); xmlSetProp(ret, BAD_CAST "version", BAD_CAST customer_version_string); xmlAddChild(ret, guid_to_dom_tree(...
false
false
false
false
false
0
clear_current_break(TriggerObject *f) { if(active.next == 0) return; if(value == break_on_this && (!f || (f && f==active.next->f))) { #ifdef __DEBUG_CYCLE_COUNTER__ cout << "Cycle_Counter::clear_current_break "; cout << "current cycle " << hex << setw(16) << setfill('0') << value << endl; cout <<...
false
false
false
false
false
0
clip_polygons(Clip *clip, vertex_list *vtxl) { poly *point; vertex **vertex_set; vertex_set = (vertex **)malloc(vtxl->numvtx * sizeof(vertex)); { int count = 0; vertex *vert; vert = vtxl->head; while(vert!=NULL) { vertex_set[count] = vert; vert = vert->next; ...
false
true
false
false
true
1
nvme_nvm_rqtocmd(struct request *rq, struct nvm_rq *rqd, struct nvme_ns *ns, struct nvme_nvm_command *c) { c->ph_rw.opcode = rqd->opcode; c->ph_rw.nsid = cpu_to_le32(ns->ns_id); c->ph_rw.spba = cpu_to_le64(rqd->ppa_addr.ppa); c->ph_rw.control = cpu_to_le16(rqd->flags); c->ph_rw.length = cpu_to_le16(rqd->nr_pag...
false
false
false
false
false
0
save_valgrind_log (Alleyoop *grind, const char *filename, int flags) { GtkWidget *dialog; int response; int fd; flags |= O_WRONLY | O_CREAT | O_TRUNC; retry: if ((fd = open (filename, flags, 0666)) != -1) { int errnosav; if (vg_tool_view_save_log ((VgToolView *) grind->view, fd) == -1) { errnosav = ...
false
false
false
false
false
0
chess_view3_d_get_numbering_texture (ChessView3D* self) { GLuint result; GLuint _tmp0_; GLuint _tmp2_; g_return_val_if_fail (self != NULL, 0U); _tmp0_ = self->priv->_numbering_texture; if (_tmp0_ == ((GLuint) 0)) { GLuint _tmp1_ = 0U; _tmp1_ = chess_view3_d_make_numbering_texture (self); self->priv->_number...
false
false
false
false
false
0
UpdateByCustom(std::string const& custom) { std::vector<std::string> git_custom_command; cmSystemTools::ExpandListArgument(custom, git_custom_command, true); std::vector<char const*> git_custom; for(std::vector<std::string>::const_iterator i = git_custom_command.begin(); i != git_custom_command.end(); +...
false
false
false
false
false
0
_rtl92s_firmware_header_map_rftype(struct ieee80211_hw *hw) { struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_phy *rtlphy = &(rtlpriv->phy); switch (rtlphy->rf_type) { case RF_1T1R: return 0x11; case RF_1T2R: return 0x12; case RF_2T2R: return 0x22; default: RT_TRACE(rtlpriv, COMP_INIT, DBG_EMERG, "U...
false
false
false
false
false
0
assert_commit_message_contains(const char *revision, const char *fragment) { git_commit *commit; cl_git_pass(git_revparse_single((git_object**)&commit, repo, revision)); cl_assert(strstr(git_commit_message(commit), fragment) != NULL); git_commit_free(commit); }
false
false
false
false
false
0
dacs_end(void) { int i; /* * The callouts must be done first because afterwards logging is shutdown. */ for (i = 0; i < dsvec_len(dacs_atexit_callouts); i++) { Atexit_entry *e; e = (Atexit_entry *) dsvec_ptr_index(dacs_atexit_callouts, i); (e->func)(e->arg); } if (verbose_level) { char *msg; Fra...
false
false
false
false
false
0
hash_function(const char *string,size_t num) { size_t result = num; while(*string){ result = (result*0x00000129)^*string; string++; } return result; }
false
false
false
false
false
0
setkey_hdl(struct adapter *padapter, u8 *pbuf) { unsigned short ctrl; struct setkey_parm *pparm = (struct setkey_parm *)pbuf; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); unsigned char null_sta[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00};...
false
false
false
false
false
0
linfnorm() const { FValue norm = 0; for (const_iterator i = cbegin(); i != cend(); ++i) { float absValue = abs(i->second); if (absValue > norm) norm = absValue; } for (size_t i = 0; i < m_coreFeatures.size(); ++i) { float absValue = abs(m_coreFeatures[i]); if (absValue > norm) ...
false
false
false
false
false
0
OnSelectAll() { if (m_Document->GetEditable ()) m_Document->GetView ()->OnSelectAll (); }
false
false
false
false
false
0
nouveau_connector_detect_lvds(struct drm_connector *connector, bool force) { struct drm_device *dev = connector->dev; struct nouveau_drm *drm = nouveau_drm(dev); struct nouveau_connector *nv_connector = nouveau_connector(connector); struct nouveau_encoder *nv_encoder = NULL; enum drm_connector_status status = conn...
false
false
false
false
false
0
check_jobs_status_condor(struct itable **running_jobs, struct itable **idle_jobs, struct itable **bad_jobs) { FILE *fp; char line[128]; /** Sample condor_q formatting. Source: https://condor-wiki.cs.wisc.edu/index.cgi/wiki?p=HowToWriteaCondorqWrapper char *cmd = "condor_q \ -format '%4d.' ClusterId \ -forma...
true
true
false
true
true
1
advansys_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) { int err, ioport; struct Scsi_Host *shost; struct asc_board *board; err = pci_enable_device(pdev); if (err) goto fail; err = pci_request_regions(pdev, DRV_NAME); if (err) goto disable_device; pci_set_master(pdev); advansys...
false
false
false
false
false
0
mpris_playlists_dbus_proxy_get_ActivePlaylist (MprisPlaylists* self) { GVariant *_inner_reply; ActivePlaylistContainer* _result; ActivePlaylistContainer _tmp39_; GVariantIter _tmp40_; GVariant* _tmp41_; GVariant* _tmp42_; PlaylistDetails _tmp43_; GVariantIter _tmp44_; GVariant* _tmp45_; GVariant* _tmp46_; GV...
false
false
false
false
false
0
parse_parameter(int *argc, char ***argv) { gint i, j, k; cm_return_if_fail(argc != NULL); cm_return_if_fail(argv != NULL); for (i = 1; i < *argc;) { if (strcmp("--debug", (*argv)[i]) == 0) { debug_set_mode(TRUE); (*argv)[i] = NULL; } i += 1; } /* Remove NULL args from argv[] for further processin...
false
false
false
false
false
0
printXLoci(FILE* f, FILE* fc, int qcount, GList<GXLocus>& xloci, GFaSeqGet *faseq) { for (int l=0;l<xloci.Count();l++) { if (xloci[l]->qloci.Count()==0) continue; GXLocus& xloc=*(xloci[l]); xloc.checkContainment(); tssCluster(xloc);//cluster and assign tss_id and cds_id to each xconsensus in xloc ...
false
false
false
false
false
0
maybe_emit_filelist_progress(int count) { if (INFO_GTE(FLIST, 2) && show_filelist_p() && (count % 100) == 0) emit_filelist_progress(count); }
false
false
false
false
false
0
selectionChanged(const QItemSelection &s) { int row = -1; if (s.size() >= 1) row = s[0].top(); selected = -1; if (row >= 0 && row <= d->history.size()) if (! v->isRowHidden(row)) selected = d->history.size() - row - 1; if (d->historyPos != selected) d->toHistory(selected); hiliteSearch(); ...
false
false
false
false
false
0
MemoryHandle_free(MemoryHandle_t *handle) { int i; dbg_printf("MEM: NumBlocks: %u\n", handle->NumBlocks); for ( i=0; i < handle->NumBlocks; i++ ) { free(handle->memblock[i]); } handle->NumBlocks = 0; handle->CurrentBlock = 0; handle->Allocted = 0; free((void *)handle->memblock); handle->memblock = NULL; ...
false
false
false
false
false
0
gx_default_gray_fast_encode(gx_device * dev, const gx_color_value cv[]) { COLROUND_VARS; COLROUND_SETUP(dev->color_info.depth); return COLROUND_ROUND(cv[0]); }
false
false
false
false
false
0
select_connected_service(struct session_info *info, struct service_entry *entry) { enum connman_session_state state; state = service_to_session_state(entry->state); if (is_type_matching_state(&state, info->config.type) == FALSE) return; info->state = state; info->entry = entry; info->entry->reason = inf...
false
false
false
false
false
0
DataModelImport(const gchar* data, bool random_access, const Glib::RefPtr<const Set>& options) : //Based on the implementation of gda_data_model_import_new_file(): //The ASSERT_DICT(NULL) is very odd. I suspect that gda_data_model_import_new_file() cannot work. // Mark this class as non-derived to allow C++ vfunc...
false
false
false
false
false
0
writeTopQual( const uchar* qualities, size_t qualsPerBase, char* dest ) const{ for( CI(SegmentPair) i = blocks.begin(); i < blocks.end(); ++i ){ if( i > blocks.begin() ){ // between each pair of aligned blocks: CI(SegmentPair) j = i - 1; // assume we're not doing translated alignment ...
false
false
false
false
false
0
find_cmd(struct list_head_s * start_head, const char ** tokens, int count) { struct list_head_s * head = start_head; struct uish_comm_s * result = NULL; int curr_tok = 0; int curr_tok_len = 0; DBG(0, "tokens: %p count: %d\n", tokens, count); if (tokens == NULL || count <= 0) return NU...
false
false
false
false
false
0
ap_lingering_close(conn_rec *c) { char dummybuf[512]; apr_size_t nbytes; apr_time_t timeup = 0; apr_socket_t *csd = ap_get_conn_socket(c); if (ap_start_lingering_close(c)) { return; } /* Read available data from the client whilst it continues sending * it, for a maximum time o...
false
false
false
false
false
0
RemoveEventWaittingList(P_OSTCB ptcb) { P_ECB pecb; pecb = &EventTbl[ptcb->eventID]; /* Get event control block */ /* Is there only one item in event waiting list? */ if((ptcb->waitNext == Co_NULL) && (ptcb->waitPrev == Co_NULL)) { pecb->eventTCBList = Co_NULL; /* Yes,...
false
false
false
false
false
0
ath9k_hw_ani_ofdm_err_trigger_old(struct ath_hw *ah) { struct ar5416AniState *aniState; int32_t rssi; aniState = &ah->curchan->ani; if (aniState->noiseImmunityLevel < HAL_NOISE_IMMUNE_MAX) { if (ath9k_hw_ani_control(ah, ATH9K_ANI_NOISE_IMMUNITY_LEVEL, aniState->noiseImmunityLevel + 1)) { return; } }...
false
false
false
false
false
0
UpdateAutoDownPriority() { if (!IsAutoDownPriority()) { return; } if (GetSourceCount() <= theApp->downloadqueue->GetRareFileThreshold()) { if ( GetDownPriority() != PR_HIGH ) SetDownPriority(PR_HIGH, false, false); } else if (GetSourceCount() < theApp->downloadqueue->GetCommonFileThreshold()) { if ( GetDow...
false
false
false
false
false
0
elm_toolbar_item_object_get(const Elm_Object_Item *it) { ELM_OBJ_ITEM_CHECK_OR_RETURN(it, NULL); Widget_Data *wd; Evas_Object *obj; Elm_Toolbar_Item *item = (Elm_Toolbar_Item *)it; obj = WIDGET(item); wd = elm_widget_data_get(obj); if (!wd) return NULL; return VIEW(item); }
false
false
false
false
false
0
cfqq_close(struct cfq_data *cfqd, struct cfq_queue *cur_cfqq) { struct rb_root *root = &cfqd->prio_trees[cur_cfqq->org_ioprio]; struct rb_node *parent, *node; struct cfq_queue *__cfqq; sector_t sector = cfqd->last_position; if (RB_EMPTY_ROOT(root)) return NULL; /* * First, if we find a request start...
false
false
false
false
false
0
radeon_mem_free(struct drm_device *dev, void *data, struct drm_file *file_priv) { drm_radeon_private_t *dev_priv = dev->dev_private; drm_radeon_mem_free_t *memfree = data; struct mem_block *block, **heap; if (!dev_priv) { DRM_ERROR("called with no initialization\n"); return -EINVAL; } heap = get_heap(dev_pr...
false
false
false
false
false
0
sym_read_line(const char *prompt, char **input) { #if defined(HAS_READLINE) && ((RL_VERSION_MAJOR == 5 && \ RL_VERSION_MINOR >= 2) || \ (RL_VERSION_MAJOR >= 6)) if (*input) FREE(*input); while(true) { *input = readline(prompt); if (**input) { add_history(*input); if((...
false
false
false
false
false
0
testAutoReleasePool() { AutoReleasePool<TestObj> arp; arp.add(new TestObj); arp.add(new TestObj); assert (TestObj::count() == 2); arp.release(); assert (TestObj::count() == 0); }
false
false
false
false
false
0
gradient() const { Gradient gradient; gradient.setRed( m_ui.shadeRed->points() ); gradient.setGreen( m_ui.shadeGreen->points() ); gradient.setBlue( m_ui.shadeBlue->points() ); return gradient; }
false
false
false
false
false
0
asroot_iface_init_os(int ifindex, char *name, int *fd) { int rc; /* Open listening socket to receive/send frames */ if ((*fd = socket(PF_PACKET, SOCK_RAW, htons(ETH_P_ALL))) < 0) { rc = errno; return rc; } struct sockaddr_ll sa = { .sll_family = AF_PACKET, .sll_ifindex = ifindex }; if (bind(*fd, (...
false
false
false
false
false
0
test_other_fax (void) { EContact *contact; const gchar *phone; contact = e_contact_new_from_vcard (VCARD); phone = e_contact_get_const (contact, E_CONTACT_PHONE_OTHER_FAX); g_assert (phone != NULL); g_assert_cmpstr (phone, ==, "321-321-4321"); g_object_unref (contact); }
false
false
false
false
false
0
php_dom_iterator_move_forward(zend_object_iterator *iter TSRMLS_DC) { zval *curobj, *curattr = NULL; zval *object; xmlNodePtr curnode = NULL, basenode; dom_object *intern; dom_object *nnmap; dom_nnodemap_object *objmap; int ret, previndex=0; HashTable *nodeht; zval **entry; php_dom_iterator *iterator = (php_...
false
false
false
false
false
0
minefield_has_flag_warning (Minefield* self, guint x, guint y) { gboolean result = FALSE; guint _tmp0_ = 0U; guint _tmp1_ = 0U; gboolean _tmp2_ = FALSE; guint n_mines = 0U; guint n_flags = 0U; guint _tmp20_ = 0U; guint _tmp21_ = 0U; g_return_val_if_fail (self != NULL, FALSE); _tmp0_ = x; _tmp1_ = y; _tmp2_ ...
false
false
false
false
false
0
_tp_account_got_all_cb (TpProxy *proxy, GHashTable *properties, const GError *error, gpointer user_data, GObject *weak_object) { TpAccount *self = TP_ACCOUNT (weak_object); DEBUG ("Got whole set of properties for %s", tp_proxy_get_object_path (self)); if (error != NULL) { DEBUG (...
false
false
false
false
false
0
Remove(MachinePassRegistryNode *Node) { for (MachinePassRegistryNode **I = &List; *I; I = (*I)->getNextAddress()) { if (*I == Node) { if (Listener) Listener->NotifyRemove(Node->getName()); *I = (*I)->getNext(); break; } } }
false
false
false
false
false
0
set_security_requirements(const struct ast_channel *requestor, struct ast_channel *out) { int ops[2][2] = { {AST_OPTION_SECURE_SIGNALING, 0}, {AST_OPTION_SECURE_MEDIA, 0}, }; int i; struct ast_channel *r = (struct ast_channel *) requestor; /* UGLY */ struct ast_datastore *ds; if (!requestor || !out) { retu...
true
true
false
false
false
1
setkey_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf) { unsigned short ctrl; const struct setkey_parm *pparm = (struct setkey_parm *)pbuf; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info; unsigned char null_sta[] = {0x00, 0x00, 0x00, 0x00, 0x0...
false
false
false
false
false
0
evt_pauser_task_is_complete (sc_gameref_t game, sc_int event) { const sc_prop_setref_t bundle = gs_get_bundle (game); sc_vartype_t vt_key[3]; sc_int pausetask; sc_bool completed, pause; vt_key[0].string = "Events"; vt_key[1].integer = event; vt_key[2].string = "PauseTask"; pausetask = prop_get_integer...
false
false
false
false
false
0
OnIdle(wxIdleEvent& event) { // // Do control focus detection here. // wxWindow* focused = FindFocus(); // This strange focus thing is a workaround for wxGTK wxListBox focus // reporting bug. if ( m_curFocus == 0 && focused != m_edValue && focused != m_butAdd && focused != m_butUp...
false
false
false
false
false
0
setup_activ_for_eval(Program * prog) { Var *env; if (!push_activation()) return 0; RUN_ACTIV.prog = prog; RUN_ACTIV.rt_env = env = new_rt_env(prog->num_var_names); fill_in_rt_consts(env, prog->version); set_rt_env_obj(env, SLOT_PLAYER, CALLER_ACTIV.player); set_rt_env_obj(env, SLOT_CALLER...
false
false
false
false
false
0
isInteger(const std::wstring &str) { int sz = str.length(); for (int i = 0; i < sz; i++) { wchar_t ch = str[i]; if ((ch < L'0') || (ch > L'9')) return false; } return true; }
false
false
false
false
false
0
check_stopped (SeatUnity *seat) { if (!seat->priv->compositor && !seat->priv->xdmcp_x_server) SEAT_CLASS (seat_unity_parent_class)->stop (SEAT (seat)); }
false
false
false
false
false
0
_tourneyplay (parse_t parse, int clevel, int cevent) { char *mytok; int toknr; tourneyindex_t ti; toknr = 0; ti.taction = A_PLAY; _tourneysetsection (&ti, clevel); while (toknr < 3 && (mytok = ParseNextToken (&parse, STDSEPERATOR))) { switch (toknr) { case 0: strcpy (ti.info, mytok); t...
false
false
false
false
false
0
InterpolateTuple(vtkIdType i, vtkIdType id1, vtkAbstractArray* source1, vtkIdType id2, vtkAbstractArray* source2, double t) { // Note: Something much more fancy could be done here, allowing // the source array to be any data type. if (source1->GetDataType() != VTK_VARIANT || source2->GetDataType() != V...
false
false
false
false
false
0
networkstatus_check_weights(int64_t Wgg, int64_t Wgd, int64_t Wmg, int64_t Wme, int64_t Wmd, int64_t Wee, int64_t Wed, int64_t scale, int64_t G, int64_t M, int64_t E, int64_t D, int64_t T, int64_t margin, int...
false
false
false
false
false
0
imparse_isatom(s) const char *s; { int len = 0; if (!*s) return 0; for (; *s; s++) { len++; if (*s & 0x80 || *s < 0x1f || *s == 0x7f || *s == ' ' || *s == '{' || *s == '(' || *s == ')' || *s == '\"' || *s == '%' || *s == '*' || *s == '\\') return 0; } if (len >= 1024) return 0; retu...
false
false
false
false
false
0
os_cond_broadcast( /*==============*/ os_cond_t* cond) /*!< in: condition variable. */ { ut_a(cond); #ifdef __WIN__ ut_a(wake_all_condition_variable != NULL); wake_all_condition_variable(cond); #else ut_a(pthread_cond_broadcast(cond) == 0); #endif }
false
false
false
false
false
0
streamCopy(struct Stream *sIn, struct Stream *sOut, unsigned length) { if (sIn->bitPos != 0 || sOut->bitPos != 0) { return EOT_OFF_BYTE_BOUNDARY; } if (sIn->pos + length > sIn->size) { return EOT_NOT_ENOUGH_DATA; } if (sOut->pos + length > sOut->reserved) { return EOT_OUT_OF_RESERVED_SPACE; ...
false
false
false
false
false
0
unixd_set_suexec(cmd_parms *cmd, void *dummy, int arg) { const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY); if (err != NULL) { return err; } if (!ap_unixd_config.suexec_enabled && arg) { return apr_pstrcat(cmd->pool, "suEXEC isn't supported: ", ap_unix...
false
false
false
false
false
0