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
seq_path_root(struct seq_file *m, const struct path *path, const struct path *root, const char *esc) { char *buf; size_t size = seq_get_buf(m, &buf); int res = -ENAMETOOLONG; if (size) { char *p; p = __d_path(path, root, buf, size); if (!p) return SEQ_SKIP; res = PTR_ERR(p); if (!IS_ERR(p)) { ...
false
false
false
false
false
0
ielr_compute_follow_kernel_items (bitset ritem_sees_lookahead_set, goto_number **internal_follow_edges, bitsetv *follow_kernel_itemsp) { { size_t max_nitems = 0; state_number i; for (i = 0; i < nstates; ++i) if (states[i]->nitems > ...
false
false
false
false
false
0
SetDirectoryName(const char* dn) { vtkDebugMacro(<< this->GetClassName() << " (" << this << "): setting DirectoryName to " << (dn ? dn : "(null)") ); if ( this->DirectoryName == NULL && dn == NULL) { return; } if (this->FileName) { delete [] this->FileName; this->FileName =...
false
false
false
false
false
0
UpdateLookup() { if (!this->Lookup) { this->Lookup = new vtkBitArrayLookup(); this->Lookup->ZeroArray = vtkIdList::New(); this->Lookup->OneArray = vtkIdList::New(); } if (this->Lookup->Rebuild) { int numComps = this->GetNumberOfComponents(); vtkIdType numTuples = this->GetNumberOfTup...
false
false
false
false
false
0
cmdtime_endtimer(double * pcmdtime, double * pnettime) { if (!cmdtime_enabled) { return; } gettimeofday(&cmdtime_end, 0); totaltime = timesub(&cmdtime_start, &cmdtime_end); cmdtime = totaltime - nettime; *pcmdtime = cmdtime; *pnettime = nettime; }
false
false
false
false
false
0
BIT_VECTOR_mov_words(wordptr target, wordptr source, N_word count) { if (target != source) { if (target < source) BIT_VECTOR_COPY_WORDS(target,source,count) else BIT_VECTOR_BACK_WORDS(target,source,count) } }
false
false
false
false
false
0
releaseFeaturePruning() { mFeaturePruningUsed=false; mPercentageofFeatures=0; if((!mScoreBoardPruningUsed) && (!mTimePruningUsed)) mPruningUsed=false; }
false
false
false
false
false
0
write_generalinfo(FILE *myfile, tmapdata mapdata, tmapinfo mapinfo, int skip) // writes all the general info stuff into the src file { // write mission stuff fprintf(myfile,"[mission]\n"); fprintf(myfile,"name = 2\n"); fprintf(myfile,"players = %d\n",mapinfo.players); fprintf(myfile,"info = 1\n"); ...
false
false
false
false
false
0
operator<<(std::ostream& os, const vcf_record& vcfr) { os << vcfr.chrom << '\t' << vcfr.pos << '\t' << '.' << '\t' << vcfr.ref << '\t'; const unsigned nalt(vcfr.alt.size()); for (unsigned a(0); a<nalt; ++a) { if (a) os << ','; os << vcfr.alt[a]; } os << '\t' ...
false
false
false
false
false
0
det_op(GelCtx *ctx, GelETree * * a, gboolean *exception) { mpw_t ret; if G_UNLIKELY ( ! check_argument_value_only_matrix (a, 0, "det")) return NULL; mpw_init(ret); if G_UNLIKELY ( ! gel_value_matrix_det (ctx, ret, a[0]->mat.matrix)) { mpw_clear(ret); return NULL; } return gel_makenum_use(ret); }
false
false
false
false
false
0
checkAssignmentInAssert() { if (!_settings->isEnabled("style")) return; const char assertPattern[] = "assert ( %any%"; const Token *tok = Token::findmatch(_tokenizer->tokens(), assertPattern); const Token *endTok = tok ? tok->next()->link() : NULL; while (tok && endTok) { for (tok ...
false
false
false
false
false
0
dvb_base_bin_finalize (GObject * object) { DvbBaseBin *dvbbasebin = GST_DVB_BASE_BIN (object); g_hash_table_destroy (dvbbasebin->streams); g_hash_table_destroy (dvbbasebin->programs); g_list_free (dvbbasebin->pmtlist); if (G_OBJECT_CLASS (parent_class)->finalize) G_OBJECT_CLASS (parent_class)->finalize ...
false
false
false
false
false
0
_gnutls_log (int level, const char *fmt, ...) { va_list args; char *str; int ret; if (_gnutls_log_func == NULL) return; va_start (args, fmt); ret = vasprintf (&str, fmt, args); va_end (args); if (ret >= 0) { _gnutls_log_func (level, str); free (str); } }
false
false
false
false
false
0
netxen_restore_indev_addr(struct net_device *netdev, unsigned long event) { struct netxen_adapter *adapter = netdev_priv(netdev); struct nx_ip_list *pos, *tmp_pos; unsigned long ip_event; ip_event = (event == NETDEV_UP) ? NX_IP_UP : NX_IP_DOWN; netxen_config_indev_addr(adapter, netdev, event); list_for_each_en...
false
false
false
false
false
0
si_populate_smc_tdp_limits(struct radeon_device *rdev, struct radeon_ps *radeon_state) { struct ni_power_info *ni_pi = ni_get_pi(rdev); struct si_power_info *si_pi = si_get_pi(rdev); if (ni_pi->enable_power_containment) { SISLANDS_SMC_STATETABLE *smc_table = &si_pi->smc_statetable; PP_SIslands_PAPMPar...
false
false
false
false
false
0
isLoopInvariant(const SCEV *S) const { DenseSet<const Loop*> loops; getLoops(S, &loops); return loops.empty(); }
false
false
false
false
false
0
file_magwarn(struct magic_set *ms, const char *f, ...) { va_list va; char *expanded_format; TSRMLS_FETCH(); va_start(va, f); if (vasprintf(&expanded_format, f, va)); /* silence */ va_end(va); php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Warning: %s", expanded_format); free(expanded_format); }
false
false
false
false
false
0
GDALGetDefaultRAT( GDALRasterBandH hBand) { VALIDATE_POINTER1( hBand, "GDALGetDefaultRAT", NULL ); GDALRasterBand *poBand = static_cast<GDALRasterBand*>(hBand); return (GDALRasterAttributeTableH) poBand->GetDefaultRAT(); }
false
false
false
false
false
0
prop_gatechg(register struct gate_t *gp, register int32 outchg, int32 is_acc) { i_tev_ndx tevpi; word64 gdel, schtim; struct tev_t *tevp; /* no pending scheduled event */ if ((tevpi = gp->schd_tevs[__inum]) == -1) { /* case 1a: output changed */ if (outchg) { /* if 0 or 1 and hiz strength gate n...
false
false
false
false
false
0
GossipSelect_npc_stone_watcher_of_norgannon(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction) { switch (uiAction) { case GOSSIP_ACTION_INFO_DEF: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_NORGANNON_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); ...
false
false
false
false
false
0
compact() { if (isFrozen() || isBogus()) { return *this; } // Delete buffer first to defragment memory less. if (buffer != NULL) { uprv_free(buffer); buffer = NULL; } if (len < capacity) { // Make the capacity equal to len or 1. // We don't want to realloc...
false
false
false
false
false
0
addPixelsNeg(int a1, int blackPixels) { if (a1 > codingLine[a0i]) { if (a1 > columns) { error(getPos(), "CCITTFax row is wrong length (%d)", a1); err = gTrue; a1 = columns; } if ((a0i & 1) ^ blackPixels) { ++a0i; } codingLine[a0i] = a1; } else if (a1 < codingLine[a0i]) { ...
false
false
false
false
false
0
any_pending_bridge_descriptor_fetches(void) { smartlist_t *conns = get_connection_array(); SMARTLIST_FOREACH(conns, connection_t *, conn, { if (conn->type == CONN_TYPE_DIR && conn->purpose == DIR_PURPOSE_FETCH_SERVERDESC && TO_DIR_CONN(conn)->router_purpose == ROUTER_PURPOSE_BRIDGE && ...
false
false
false
false
false
0
terminfo_append(TERM_INFO *dst, TERM_INFO *src, int coffset, int woffset) { int t, new_termnum; int i, j; new_termnum = coffset + src->term_num; if (dst->tw == NULL) { dst->tw = (WORD_ID **)mymalloc(sizeof(WORD_ID *) * new_termnum); dst->wnum = (int *)mymalloc(sizeof(int) * new_termnum); } else { ...
false
false
false
false
false
0
DestroyDB(const std::string& dbname, const Options& options) { Env* env = options.env; std::vector<std::string> filenames; // Ignore error in case directory does not exist env->GetChildren(dbname, &filenames); if (filenames.empty()) { return Status::OK(); } FileLock* lock; const std::string locknam...
false
false
false
false
false
0
gdb_var_create (Debugger *debugger, const GDBMIValue *mi_results, const GList *cli_results, GError *error) { const GDBMIValue * result; IAnjutaDebuggerVariableObject var = {0,}; IAnjutaDebuggerCallback callback = debugger->priv->current_cmd.callback; gpointer user_data = debugger->priv->current_cm...
false
false
false
false
false
0
see_move(int move, const board_t * board, int margin) { int att, def; int from, to; alists_t alists[1]; int value, piece_value; int piece, capture; alist_t * alist; int pos; ASSERT(move_is_ok(move)); ASSERT(board!=NULL); ASSERT(margin>=0); // init from = MOVE_FROM(move); to = ...
false
false
false
false
false
0
tools_string2tlv_list(user_interaction & dialog, const U_16 & type, const vector<string> & data) { vector<string>::const_iterator it = data.begin(); tlv tmp; tmp.set_type(type); memory_file mem = memory_file(gf_write_only); tlv_list ret; while(it != data.end()) { mem.reset(); mem.write(it->c_str()...
false
false
false
false
false
0
UncheckedSetKey(const byte *userKey, unsigned int keylength, const NameValuePairs &) { AssertValidKeyLength(keylength); word32 kappa[8]; GetUserKey(BIG_ENDIAN_ORDER, kappa, 8, userKey, keylength); for(int i=0; i<12; ++i) { Omega(2*i,kappa); Omega(2*i+1,kappa); K[8*i]=kappa[0] & 31; K[8*i+1]=kappa[2] &...
false
false
false
false
false
0
do_if_print(struct interface *ife) /*, int *opt_a)*/ { int res; res = do_if_fetch(ife); if (res >= 0) { if ((ife->flags & IFF_UP) || interface_opt_a) ife_print(ife); } return res; }
false
false
false
false
false
0
get_oldest_newest_dir(char *oldest, char *newest, int *count) { DIR *dir; struct dirent *dirent; char home_dir[FILENAME_MAX]; int r; get_home_file_name("", home_dir, sizeof(home_dir)); jp_logf(JP_LOG_DEBUG, "rotate_backups: opening dir %s\n", home_dir); *count = 0; oldest[0]='\0'; newest[0]=...
false
false
false
false
false
0
mpi_kek_management_resp(struct pm8001_hba_info *pm8001_ha, void *piomb) { struct kek_mgmt_resp *pPayload = (struct kek_mgmt_resp *)(piomb + 4); u32 status = le32_to_cpu(pPayload->status); u32 kidx_new_curr_ksop = le32_to_cpu(pPayload->kidx_new_curr_ksop); u32 err_qlfr = le32_to_cpu(pPayload->err_qlfr); PM8001...
false
false
false
false
false
0
classmethod_get(PyMethodDescrObject *descr, PyObject *obj, PyObject *type) { /* Ensure a valid type. Class methods ignore obj. */ if (type == NULL) { if (obj != NULL) type = (PyObject *)obj->ob_type; else { /* Wot - no type?! */ PyErr_Format(PyExc_TypeError, ...
false
false
false
false
false
0
Make_TimeStamp(GNode *pgn, GNode *cgn) { if (cgn->mtime > pgn->cmtime) { pgn->cmtime = cgn->mtime; pgn->cmtime_gn = cgn; } return (0); }
false
false
false
false
false
0
OnMarginClick(wxScintillaEvent& event) { // We handle click on preview editor margin // For now, all is read only; we manage folding but not // breakpoints and bookmarks. switch (event.GetMargin()) { case 2: // folding margin { int lineYpix = event.GetPosition(); ...
false
false
false
false
false
0
isDigitOfRadix(int ch, int radix) { if (isDecDigit(ch)) return (ch - '0') < radix; else if (!isUpper(ch)) return false; else return (ch - 'A' + 10) < radix; }
false
false
false
false
false
0
xfs_validate_extents( xfs_ifork_t *ifp, int nrecs, xfs_exntfmt_t fmt) { xfs_bmbt_irec_t irec; xfs_bmbt_rec_host_t rec; int i; for (i = 0; i < nrecs; i++) { xfs_bmbt_rec_host_t *ep = xfs_iext_get_ext(ifp, i); rec.l0 = get_unaligned(&ep->l0); rec.l1 = get_unaligned(&ep->l1); xfs_bmbt_get_all(&rec, ...
false
false
false
false
false
0
table_header(int conn, unsigned char mode, unsigned char opts) { fdprintf(conn, "<table cellspacing=\"1\" cellpadding=\"3\">\n<tr>\n"); put_entry(conn, _("count"), 'c', mode); put_entry(conn, _("added"), 't', mode); if (opt.proto) put_entry(conn, _("proto"), 'p', mode); if ((opts == NET_OPTS_PC) && (opt.d...
false
false
false
false
false
0
GetData(vtkInformation* info) { return info? info->Get(DATA_OBJECT()) : 0; }
false
false
false
false
false
0
unlock_record (cob_file *f) { struct indexed_file *p = f->file; int ret; if (p->record_locked == 0) { return 0; } ret = bdb_env->lock_put (bdb_env, &p->bdb_record_lock); p->record_locked = 0; return ret; }
false
false
false
false
false
0
pmsg_clone(pmsg_t *mb) { if (pmsg_is_extended(mb)) { return pmsg_clone_ext(cast_to_pmsg_ext(mb)); } else { pmsg_t *nmb; pmsg_check_consistency(mb); WALLOC(nmb); *nmb = *mb; /* Struct copy */ nmb->m_refcnt = 1; pdata_addref(nmb->m_data); return nmb; } }
false
false
false
false
false
0
cab_read_data(struct archive_read *a, const void **buff, size_t *size, int64_t *offset) { struct cab *cab = (struct cab *)(a->format->data); ssize_t bytes_avail; if (cab->entry_bytes_remaining == 0) { *buff = NULL; *size = 0; *offset = cab->entry_offset; cab->end_of_entry = 1; return (ARCHIVE_OK); } ...
false
false
false
false
false
0
udc_set_txfifo_addr(struct udc_ep *ep) { struct udc *dev; u32 tmp; int i; if (!ep || !(ep->in)) return -EINVAL; dev = ep->dev; ep->txfifo = dev->txfifo; /* traverse ep's */ for (i = 0; i < ep->num; i++) { if (dev->ep[i].regs) { /* read fifo size */ tmp = readl(&dev->ep[i].regs->bufin_framenum); ...
false
false
false
false
false
0
CL_Setenv_f( void ) { int argc = Cmd_Argc(); if ( argc > 2 ) { char buffer[1000]; int i; strcpy( buffer, Cmd_Argv(1) ); strcat( buffer, "=" ); for ( i = 2; i < argc; i++ ) { strcat( buffer, Cmd_Argv( i ) ); strcat( buffer, " " ); } _putenv( buffer ); } else if ( argc =...
true
true
false
false
true
1
btreeNumInSecbucket(AjPBtcache cache, ajulong pagepos) { unsigned char *buf = NULL; AjPBtpage page = NULL; ajuint nodetype = 0; ajuint nentries = 0; /* ajDebug("In btreeNumInPribucket\n"); */ /* if(pagepos == cache->secrootblock) ajFatal("NumInSecbucket: Attempt to read bucket f...
false
false
false
false
false
0
xfrin_log(dns_xfrin_ctx_t *xfr, int level, const char *fmt, ...) { va_list ap; char zonetext[DNS_NAME_MAXTEXT+32]; if (isc_log_wouldlog(dns_lctx, level) == ISC_FALSE) return; dns_zone_name(xfr->zone, zonetext, sizeof(zonetext)); va_start(ap, fmt); xfrin_logv(level, zonetext, &xfr->masteraddr, fmt, ap); va_e...
true
true
false
false
false
1
acDecSymLowSizeVar(ac_decoder *acd, ac_model *acm) { uint64_t ran = (uint64_t)(acd->high -acd->low)+1; uint64_t cum = (((uint64_t)(acd->value-acd->low)+1)*acm->cfreq[0]-1)/ran; uint32_t sym; for(sym = 0 ; acm->cfreq[sym+1] > cum ; ++sym) ; acd->high = acd->low + (ran*acm->cfreq[sym ]) / acm-...
false
false
false
false
false
0
_copySubPlan(SubPlan *from) { SubPlan *newnode = makeNode(SubPlan); COPY_SCALAR_FIELD(subLinkType); COPY_NODE_FIELD(testexpr); COPY_NODE_FIELD(paramIds); COPY_SCALAR_FIELD(plan_id); COPY_STRING_FIELD(plan_name); COPY_SCALAR_FIELD(firstColType); COPY_SCALAR_FIELD(firstColTypmod); COPY_SCALAR_FIELD(firstColC...
false
false
false
false
false
0
FLAC__window_hamming(FLAC__real *window, const FLAC__int32 L) { const FLAC__int32 N = L - 1; FLAC__int32 n; for (n = 0; n < L; n++) window[n] = (FLAC__real)(0.54f - 0.46f * cos(2.0f * M_PI * n / N)); }
false
false
false
false
false
0
rb_linebuf_donebuf(buf_head_t * bufhead) { while(bufhead->list.head != NULL) { rb_linebuf_done_line(bufhead, (buf_line_t *) bufhead->list.head->data, bufhead->list.head); } }
false
false
false
false
false
0
xtopt_parse_markmask(struct xt_option_call *cb) { unsigned int mark = 0, mask = ~0U; char *end; if (!xtables_strtoui(cb->arg, &end, &mark, 0, UINT32_MAX)) xt_params->exit_err(PARAMETER_PROBLEM, "%s: bad mark value for option \"--%s\", " "or out of range.\n", cb->ext_name, cb->entry->name); if (*end == '...
false
false
false
false
false
0
marshal_loads(PyObject *self, PyObject *args) { RFILE rf; char *s; Py_ssize_t n; PyObject* result; if (!PyArg_ParseTuple(args, "s#:loads", &s, &n)) return NULL; rf.fp = NULL; rf.ptr = s; rf.end = s + n; rf.strings = PyList_New(0); rf.depth = 0; result = read_object(&r...
false
false
false
false
false
0
tda18271_calc_gain_taper(struct dvb_frontend *fe, u32 *freq) { /* sets gain taper bits, but does not write them */ struct tda18271_priv *priv = fe->tuner_priv; unsigned char *regs = priv->tda18271_regs; u8 val; int ret = tda18271_lookup_map(fe, GAIN_TAPER, freq, &val); if (tda_fail(ret)) goto fail; regs[R_EP...
false
false
false
false
false
0
diff_delta_is_binary_by_content( diff_context *ctxt, git_diff_delta *delta, git_diff_file *file, const git_map *map) { const git_buf search = { map->data, 0, min(map->len, 4000) }; if (diff_delta_is_binary_forced(ctxt, delta)) return 0; /* TODO: provide encoding / binary detection callbacks that can * be U...
false
false
false
false
false
0
status_mime_int(const char *mime) { if (!mime) return JK_STATUS_MIME_DEF; if (!strcmp(mime, JK_STATUS_MIME_TEXT_HTML)) return JK_STATUS_MIME_HTML; else if (!strcmp(mime, JK_STATUS_MIME_TEXT_XML)) return JK_STATUS_MIME_XML; else if (!strcmp(mime, JK_STATUS_MIME_TEXT_TXT)) ...
false
false
false
false
false
0
decktestEval(bool result, char *failString, bool *status) { if (STATUS_EVAL) { if (!result) { consolePrintf("%s [FAIL]\n", failString); *status = false; } else { *status = true; } } }
false
false
false
false
false
0
xmlSecEncCtxDebugDump(xmlSecEncCtxPtr encCtx, FILE* output) { xmlSecAssert(encCtx != NULL); xmlSecAssert(output != NULL); switch(encCtx->mode) { case xmlEncCtxModeEncryptedData: if(encCtx->operation == xmlSecTransformOperationEncrypt) { fprintf(output, "= DATA ENCRYPTION...
false
false
false
false
false
0
zio_set_sebxa_mode(Zio *zio, off_t index_location, off_t index_base, off_t zio_start_location, off_t zio_end_location) { LOG(("in: zio_set_sebxa_mode(zio=%d, index_location=%ld, index_base=%ld, \ zio_start_location=%ld, zio_end_location=%ld)", (int)zio->id, (long)index_location, (long)index_base, (long)zio_st...
false
false
false
false
false
0
ViewToDisplay() { if ( this->VTKWindow ) { double dx,dy; int sizex,sizey; int *size = NULL; /* get physical window dimensions */ size = this->VTKWindow->GetSize(); if (!size) { return; } sizex = size[0]; sizey = size[1]; dx = (this->ViewPoint[0] + 1.0) * ...
false
false
false
false
false
0
vfs_file_get_date (NautilusFile *file, NautilusDateType date_type, time_t *date) { switch (date_type) { case NAUTILUS_DATE_TYPE_ACCESSED: /* Before we have info on a file, the date is unknown. */ if (file->details->atime == 0) { return FALSE; } if (date != NULL) { *date = file->details->atime;...
false
false
false
false
false
0
convert_sourcefiles_in(char *source_subdir, char *dest_dir, char *dest_subdir, char *suffix) { char testtablespace[MAXPGPATH]; char indir[MAXPGPATH]; struct stat st; int ret; char **name; char **names; int count = 0; snprintf(indir, MAXPGPATH, "%s/%s", inputdir, source_subdir); /* Check that indir ...
true
true
false
false
true
1
shine_hide() { if (shine_x == 0 && shine_y == 0) return; stk_surface_blit( offscreen, shine_x, shine_y, BRICK_WIDTH, BRICK_HEIGHT, stk_display, shine_x, shine_y ); stk_display_store_drect(); }
false
false
false
false
false
0
execute( Chuck_VM * vm, Chuck_VM_Shred * shred ) { // reg stack pointer t_CKUINT *& sp = (t_CKUINT *&)shred->reg->sp; Chuck_String * key = NULL; t_CKUINT val = 0; t_CKFLOAT fval = 0; // pop pop_( sp, 2 ); // check pointer if( !(*sp) ) goto null_pointer; if( m_size == sz_INT ) ...
false
false
false
false
false
0
resizeEvent( QResizeEvent *re ) { if( width() != height() ) resize( height(), height() ); else QDial::resizeEvent( re ); if( re->size() != re->oldSize() ) { renderIcons(); m_sliderGradient = QPixmap( size() ); updateSliderGradient(); update(); } }
false
false
false
false
false
0
PutLinedefsHexen(void) { int i, j; lump_t *lump = CreateLevelLump("LINEDEFS"); DisplayTicker(); for (i=0; i < num_linedefs; i++) { raw_hexen_linedef_t raw; linedef_t *line = lev_linedefs[i]; raw.start = UINT16(line->start->index); raw.end = UINT16(line->end->index); raw.flags = UINT1...
false
false
false
false
false
0
PyvtkAbstractArray_GetTuples_s2(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetTuples"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkAbstractArray *op = static_cast<vtkAbstractArray *>(vp); vtkIdType temp0; vtkIdType temp1; vtkAbstractArray *temp2 = NULL; PyObject *result = ...
false
false
false
false
false
0
e_calendar_style_set (GtkWidget *widget, GtkStyle *previous_style) { ECalendar *e_calendar; e_calendar = E_CALENDAR (widget); if (GTK_WIDGET_CLASS (e_calendar_parent_class)->style_set) (*GTK_WIDGET_CLASS (e_calendar_parent_class)->style_set) (widget, previous_style); /* Set t...
false
false
false
false
false
0
qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a) { if (_c == QMetaObject::InvokeMetaMethod) { Q_ASSERT(staticMetaObject.cast(_o)); RealtimePlot *_t = static_cast<RealtimePlot *>(_o); switch (_id) { case 0: _t->configChanged(); break; case 1: _t->showP...
false
false
false
false
false
0
do_cib_replaced(const char *event, xmlNode * msg) { crm_debug("Updating the CIB after a replace: DC=%s", AM_I_DC ? "true" : "false"); if (AM_I_DC == FALSE) { return; } else if (fsa_state == S_FINALIZE_JOIN && is_set(fsa_input_register, R_CIB_ASKED)) { /* no need to restart the join - we ask...
false
false
false
false
false
0
createINNModelView() { using namespace DrugsDB::Constants; // create model and tableview for Iam Class / INNs m_InnModel = new DrugsDB::AtcTreeModel(this); m_InnModel->init(); m_AtcProxyModel = new Internal::TreeProxyModel(this); m_AtcProxyModel->setSourceModel(m_InnModel); InnView->setMode...
false
false
false
false
false
0
krb5_c_random_make_octets(krb5_context context, krb5_data *outdata) { #ifdef _WIN32 DWORD pid = GetCurrentProcessId(); #else pid_t pid = getpid(); #endif unsigned char pidbuf[4]; k5_mutex_lock(&fortuna_lock); if (!have_entropy) { k5_mutex_unlock(&fortuna_lock); return KRB5_CRYPTO_I...
true
true
false
false
false
1
heap_open_from_share_and_register(HP_SHARE *share, int mode) { HP_INFO *info; DBUG_ENTER("heap_open_from_share_and_register"); mysql_mutex_lock(&THR_LOCK_heap); if ((info= heap_open_from_share(share, mode))) { info->open_list.data= (void*) info; heap_open_list= list_add(heap_open_list,&info->open_lis...
false
false
false
false
false
0
__kernel_cos(double x, double y) #else double __kernel_cos(x, y) double x,y; #endif { double a,hz,z,r,qx; int ix; GET_HIGH_WORD(ix, x); ix &= 0x7fffffff; /* ix = |x|'s high word*/ if(ix<0x3e400000) { /* if x < 2**27 */ if(((int)x)==0) return one; /* generate inexact */ } z = x*x; r = z*(C1+z*...
false
false
false
false
false
0
gkrellm_apply_hostname_config(void) { if ( hostname_visible != _GK.enable_hostname || system_name_visible != _GK.enable_system_name ) { hostname_visible = _GK.enable_hostname; system_name_visible = _GK.enable_system_name; gkrellm_panel_destroy(host); gkrellm_alert_destroy(&server_alert); create_ho...
false
false
false
false
false
0
Pad(RandomNumberGenerator &rng, const byte *input, size_t inputLength, byte *oaepBlock, size_t oaepBlockLen, const NameValuePairs &parameters) const { assert (inputLength <= MaxUnpaddedLength(oaepBlockLen)); // convert from bit length to byte length if (oaepBlockLen % 8 != 0) { oaepBlock[0] = 0; oaepBlock++; ...
false
false
false
false
false
0
gdGetWordLSB(signed short int *result, gdIOCtx *ctx) { int high = 0, low = 0; low = (ctx->getC) (ctx); if (low == EOF) { return 0; } high = (ctx->getC) (ctx); if (high == EOF) { return 0; } if (result) { *result = (high << 8) | low; } return 1; }
false
false
false
false
false
0
self() { static DublinCoreVocabPrivate p; if(!p.sSelf) { p.sSelf = new DublinCoreVocab; qAddPostRoutine(DublinCoreVocabPrivate::cleanupDublinCoreVocab); } return p.sSelf; }
false
false
false
false
false
0
eel_editable_label_accessible_paste_text (AtkEditableText *text, gint position) { GtkWidget *widget; GtkEditable *editable; EelEditableLabelAccessiblePaste paste_struct; widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text)); if (widget == NULL) /* State is defunct */ return; ...
false
false
false
false
false
0
list_depend (AnjutaToken *token, gpointer user_data) { GList **depend = (GList **)user_data; if (anjuta_token_get_type (token) == ANJUTA_TOKEN_VARIABLE) { gchar *string; gchar *name; guint length; string = anjuta_token_evaluate_name(token); length = strlen (string); if (length > 1) { if (string[1]...
false
false
false
false
false
0
savePresetsToXml( const QString& filename, const QList<APG::PresetPtr> &pl ) const { QDomDocument xmldoc; QDomElement base = xmldoc.createElement( "playlistgenerator" ); QList<QDomNode*> nodes; foreach ( APG::PresetPtr ps, pl ) { QDomElement* elemPtr = ps->toXml( xmldoc ); base.appendChi...
false
false
false
false
false
0
gxi_update_conversion_forward (GncXmlImportData *data) { GtkAssistant *assistant = GTK_ASSISTANT(data->assistant); gint num = gtk_assistant_get_current_page (assistant); GtkWidget *page = gtk_assistant_get_nth_page (assistant, num); if (data->n_unassigned || data->n_impossible) gtk_assistant_se...
false
false
false
false
false
0
xtGetXY(xp, yp) int *xp, *yp; { int x = xtGetCoord(CO); if (x != -1) { int y = xtGetCoord(LI); if (y != -1) { *xp = x; *yp = y; font_width = 1; return YES; } } return NO; }
false
false
false
false
false
0
befs_bt_read_node(struct super_block *sb, befs_data_stream * ds, struct befs_btree_node *node, befs_off_t node_off) { uint off = 0; befs_debug(sb, "---> %s", __func__); if (node->bh) brelse(node->bh); node->bh = befs_read_datastream(sb, ds, node_off, &off); if (!node->bh) { befs_error(sb, "%s failed to ...
false
false
false
false
false
0
sql_exec_error_callback(void *arg) { FmgrInfo *flinfo = (FmgrInfo *) arg; SQLFunctionCachePtr fcache = (SQLFunctionCachePtr) flinfo->fn_extra; int syntaxerrposition; /* * We can do nothing useful if init_sql_fcache() didn't get as far as * saving the function name */ if (fcache == NULL || fcache->fname ...
false
false
false
false
false
0
ncolors() { if (islct()) { return 1 << ((flags & imdLCTSIZE) + 1); } else { return 0; } }
false
false
false
false
false
0
type_init(PyObject *cls, PyObject *args, PyObject *kwds) { int res; assert(args != NULL && PyTuple_Check(args)); assert(kwds == NULL || PyDict_Check(kwds)); if (kwds != NULL && PyDict_Check(kwds) && PyDict_Size(kwds) != 0) { PyErr_SetString(PyExc_TypeError, "type.__init...
false
false
false
false
false
0
module_unload(void){ const char *tmp; // check avalaibility of modules if(config[CF_MOD_ALERT].valeur.string == NULL || config[CF_MOD_ALERT].valeur.string[0] == 0){ return; } // unload module if(mod_unload != NULL){ mod_unload(); } // close module dlclose(module); tmp = dlerror(); if(tmp != NULL) ...
false
false
false
false
false
0
ifrotate(struct aoetgt *t) { struct aoeif *ifp; ifp = t->ifp; ifp++; if (ifp >= &t->ifs[NAOEIFS] || ifp->nd == NULL) ifp = t->ifs; if (ifp->nd == NULL) return NULL; return t->ifp = ifp; }
false
false
false
false
false
0
Send() { DRIVER_ERROR err; //BOOL bDuplex = FALSE; StartSend(); // this code will look for the duplexer enabled in the device ID and send the right // escape to the printer to enable duplexing. At this time, however, we are not // going to support duplexing. One, it is not supported with PCL...
false
false
false
false
false
0
mono_return_double8 (double8 s8, int addend) { if (s8.f1 != 1) { fprintf(stderr, "mono_return_double8 s8.f1: got %f but expected %d\n", s8.f1, 1); } if (s8.f2 != 2) { fprintf(stderr, "mono_return_double8 s8.f2: got %f but expected %d\n", s8.f2, 2); } if (s8.f3 != 3) { fprintf(stderr, "mono_return_double8 s8....
false
false
false
false
false
0
print(FILE * out) const { const release_list::size_type len = l.length(); for(release_list::size_type i=0; i<len; i++) { if (i > 0) { if (putc_failed(fputc(' ', out))) return false; } if (l[i].print(out)) return false; } return true; }
false
false
false
false
false
0
SRP_user_pwd_set_sv(SRP_user_pwd *vinfo, const char *s, const char *v) { unsigned char tmp[MAX_LEN]; int len; if (strlen(s) > MAX_LEN || strlen(v) > MAX_LEN) return 0; len = t_fromb64(tmp, v); if (NULL == (vinfo->v = BN_bin2bn(tmp, len, NULL)) ) return 0; len = t_fromb64(tmp, s); return ((vinfo...
true
true
false
false
false
1
qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a) { if (_c == QMetaObject::InvokeMetaMethod) { Q_ASSERT(staticMetaObject.cast(_o)); FightControl *_t = static_cast<FightControl *>(_o); switch (_id) { case 0: _t->sig_control(); break; case 1: _t->sig_use...
false
false
false
false
false
0
cutscenes_screen_scroll_screen_down() { int h; h = Cutscene_list_coords[gr_screen.res][3] / gr_get_font_height(); if (Scroll_offset + h < (int)Cutscene_list.size()) { Scroll_offset++; if (Selected_line < Scroll_offset){ Selected_line = Scroll_offset; } gamesnd_play_iface(SND_SCROLL); } else { gamesnd...
false
false
false
false
false
0
gpio_wdt_disable(struct gpio_wdt_priv *priv) { gpio_set_value_cansleep(priv->gpio, !priv->active_low); /* Put GPIO back to tristate */ if (priv->hw_algo == HW_ALGO_TOGGLE) gpio_direction_input(priv->gpio); }
false
false
false
false
false
0
VisitDeclarations( ZoneList<Declaration*>* declarations) { int length = declarations->length(); int globals = 0; for (int i = 0; i < length; i++) { Declaration* decl = declarations->at(i); Variable* var = decl->proxy()->var(); Slot* slot = var->AsSlot(); // If it was not possible to allocate ...
false
false
false
false
false
0
fifo_read(int fd, short event, void *arg) { char buf[255]; int len; struct event *ev = arg; #ifdef WIN32 DWORD dwBytesRead; #endif /* Reschedule this event */ event_add(ev, NULL); fprintf(stderr, "fifo_read called with fd: %d, event: %d, arg: %p\n", fd, event, arg); #ifdef WIN32 len = ReadFile((HANDLE)fd, b...
true
true
false
false
true
1
pevent_test_cb (GtkWidget * wid, GtkWidget * twid) { int len, n; char *out, *text; for (n = 0; n < NUM_XP; n++) { text = _(pntevts_text[n]); len = strlen (text); out = malloc (len + 2); memcpy (out, text, len + 1); out[len] = '\n'; out[len + 1] = 0; check_special_chars (out, TRUE); PrintTextRaw (...
false
true
false
false
false
1
conf_askvalue(struct symbol *sym, const char *def) { enum symbol_type type = sym_get_type(sym); if (!sym_has_value(sym)) printf(_("(NEW) ")); line[0] = '\n'; line[1] = 0; if (!sym_is_changable(sym)) { printf("%s\n", def); line[0] = '\n'; line[1] = 0; return 0; } switch (input_mode) { case oldconfi...
false
false
false
false
false
0
get_hap_cigar(ALIGNPATH::path_t& apath, const indel_key& ik, const unsigned lead=1, const unsigned trail=0) { using namespace ALIGNPATH; apath.clear(); if (lead) { apath.push_back(path_segment(MATCH,lead)); } if (ik.delete_length()) { apath...
false
false
false
false
false
0