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
bFmtResults( void ) { bool bRtn; wxString os1; m_osErrMsg.Empty( ); // Check that the results file exists if( ! roGetResultsFile( ).FileExists( ) ) { os1.Empty( ); os1 << wxT("Results file doesn't exist : \n\n") << roGetResultsFile( ).GetFullPath( ); SetErrMsg( os1 ); return(...
false
false
false
false
false
0
fl_winshow( Window win ) { XMapRaised( flx->display, win ); /* Wait until the newly mapped window shows up */ if ( st_xwmh.initial_state == NormalState ) wait_mapwin( win ); setup_catch_destroy( win ); fl_winset( win ); /* Re-initialize window defaults */ fli_default_xswa( ); ...
false
false
false
false
false
0
kmo_free_fits_desc(main_fits_desc *desc) { KMO_TRY { KMO_TRY_ASSURE(desc != NULL, CPL_ERROR_NULL_INPUT, "No input data is provided!"); if (desc->sub_desc != NULL) { /* free main_fits_desc */ cpl_free(desc->sub_desc); desc->s...
false
false
false
false
false
0
qib_setup_sdma(struct qib_pportdata *ppd) { struct qib_devdata *dd = ppd->dd; unsigned long flags; int ret = 0; ret = alloc_sdma(ppd); if (ret) goto bail; /* set consistent sdma state */ ppd->dd->f_sdma_init_early(ppd); spin_lock_irqsave(&ppd->sdma_lock, flags); sdma_set_state(ppd, qib_sdma_state_s00_hw_do...
false
false
false
false
false
0
tdb1_recovery_area(struct tdb_context *tdb, const struct tdb1_methods *methods, tdb1_off_t *recovery_offset, struct tdb1_record *rec) { if (tdb1_ofs_read(tdb, TDB1_RECOVERY_HEAD, recovery_offset) == -1) { return -1; } if (*recovery_offset == 0) { rec->rec_len = 0; return 0; } if (me...
false
false
false
false
false
0
disposeImpl( void* firstElement, size_t elementSize, size_t elementCount, size_t capacity, void (*destroyElement)(void*)) const { // Note that capacity is ignored since operator delete() doesn't care about it. AutoDeleter deleter(firstElement); if (destroyElement != nullptr) { ExceptionSafeArrayUtil ...
false
false
false
false
false
0
__ecereMethod_Debugger_StepUntil(struct __ecereNameSpace__ecere__com__Instance * this, struct __ecereNameSpace__ecere__com__Instance * compiler, struct ProjectConfig * config, int bitDepth, unsigned int useValgrind, unsigned int ignoreBreakpoints) { struct Debugger * __ecerePointer_Debugger = (struct Debugger *)(this ?...
false
false
false
true
false
1
wl1251_irq(int irq, void *cookie) { struct wl1251 *wl; wl1251_debug(DEBUG_IRQ, "IRQ"); wl = cookie; ieee80211_queue_work(wl->hw, &wl->irq_work); return IRQ_HANDLED; }
false
false
false
false
false
0
can_handle(int parent, int child) { return (parent == 0 && child == ELM_multistatus) || (parent == ELM_multistatus && child == ELM_response) || (parent == ELM_response && (child == ELM_href || child == ELM_status || child == ELM_propstat || child == ELM_responsedescription)) ||...
false
false
false
false
false
0
objectIsInShadow(Point hit, Light *light) { if (!shadows) return false; float tmax = (light->position - hit).length(); Ray shadowray(hit, (light->position - hit).normalized()); for (std::vector<Object*>::iterator jt=objects.begin(); jt!=objects.end(); ++jt) { if ((*jt)->intersect(shadowray).t <= tmax)...
false
false
false
false
false
0
takeBitmap() { SplashBitmap *ret; ret = bitmap; bitmap = new SplashBitmap(1, 1, bitmapRowPad, colorMode, colorMode != splashModeMono1, bitmapTopDown); return ret; }
false
false
false
false
false
0
wi_mutable_string_delete_characters_from_index(wi_mutable_string_t *string, wi_uinteger_t index) { WI_RUNTIME_ASSERT_MUTABLE(string); wi_mutable_string_delete_characters_in_range(string, wi_make_range(index, string->length - index)); }
false
false
false
false
false
0
encode_OCSPBasicOCSPResponse(unsigned char *p HEIMDAL_UNUSED_ATTRIBUTE, size_t len HEIMDAL_UNUSED_ATTRIBUTE, const OCSPBasicOCSPResponse *data, size_t *size) { size_t ret HEIMDAL_UNUSED_ATTRIBUTE = 0; size_t l HEIMDAL_UNUSED_ATTRIBUTE; int i HEIMDAL_UNUSED_ATTRIBUTE, e HEIMDAL_UNUSED_ATTRIBUTE; /* certs */ if((data)->...
false
false
false
false
false
0
gd_header_bar_map (GtkWidget *widget) { GdHeaderBar *bar = GD_HEADER_BAR (widget); GdHeaderBarPrivate *priv = bar->priv; GTK_WIDGET_CLASS (gd_header_bar_parent_class)->map (widget); if (priv->event_window) gdk_window_show_unraised (priv->event_window); }
false
false
false
false
false
0
print_actions(stateno) int stateno; { register action *p; register shifts *sp; register int as; if (stateno == final_state) fprintf(verbose_file, "\t$end accept\n"); p = parser[stateno]; if (p) { print_shifts(p); print_reductions(p, defred[stateno]); } sp = shift_table[stateno...
false
false
false
false
false
0
mantis_i2c_init(struct mantis_pci *mantis) { u32 intstat; struct i2c_adapter *i2c_adapter = &mantis->adapter; struct pci_dev *pdev = mantis->pdev; init_waitqueue_head(&mantis->i2c_wq); mutex_init(&mantis->i2c_lock); strncpy(i2c_adapter->name, "Mantis I2C", sizeof(i2c_adapter->name)); i2c_set_adapdata(i2c_adapt...
false
false
false
false
false
0
read_radio_id(struct brcms_phy *pi) { u32 id; if (D11REV_GE(pi->sh->corerev, 24)) { u32 b0, b1, b2; bcma_wflush16(pi->d11core, D11REGOFFS(radioregaddr), 0); b0 = (u32) bcma_read16(pi->d11core, D11REGOFFS(radioregdata)); bcma_wflush16(pi->d11core, D11REGOFFS(radioregaddr), 1); b1 = (u32) bcma_read16(pi->d1...
false
false
false
false
false
0
fm10k_mbx_validate_msg_size(struct fm10k_mbx_info *mbx, u16 len) { struct fm10k_mbx_fifo *fifo = &mbx->rx; u16 total_len = 0, msg_len; u32 *msg; /* length should include previous amounts pushed */ len += mbx->pushed; /* offset in message is based off of current message size */ do { msg = fifo->buffer + fm10k...
false
false
false
false
false
0
runOnMachineFunction(MachineFunction &MF) { TII = MF.getTarget().getInstrInfo(); bool Changed = false; // Process any unreachable blocks in arbitrary order now. for (MachineFunction::iterator BB = MF.begin(), E = MF.end(); BB != E; ++BB) Changed |= processBasicBlock(MF, *BB); return Changed; }
false
false
false
false
false
0
client_handle_get_interfaces(struct lldpd *cfg, enum hmsg_type *type, void *input, int input_len, void **output, int *subscribed) { struct lldpd_interface *iff, *iff_next; struct lldpd_hardware *hardware; ssize_t output_len; /* Build the list of interfaces */ struct lldpd_interface_list ifs; log_debug("rpc"...
false
false
false
false
false
0
msg_join(IRC_SERVER_REC *server, const char *channel, const char *nick, const char *address) { NETSPLIT_REC *split; NETJOIN_REC *netjoin; GSList *channels; int rejoin = 1; if (!IS_IRC_SERVER(server)) return; if (ignore_check(SERVER(server), nick, address, channel, NULL, MSGLEVEL_JOINS)) return; ...
false
false
false
false
false
0
DoRefreshSize() { int w, h,tw,th; gr_get_string_size(&w, &h, (char *)Label.c_str()); tw = w; th = h; gr_get_string_size(&w, &h, "X"); tw += w; th += h + CB_TEXTCHECKDIST; //Spacing b/t 'em CheckCoords[0] = Coords[0]; CheckCoords[1] = Coords[1]; CheckCoords[2] = Coords[0] + w; CheckCoords[3] = Coords[1] + h...
false
false
false
false
false
0
indexingFinished( bool success ) { LOG(logDEBUG) << "Entering LogData::indexingFinished."; // We use the newly created file data or restore the old ones. // (Qt implicit copy makes this fast!) { QMutexLocker locker( &dataMutex_ ); workerThread_.getIndexingData( &fileSize_, &maxLength_, ...
false
false
false
false
false
0
numerical_score_matrix (double *b, int T, int k, BFGS_LLT_FUNC lltfun, void *data, int *err) { double h = 1e-8; #if ALT_OPG double d = 1.0e-4; #endif gretl_matrix *G; const double *x; double bi0, x0; int i, t; G = gretl_zero_matrix_new(T, k); if (G == NULL) { *err =...
false
false
false
false
false
0
messageReferencesCallback(size_t messageNumber, const vector<string> &references) { if (folder.isDestroyed()) return; if (messageNumber >= folder->serverIndex.size()) return; Index &i=folder->serverIndex[messageNumber]; i.references.clear(); i.references.reserve(references.size()); i.watchLevel=0; ...
false
false
false
false
false
0
clause_cmp (const void* x, const void* y) { return clause_size((clause*)x) > 2 && (clause_size((clause*)y) == 2 || clause_activity((clause*)x) < clause_activity((clause*)y)) ? -1 : 1; }
false
false
false
false
false
0
gst_caps_structure_subtract_field (GQuark field_id, const GValue * value, gpointer user_data) { SubtractionEntry *e = user_data; GValue subtraction = { 0, }; const GValue *other; GstStructure *structure; other = gst_structure_id_get_value (e->subtract_from, field_id); if (!other) { return FALSE; ...
false
false
false
false
false
0
get_handler_index(struct handler_data *table, void *handler, offs_t start) { int i; /* all static handlers are hardcoded */ if (HANDLER_IS_STATIC(handler)) return (FPTR)handler; /* otherwise, we have to search */ for (i = STATIC_COUNT; i < SUBTABLE_BASE; i++) { if (table[i].handler == NULL) { ...
false
false
false
false
false
0
gt_bsStoreUInt8(BitString str, BitOffset offset, unsigned numBits, uint8_t val) { unsigned bitsLeft = numBits, bitTop = offset%bitElemBits; size_t elemStart = offset/bitElemBits; BitElem *p = str + elemStart; gt_assert(str); gt_assert(numBits <= sizeof (val)*CHAR_BIT); /* set bits of fi...
false
false
false
false
false
0
CalcScore(const Phrase &phrase, float &fullScore, float &ngramScore, size_t &oovCount) const { fullScore = 0; ngramScore = 0; oovCount = 0; size_t phraseSize = phrase.GetSize(); if (!phraseSize) return; vector<const Word*> contextFactor; contextFactor.reserve(GetNGramOrder()); std::auto_ptr<FFState>...
false
false
false
false
false
0
draw_outlines(const PathVec& path_vec, const std::vector<LineStyle>& line_styles, const SWFCxForm& cx, const SWFMatrix& mat) { for (PathVec::const_iterator it = path_vec.begin(), end = path_vec.end(); it != end; ++it)...
false
false
false
false
false
0
N_alloc_les_param(int cols, int rows, int type, int parts) { N_les *les; int i; if (type == N_SPARSE_LES) G_debug(2, "Allocate memory for a sparse linear equation system with %i rows\n", rows); else G_debug(2, "Allocate memory for a regular linear equation system with %i rows\n", rows); ...
false
false
false
false
false
0
SplitProgramFromArgs(const std::string& path, std::string& program, std::string& args) { // see if this is a full path to a program // if so then set program to path and args to nothing if (SystemTools::FileExists(path)) { program = path; args = ""; return; } ...
false
false
false
false
false
0
scope_format_text (NODE_T * p, SCOPE_T ** s) { for (; p != NO_NODE; FORWARD (p)) { if (IS (p, FORMAT_PATTERN)) { scope_enclosed_clause (SUB (NEXT_SUB (p)), s); } else if (IS (p, FORMAT_ITEM_G) && NEXT (p) != NO_NODE) { scope_enclosed_clause (SUB_NEXT (p), s); } else if (IS (p, DYNAMIC_REPLICAT...
false
false
false
false
false
0
updateFilteredView( int nbMatches, int progress ) { LOG(logDEBUG) << "updateFilteredView received."; if ( progress == 100 ) { // Searching done printSearchInfoMessage( nbMatches ); searchInfoLine->hideGauge(); // De-activate the stop button stopButton->setEnabled( false ...
false
false
false
false
false
0
ldns_pkt_new(void) { ldns_pkt *packet; packet = LDNS_MALLOC(ldns_pkt); if (!packet) { return NULL; } packet->_header = LDNS_MALLOC(ldns_hdr); if (!packet->_header) { LDNS_FREE(packet); return NULL; } packet->_question = ldns_rr_list_new(); packet->_answer = ldns_rr_list_new(); packet->_authority = ldn...
false
false
false
false
false
0
Pair_check_list (List_T pairs) { T this; List_T p; int prev_querypos, prev_genomepos; if (pairs == NULL) { return; } else { this = List_head(pairs); prev_querypos = this->querypos; prev_genomepos = this->genomepos; for (p = List_next(pairs); p != NULL; p = List_next(p)) { this = Li...
false
false
false
false
false
0
hann(int N) { float *x = (float *) MALLOC(N * sizeof(float) ); for (int i = 0; i < N+2; i++) { if (i > 0 && i < N + 1) { // matlab has no zeroes at the beginning/end for hanning, only for hann (?!) float temp = ((float)i) / (N+1); x[i-1] = 0.5 * (1. - cos(2 * M_PI * temp)); } } return x; }
false
false
false
false
false
0
update_inline_extent_backref(struct btrfs_root *root, struct btrfs_path *path, struct btrfs_extent_inline_ref *iref, int refs_to_mod, struct btrfs_delayed_extent_op *extent_op, int *last_ref) { struct extent_buffer *leaf; struct btrfs_extent_item *ei; struct btrfs_extent_data_ref *dref ...
false
false
false
false
false
0
moveDone() { // Called after non-animated move, animated move, end of game or hint action. m_view->setNormalCursor(); emit statusMessage (QString(""), false); // Clear the status bar. m_activity = Idle; setAction (HINT, true); m_fullSpeed = Prefs::animationNone(); m_view->hidePopup(); if (m_inte...
false
false
false
false
false
0
lp3972_dcdc_set_voltage_sel(struct regulator_dev *dev, unsigned int selector) { struct lp3972 *lp3972 = rdev_get_drvdata(dev); int buck = rdev_get_id(dev) - LP3972_DCDC1; int ret; ret = lp3972_set_bits(lp3972, LP3972_BUCK_VOL1_REG(buck), LP3972_BUCK_VOL_MASK, selector); if (ret) return ret; if ...
false
false
false
false
false
0
dpm_insert_spcmd_entry(dbfd, dpm_spcmd) struct dpm_dbfd *dbfd; struct dpm_space_reserv *dpm_spcmd; { char escaped_name[255*2+1]; char func[23]; char g_space_str[21]; static char insert_stmt[] = "INSERT INTO dpm_space_reserv \ (S_TOKEN, CLIENT_DN, S_UID, S_GID, RET_POLICY, \ AC_LATENCY, S_TYPE, U_TOKEN, T_SPA...
false
false
false
false
false
0
MeshEvert(Mesh *m) { int i; Point3 *n; if (m) { if (m->geomflags & MESH_EVERT) m->geomflags &= ~MESH_EVERT; else m->geomflags |= MESH_EVERT; if (m->geomflags & MESH_N) { for (i = 0, n = m->n; i < m->nu*m->nv; i++,n++){ n->x = -n->x; n->y = -n->y; n->z = -n->z; } } i...
false
false
false
false
false
0
autohelperjoseki1618(int trans, int move, int color, int action) { int A; UNUSED(color); UNUSED(action); A = AFFINE_TRANSFORM(430, trans, move); return !DEFEND_MACRO(A); }
false
false
false
false
false
0
ajUtilGetUid(AjPStr* Puid) { #ifndef WIN32 ajint uid; struct passwd* pwd; ajDebug("ajUtilUid\n"); uid = getuid(); if(!uid) { ajStrAssignClear(Puid); return ajFalse; } ajDebug(" uid: %d\n", uid); pwd = getpwuid(uid); if(!pwd) { ajStrAssignClear(P...
false
false
false
false
false
0
validate(const char *pString_,unsigned row_) { if (MSView::model()!=0) { MSFloat aFloat; if (aFloat.set(pString_)==MSError::MSSuccess) { vector().set(row_,aFloat); return MSTrue; } } return MSFalse; }
false
false
false
false
false
0
gsmld_config(struct tty_struct *tty, struct gsm_mux *gsm, struct gsm_config *c) { int need_close = 0; int need_restart = 0; /* Stuff we don't support yet - UI or I frame transport, windowing */ if ((c->adaption != 1 && c->adaption != 2) || c->k) return -EOPNOTSUPP; /* Check the MRU/MTU range looks sane *...
false
false
false
false
false
0
test_rebase_merge__copy_notes_disabled_in_config(void) { git_config *config; cl_git_pass(git_repository_config(&config, repo)); cl_git_pass(git_config_set_bool(config, "notes.rewrite.rebase", 0)); cl_git_pass(git_config_set_string(config, "notes.rewriteRef", "refs/notes/test")); test_copy_note(NULL, 0); }
false
false
false
false
false
0
addToMyParts(ModelPart * modelPart) { if (modelPart != NULL) m_binManager->addToMyParts(modelPart); }
false
false
false
false
false
0
long_richcompare(PyObject *self, PyObject *other, int op) { int result; PyObject *v; CHECK_BINOP(self, other); if (self == other) result = 0; else result = long_compare((PyLongObject*)self, (PyLongObject*)other); /* Convert the return value to a Boolean */ switch (op) { c...
false
false
false
false
false
0
find_components(struct master *master) { struct component_match *match = master->match; size_t i; int ret = 0; if (!match) { /* * Search the list of components, looking for components that * belong to this master, and attach them to the master. */ return master->ops->add_components(master->dev, master...
false
false
false
false
false
0
qcow_create(const char *filename, int64_t total_size, const char *backing_file, int flags) { int fd, header_size, backing_filename_len, l1_size, i, shift; QCowHeader header; uint64_t tmp; fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, 0644); if (fd < 0) r...
false
false
false
false
true
1
socket_new_ipcmsg(IPC_Channel* ch, const void* data, int len, void* private) { IPC_Message* hdr; if (ch == NULL || len < 0) { cl_log(LOG_ERR, "socket_new_ipcmsg:" " invalid parameter"); return NULL; } if (ch->msgpad > MAX_MSGPAD) { cl_log(LOG_ERR, "socket_new_ipcmsg: too many pads " "somet...
false
true
false
false
false
1
cache_load(unsigned char *id, unsigned int *size){ unsigned char *data; unsigned long fsize; /* Build cache filename. */ snprintf(cache_filename, PATH_MAX, "%s/%s", cache_directory, id); /* Try to open file for reading. */ FILE *file = fopen(cache_filename, "r"); if(!file){ DSFYDE...
false
false
false
false
true
1
fosfat_symlink (fosfat_t *fosfat, const char *location) { fosfat_bd_t *entry; char *link = NULL; if (!fosfat || !location) return NULL; entry = fosfat_search_insys (fosfat, location, S_BD); if (entry) { link = fosfat_get_link (fosfat, entry); free (entry); } if (!link) foslog (FOSLOG_...
false
false
false
false
false
0
time_range() { ANTLR_USE_NAMESPACE(antlr)RefToken tr_name = ANTLR_USE_NAMESPACE(antlr)nullToken; try { // for error handling match(TIME_RANGE); tr_name = LT(1); match(WORD); if ( inputState->guessing==0 ) { #line 1376 "pix.g" importer->time_range_name = tr_name->getText(); *dbg << "time_rang...
false
false
false
false
false
0
browseRootPath() { QString dir = QFileDialog::getExistingDirectory(this, tr("Select Directory")); if (!dir.isEmpty()) rootPathEdit_->setText(dir); }
false
false
false
false
false
0
derpol(int n, int k, real_t x, real_t a[]) { void norderpol(int, int, real_t, real_t []); int j; real_t fac; fac=1.0; norderpol(n,k,x,a); for (j=2; j<=k; j++) { fac *= j; a[j] *=fac; } }
false
false
false
false
false
0
conn_counter_init( Operation *op, void *ctx ) { slap_counters_t *sc; void *vsc = NULL; if ( ldap_pvt_thread_pool_getkey( ctx, (void *)conn_counter_init, &vsc, NULL ) || !vsc ) { vsc = ch_malloc( sizeof( slap_counters_t )); sc = vsc; slap_counters_init( sc ); ldap_pvt_thread_pool_setkey( ctx, (void*)conn_...
false
false
false
false
false
0
getMeanChildLogOdds() const{ double mean = 0; char c = 0; for (unsigned int i=0; i<8; i++) { if (childExists(i)) { mean += getChild(i)->getOccupancy(); c++; } } if (c) mean /= (double) c; return log(mean/(1-mean)); }
false
false
false
false
false
0
is_comment(const char *buf) { return ((strspn(buf, " #") > 0) && (strchr(buf, '#') != NULL) && strncmp(buf, "# ignore ", strlen("# ignore"))); }
false
false
false
false
false
0
getDefaultMonthInYear(int32_t eyear) { int32_t era = internalGetEra(); // TODO do we assume we can trust 'era'? What if it is denormalized? int32_t month = 0; // Find out if we are at the edge of an era if(eyear == kEraInfo[era].year) { // Yes, we're in the first year of this era. ...
false
false
false
false
false
0
reload_logger(int rotate, const char *altconf) { int queue_rotate = rotate; struct logchannel *f; int res = 0; AST_RWLIST_WRLOCK(&logchannels); if (qlog) { if (rotate < 0) { /* Check filesize - this one typically doesn't need an auto-rotate */ if (ftello(qlog) > 0x40000000) { /* Arbitrarily, 1 GB */ ...
false
false
false
false
true
1
IntrUnbRecName ( UInt rnam ) { Obj record; /* record, left operand */ /* ignore or code */ if ( IntrReturning > 0 ) { return; } if ( IntrIgnoring > 0 ) { return; } if ( IntrCoding > 0 ) { ...
false
false
false
false
false
0
zswap_frontswap_load(unsigned type, pgoff_t offset, struct page *page) { struct zswap_tree *tree = zswap_trees[type]; struct zswap_entry *entry; struct crypto_comp *tfm; u8 *src, *dst; unsigned int dlen; int ret; /* find */ spin_lock(&tree->lock); entry = zswap_entry_find_get(&tree->rbroot, offset); if (...
false
false
false
false
false
0
failover_message_dereference (failover_message_t **mp, const char *file, int line) { failover_message_t *m; m = (*mp); m -> refcnt--; if (m -> refcnt == 0) { if (m -> next) failover_message_dereference (&m -> next, file, line); if (m -> chaddr.data) dfree (m -> chaddr.data, file, line)...
false
false
false
false
false
0
Compile(v8::Handle<String> source, v8::ScriptOrigin* origin, v8::ScriptData* pre_data, v8::Handle<String> script_data) { ON_BAILOUT("v8::Script::Compile()", return Local<Script>()); LOG_API("Script::Compile"); ENTER_V8; Lo...
false
false
false
false
false
0
vecvalue( list, index ) register sptr list; int index; { register int offset, i; register nptr *n; for( ; list != NULL; list = list->next ) { offset = list->vsize * (index % list->nvalues); n = (list->which == 0) ? &list->ptr.n : list->ptr.b->nodes; for( i = 0; i < list->vsize...
false
false
false
false
true
1
stop() { // Not running if (!started) { return; } //---Stop process timer end_process_time = getProcessTime(); //---Stop wall clock timer end_wall_time = getWallClockTime(); stopped = 1; }
false
false
false
false
false
0
ListDraw(List *list) { List *l; GeomMakePath(list, 'L', path, pathlen); list->geomflags &= ~GEOM_ALPHA; for (l = list; l != NULL; l = l->cdr) { int lpathlen = pathlen+1; char *lpath = alloca(lpathlen+1); memcpy(lpath, path, pathlen); lpath[lpathlen-1] = 'l'; lpath[lpathlen] = '\0'; ...
false
false
false
false
false
0
setDateTimeFromCalendar(const Locale& locale, UErrorCode& status) { const UChar *resStr; int32_t resStrLen = 0; Calendar* fCalendar = Calendar::createInstance(locale, status); CalendarData calData(locale, fCalendar?fCalendar->getType():NULL, status); UResourceBundle *dateTimePatterns = calData.getB...
false
false
false
false
false
0
mark_exclude_vector(int loc, int len, int *vmark, int vlen) { int i; #ifdef DEBUG printf("delmark: %d-%d\n",loc, loc+len-1); #endif for (i=0;i<len;i++) { #ifdef DEBUG if (loc + i >= vlen) { printf("delmark buffer exceeded!!\n"); exit(0); } #endif vmark[loc+i] = 1; } #ifdef DEBUG printf...
false
false
false
false
false
0
filebrowser_add_files (GtkFileChooser * browser, GSList * files, bool_t play) { Index * list = index_new (); for (GSList * node = files; node; node = node->next) index_append (list, str_get (node->data)); if (play) aud_drct_pl_open_list (list); else aud_drct_pl_add_list (list,...
false
false
false
false
false
0
HPDF_FreeCCITTFax3(struct _HPDF_CCITT_Data *pData) { if(pData->tif_data!=NULL) { HPDF_Fax3CodecState* esp=pData->tif_data; if(esp->refline!=NULL) { free(esp->refline); esp->refline=NULL; } if(esp->runs!=NULL) { free(esp->runs); esp->runs=NULL; } free(pData->tif_data); pData->tif_data=NULL; }...
false
false
false
false
false
0
stbl_AppendDegradation(GF_SampleTableBox *stbl, u16 DegradationPriority) { if (!stbl->DegradationPriority) stbl->DegradationPriority = (GF_DegradationPriorityBox *) gf_isom_box_new(GF_ISOM_BOX_TYPE_STDP); stbl->DegradationPriority->priorities = (u16 *)gf_realloc(stbl->DegradationPriority->priorities, sizeof(u16) * s...
false
false
false
false
false
0
cpl_gaussian_eval_2d(const cpl_array * self, double x, double y) { cpl_errorstate prestate = cpl_errorstate_get(); const double B = cpl_array_get_double(self, 0, NULL); const double A = cpl_array_get_double(self, 1, NULL); const double R = cpl_array_get_double(self, 2, NULL); const double M...
false
false
false
false
false
0
snd_sonicvibes_out(struct sonicvibes * sonic, unsigned char reg, unsigned char value) { unsigned long flags; spin_lock_irqsave(&sonic->reg_lock, flags); outb(reg, SV_REG(sonic, INDEX)); udelay(10); outb(value, SV_REG(sonic, DATA)); udelay(10); spin_unlock_irqrestore(&sonic->reg_lock, flags);...
false
false
false
false
false
0
j2k_add_tlmarker( int tileno, opj_codestream_info_t *cstr_info, unsigned short int type, int pos, int len) { opj_marker_info_t *marker; if (!cstr_info) return; /* expand the list? */ if ((cstr_info->tile[tileno].marknum + 1) > cstr_info->tile[tileno].maxmarknum) { cstr_info->tile[tileno].maxmarknum = 100 + ...
false
false
false
false
false
0
AcpiExOpcode_1A_1T_0R ( ACPI_WALK_STATE *WalkState) { ACPI_STATUS Status = AE_OK; ACPI_OPERAND_OBJECT **Operand = &WalkState->Operands[0]; ACPI_FUNCTION_TRACE_STR (ExOpcode_1A_1T_0R, AcpiPsGetOpcodeName (WalkState->Opcode)); /* Examine the AML opcode */ switc...
false
false
false
false
false
0
TigerDigest(unsigned char *digest_str, unsigned int digest_len, PHP_TIGER_CTX *context) { unsigned int i; for (i = 0; i < digest_len; ++i) { digest_str[i] = (unsigned char) ((context->state[i/8] >> (8 * (i%8))) & 0xff); } }
false
false
false
false
false
0
_backup_audio_convert_orc_pack_double_s16_swap (OrcExecutor * ORC_RESTRICT ex) { int i; int n = ex->n; orc_union16 * ORC_RESTRICT ptr0; const orc_union64 * ORC_RESTRICT ptr4; orc_union64 var34; orc_union16 var35; orc_union32 var36; orc_union32 var37; orc_union16 var38; ptr0 = (orc_union16 *)ex->arr...
false
false
false
false
false
0
do_dump(int op) { char buf[DLMC_DUMP_SIZE]; memset(buf, 0, sizeof(buf)); if (op == OP_DUMP) dlmc_dump_debug(buf); else if (op == OP_DUMP_CONFIG) dlmc_dump_config(buf); buf[DLMC_DUMP_SIZE-1] = '\0'; do_write(STDOUT_FILENO, buf, strlen(buf)); printf("\n"); }
false
false
false
false
false
0
free_substream(struct snd_usb_substream *subs) { struct audioformat *fp, *n; if (!subs->num_formats) return; /* not initialized */ list_for_each_entry_safe(fp, n, &subs->fmt_list, list) { kfree(fp->rate_table); kfree(fp->chmap); kfree(fp); } kfree(subs->rate_list.list); }
false
false
false
false
false
0
_dxfFloatDataBoundingBoxDiagonal(float *data, int n_data, int data_dim) { float diagonal = 0.0; float *cur_data = data, *bbox = NULL; register int i,j; bbox = (float *) DXAllocateZero (2 * data_dim * sizeof (float)); if (!bbox) goto error; /* initialize the bounding box to the first a...
false
false
false
false
false
0
CopyAndAdvance(char **destPtr, char **srcPtr, int n) { char *dest = *destPtr; char *src = *srcPtr; int i; for (i = 0; i < n; i++) *dest++ = *src++; *destPtr = dest; *srcPtr = src; }
false
false
false
false
false
0
marshal_VOID__MINIOBJECT (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) { typedef void (*marshalfunc_VOID__MINIOBJECT) (gpointer obj, gpointer arg1, gpointer data2); register marshalfunc_VOID__MINIOBJECT c...
false
false
false
false
false
0
suspend(bool force) const { if(!mSystemSession->suspend(force)) throwError("SuspendError", tr("Suspend failed")); return thisObject(); }
false
false
false
false
false
0
getClones(UT_GenericVector<XAP_Frame*> *pvClonesCopy, XAP_Frame * pFrame) { UT_ASSERT(pvClonesCopy); UT_return_val_if_fail(pFrame,false); UT_ASSERT(pFrame->getViewNumber() > 0); // locate vector of this frame's clones CloneMap::const_iterator iter = m_hashClones.find(pFrame->getViewKey()); UT_GenericVector<XAP_F...
false
false
false
false
false
0
ParseEditorChunk() { ASSIMP_3DS_BEGIN_CHUNK(); // get chunk type switch (chunk.Flag) { case Discreet3DS::CHUNK_OBJMESH: ParseObjectChunk(); break; // NOTE: In several documentations in the internet this // chunk appears at different locations case Discreet3DS::CHUNK_KEYFRAMER: ParseKeyframeChunk(); ...
false
false
false
false
false
0
detach_conf(aClient *cptr, aConfItem *aconf) { Reg Link **lp, *tmp; aConfItem **aconf2,*aconf3; lp = &(cptr->confs); while (*lp) { if ((*lp)->value.aconf == aconf) { if ((aconf) && (Class(aconf))) { if (aconf->status & CONF_CLIENT_MASK) { if (ConfLinks(aconf) > 0) --ConfL...
false
false
false
false
false
0
calc_attenuation_trad(int att_cB) { att_cB = (int)(att_cB / awe_option.atten_sense); if (att_cB < 0) return 0; else if (att_cB > 956) return 255; return (unsigned char)(att_cB * 8 / 30); }
false
false
false
false
false
0
isl_upoly_pow(__isl_take struct isl_upoly *up, unsigned power) { struct isl_upoly *res; if (!up) return NULL; if (power == 1) return up; if (power % 2) res = isl_upoly_copy(up); else res = isl_upoly_one(up->ctx); while (power >>= 1) { up = isl_upoly_mul(up, isl_upoly_copy(up)); if (power % 2) r...
false
false
false
false
false
0
gst_static_caps_get (GstStaticCaps * static_caps) { GstCaps *caps; g_return_val_if_fail (static_caps != NULL, NULL); caps = (GstCaps *) static_caps; /* refcount is 0 when we need to convert */ if (G_UNLIKELY (g_atomic_int_get (&caps->refcount) == 0)) { const char *string; GstCaps temp; G_LOCK ...
false
false
false
false
false
0
krb5_create_checksum(krb5_context context, krb5_crypto crypto, krb5_key_usage usage, int type, void *data, size_t len, Checksum *result) { struct _krb5_checksum_type *ct = NULL; unsigned keyusage; /* type 0 -> pick from crypto */ if (type) { ct = _krb5_find_ch...
false
false
false
false
false
0
createTextElement(const QString &ns, const QString &tagName, const QString &text) { QDomElement e = d->s->doc().createElementNS(ns, tagName); e.appendChild(d->s->doc().createTextNode(text)); return e; }
false
false
false
false
false
0
tm_model_track_changed(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data) { Track *track; gtk_tree_model_get(model, iter, READOUT_COL, &track, -1); if (track == (Track *) data) { gtk_tree_model_row_changed(model, path, iter); return TRUE; } return FALSE; }
false
false
false
false
false
0
_e_wid_focus_hook(Evas_Object *obj) { E_Widget_Data *wd = NULL; wd = e_widget_data_get(obj); if (e_widget_focus_get(obj)) { edje_object_signal_emit(e_scrollframe_edje_object_get(wd->o_scroll), "e,state,focused", "e"); evas_object_focus_set(wd->o_fm, 1); ...
false
false
false
false
false
0
clean_supernodes(S) struct linsys *S; { struct supernode *s; int i,j,k,m; int n; for ( n = superstart ; n >= 0 ; n = s->next ) { s = slist + n; for ( i=0,j=0 ; i < s->rcount ; i++ ) { int rnum = INT(s->rlist)[i]; while ( REG(rnum)->merged != rnum ) rnum = REG(rnum)->merged; if ( REG(rnum)->t...
false
false
false
false
false
0
tun_newlink(unsigned flags, unsigned change, void *user_data) { int index = GPOINTER_TO_INT(user_data); if ((newlink_flags & IFF_UP) == (flags & IFF_UP)) { newlink_flags = flags; return; } if (flags & IFF_UP) { /* * We try to verify that connectivity through tunnel works ok. */ if (newlink_timeout_i...
false
false
false
false
true
1
encodeBlock(const int16_t *decoded, uint8_t *encoded) { choosePredictorForBlock(decoded); int channelCount = m_track->f.channelCount; // Encode predictor. for (int c=0; c<channelCount; c++) *encoded++ = m_state[c].predictorIndex; // Encode delta. for (int c=0; c<channelCount; c++) { *encoded++ = m_state[c...
false
false
false
false
false
0