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
wsgi_callable_object(request_rec *r, const char *s) { const char *name = NULL; const char *value = NULL; if (!s) return "application"; if (*s != '%') return s; name = s + 1; if (!*name) return "application"; if (strstr(name, "{ENV:") == name) { int len = ...
false
false
false
false
false
0
GDS_winds(unsigned char *gds, int verbose) { int scan = -1, mode = -1; if (gds != NULL) { if (GDS_LatLon(gds)) { scan = GDS_LatLon_scan(gds); mode = GDS_LatLon_mode(gds); } else if (GDS_Mercator(gds)) { scan =GDS_Merc_scan(gds); mode =GDS_Merc_mode(gds); } /* else if (GDS_Gnomon...
false
false
false
false
false
0
toggle_nm (gpointer data) { GstNetworkTool *tool = GST_NETWORK_TOOL (data); NMState state; state = nm_integration_get_state (tool); if (state == NM_STATE_DISCONNECTED || state == NM_STATE_CONNECTING || state == NM_STATE_CONNECTED) { /* "reboot" NM */ nm_integration_sleep (tool); ...
false
false
false
false
false
0
openFile( uint32_t fileid ) { map<uint32_t,FileOperationStatistics>::iterator it; it= fostatistics.find( fileid ); if( it != fostatistics.end() ) { FileOperationStatistics& fos= it->second; ++fos.nopen; } else { fostatistics.insert( pair<uint32_t, FileOperationStatistics> ( fileid, FileOperationStat...
false
false
false
false
false
0
sm_sis5595_exit(void) { pci_unregister_driver(&sis5595_pci_driver); if (s_bridge != NULL) { platform_device_unregister(pdev); platform_driver_unregister(&sis5595_driver); pci_dev_put(s_bridge); s_bridge = NULL; } }
false
false
false
false
false
0
g_vfs_ftp_task_done (GVfsFtpTask *task) { g_return_if_fail (task != NULL); g_vfs_ftp_task_release_connection (task); if (task->job) { if (g_vfs_ftp_task_is_in_error (task)) g_vfs_job_failed_from_error (task->job, task->error); else g_vfs_job_succeeded (task->job); } g_vfs_...
false
false
false
false
false
0
snd_emux_timer_callback(unsigned long data) { struct snd_emux *emu = (struct snd_emux *) data; struct snd_emux_voice *vp; unsigned long flags; int ch, do_again = 0; spin_lock_irqsave(&emu->voice_lock, flags); for (ch = 0; ch < emu->max_voices; ch++) { vp = &emu->voices[ch]; if (vp->state == SNDRV_EMUX_ST_PEN...
false
false
false
false
false
0
setmask() { int mask = 0; if (nevery) mask |= END_OF_STEP; return mask; }
false
false
false
false
false
0
UpdateCBoard (void) /************************************************************************** * * Updates cboard[]. cboard[i] returns the piece on square i. * **************************************************************************/ { BitBoard b; int piece, sq; memset (cboard, 0, sizeof (cboard)); ...
false
false
false
false
false
0
expm2(u64Int_t p, u64Int_t am) { u64Int_t p2, p1, pt1, r; Big ddm, dd1, dd2; int i; for (p2 = i = 1; i < 54; i++) { p2 <<= 1; if (p2 > p) break; } p1 = p; pt1 = p2 >> 1; r = 1; ddm[0] = am; ddm[1] = 0; while (1) { if (p1 >= pt1) { /* r = mod(2.0 * r, am) */ ddmuldd( 2, r...
false
false
false
false
false
0
mv_platform_resume(struct platform_device *pdev) { struct ata_host *host = platform_get_drvdata(pdev); const struct mbus_dram_target_info *dram; int ret; if (host) { struct mv_host_priv *hpriv = host->private_data; /* * (Re-)program MBUS remapping windows if we are asked to. */ dram = mv_mbus_dram_inf...
false
false
false
false
false
0
CRA_change(void) { Bit8u nibble, dcc; // Periodic Interrupt timer nibble = BX_CMOS_THIS s.reg[REG_STAT_A] & 0x0f; dcc = (BX_CMOS_THIS s.reg[REG_STAT_A] >> 4) & 0x07; if ((nibble == 0) || ((dcc & 0x06) == 0)) { // No Periodic Interrupt Rate when 0, deactivate timer bx_pc_system.deactivate_timer(BX_CMO...
false
false
false
false
false
0
proc_map_files_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags) { unsigned long vm_start, vm_end; struct vm_area_struct *vma; struct task_struct *task; int result; struct mm_struct *mm; result = -ENOENT; task = get_proc_task(dir); if (!task) goto out; result = -EACCES; if (!ptrace_ma...
false
false
false
false
false
0
nfs3_write_how (int *writetype, int write_trusted, int sync_trusted) { int ret = -1; if (*writetype == UNSTABLE) { /* On an UNSTABLE write, only return STABLE when trusted-write * is set. TW is also set when trusted-sync is set. */ i...
false
false
false
false
false
0
reset_all_write_date() { ArticleHashIterator it = m_hash_article->begin(); for( ; it != m_hash_article->end(); ++it ) ( *it )->reset_write_date(); }
false
false
false
false
false
0
scan_integer (NODE_T * p, A68_REF ref_file) { A68_FILE *f = FILE_DEREF (&ref_file); int ch; reset_transput_buffer (INPUT_BUFFER); ch = char_scanner (f); while (ch != EOF_CHAR && (IS_SPACE (ch) || IS_NL_FF (ch))) { if (IS_NL_FF (ch)) { skip_nl_ff (p, &ch, ref_file); } else { ch = char_scann...
false
false
false
false
false
0
check_changed2(GtkWidget *widget,gpointer *data){ LOG(LOG_DEBUG, "IN : check_changed2()"); if(GTK_TOGGLE_BUTTON(widget)->active){ bending_only_nohit = TRUE; } else { bending_only_nohit = FALSE; } LOG(LOG_DEBUG, "OUT : check_changed2()"); }
false
false
false
false
false
0
server_fremovexattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t op_errno, dict_t *xdata) { gf_common_rsp rsp = {0,}; rpcsvc_request_t *req = NULL; server_state_t *state = NULL; req = frame->local; state = CA...
false
false
false
false
false
0
cmp_include(APTR cmp_data, APTR list_data) { HSCINC *include = (HSCINC *) list_data; STRPTR fname1 = NULL; STRPTR fname2 = (STRPTR) cmp_data; #if DEBUG if (!include) { panic("include = NULL"); } else if (!include->name) { panic("fname1 = NULL"); } if (!fname2) ...
false
false
false
false
false
0
write_Primitive(icc *icp, icmPrimType ptype, char *p, void *prim) { switch(ptype) { case icmUInt8Number: return write_UInt8Number(*((unsigned int *)prim), p); case icmUInt16Number: return write_UInt16Number(*((unsigned int *)prim), p); case icmUInt32Number: return write_UInt32Number(*((unsigned int *)p...
true
true
false
false
false
1
try_combine_chains (vec<chain_p> *chains) { unsigned i, j; chain_p ch1, ch2, cch; vec<chain_p> worklist = vNULL; FOR_EACH_VEC_ELT (*chains, i, ch1) if (chain_can_be_combined_p (ch1)) worklist.safe_push (ch1); while (!worklist.is_empty ()) { ch1 = worklist.pop (); if (!chain_can_be_...
false
false
false
false
false
0
squashfs_copy_cache(struct page *page, struct squashfs_cache_entry *buffer, int bytes, int offset) { struct inode *inode = page->mapping->host; struct squashfs_sb_info *msblk = inode->i_sb->s_fs_info; void *pageaddr; int i, mask = (1 << (msblk->block_log - PAGE_CACHE_SHIFT)) - 1; int start_index = page->index & ~...
false
false
false
false
false
0
disposeImpl( void* firstElement, size_t elementSize, size_t elementCount, size_t capacity, void (*destroyElement)(void*)) const { if (destroyElement != nullptr) { ExceptionSafeArrayUtil guard(firstElement, elementSize, elementCount, destroyElement); guard.destroyAll(); } }
false
false
false
false
false
0
lt_extlang_dump(const lt_extlang_t *extlang) { const char *macrolang = lt_extlang_get_macro_language(extlang); const char *preferred = lt_extlang_get_preferred_tag(extlang); const char *prefix = lt_extlang_get_prefix(extlang); lt_string_t *string = lt_string_new(NULL); if (macrolang) { if (lt_string_length(stri...
false
false
false
false
false
0
dynalogin_read_config_from_file(apr_hash_t **config, const char *filename, apr_pool_t *pool) { apr_hash_t *_config = NULL; apr_status_t res; apr_file_t *f; char buf[CFG_LINEBUF_LEN + 1]; size_t len; int i; char *key, *val; *config = NULL; if((_config=apr_hash_make(pool)) == NULL) return DYNALOGIN_ERROR; ...
false
false
false
false
false
0
fill_in_arrays(Term t, BOOL sign, int depth) { if (!VARIABLE(t)) { int sn = SYMNUM(t); int i; if (sn >= Work_size) { /* Assume it's a symbol that was added after the start of the search. If we ignore symbols in features, we may get less discrimination, but all answers should be returned. ...
false
false
false
false
false
0
_F_mpz_poly_mul_karatsuba_odd_even(F_mpz_poly_t res, F_mpz_poly_t poly1, F_mpz_poly_t poly2) { // number of output coefficients ulong length = poly1->length + poly2->length - 1; F_mpz_poly_t scratch; ulong crossover; if (poly1->length > 1) { // allocate scratch space for low...
false
false
false
false
false
0
measureVerticalAngles() { verticalAnglesList.clear(); #ifdef HAVE_GLOB_H glob_t gdat; unsigned int i; string filename = fileSystemPrefix + imagePath + fileNamePattern + "000_*." + type; if( glob( filename.c_str(), 0, NULL, &gdat ) != 0 ){ globfree( &gdat ); } for( i=0; i < gdat.gl_pathc; i++ ){...
false
false
false
false
false
0
checkInstanceOfExp( Absyn *node, Table **fileTable, Table *localTable, Class *actClass, Table *classTable, Table *globalTable, boolean breakAllowed, Type *returnType, int pass) { Entry *booleanEntry = lookupClass(fileTable, globalTable, newSym...
false
false
false
true
false
1
tds_model_read_uint8 (TDSModel* self, GInputStream* stream, GError** error) { guint8 result = 0U; guchar buffer[1] = {0}; GInputStream* _tmp0_; guchar _tmp1_; GError * _inner_error_ = NULL; g_return_val_if_fail (self != NULL, 0U); g_return_val_if_fail (stream != NULL, 0U); _tmp0_ = stream; g_input_stream_read_...
false
false
false
false
false
0
censorUrls() { mPos = 0; while ( mPos < mText.length() ) { // Find start of url QString url; while ( mPos < mText.length() && url.isEmpty() ) { url = getUrl(); ++mPos; } if ( mPos < mText.length() && !url.isEmpty() ) { int start = mPos - url.length(); // Replace url wit...
false
false
false
false
false
0
RunTests() { this->CheckResume(); if(!this->CheckCycles()) { return; } this->TestHandler->SetMaxIndex(this->FindMaxIndex()); this->StartNextTests(); while(this->Tests.size() != 0) { if(this->StopTimePassed) { return; } this->CheckOutput(); this->StartNextTests(); ...
false
false
false
false
false
0
ioc_cache_validate_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t op_errno, struct iatt *stbuf, dict_t *xdata) { ioc_local_t *local = NULL; ioc_inode_t *ioc_inode = NULL; size_t destroy_size = 0; ...
false
false
false
false
false
0
sigmaHat() { // Combine cross section terms; factor 1/2 when identical quarks. if (id2 == id1) sigSum = 0.5 * (sigT + sigU + sigTU); else if (id2 == -id1) sigSum = sigT + sigST; else sigSum = sigT; // Answer. return (M_PI/sH2) * pow2(alpS) * sigSum; }
false
false
false
false
false
0
Get(vtkInformation* info, int idx) { if (idx >= this->Length(info)) { vtkErrorWithObjectMacro(info, "Information does not contain " << idx << " elements. Cannot return information value."); return 0; } int* values = this->Get(info); return va...
false
false
false
false
false
0
gfire_sq_savage_color_hex_for_digit(gchar p_ch) { int i = 0; while(savagenumcodes[i].ch) { if(savagenumcodes[i].ch == p_ch) return savagenumcodes[i].hex; i++; } return NULL; }
false
false
false
false
false
0
SetValues(cur, req, wid, args, num_args) Widget cur; Widget req; Widget wid; ArgList args; Cardinal *num_args; { CandidatePanelWidget old = (CandidatePanelWidget)cur; CandidatePanelWidget new = (CandidatePanelWidget)wid; Boolean redisplay = False; Boolean listspecified = False; int i; if (new->...
false
false
false
false
false
0
qpdf_init() { QTC::TC("qpdf", "qpdf-c called qpdf_init"); qpdf_data qpdf = new _qpdf_data(); qpdf->qpdf = new QPDF(); return qpdf; }
false
false
false
false
false
0
std_expr_name_handler (GnmConventionsOut *out, GnmExprName const *name) { GnmNamedExpr const *thename = name->name; GString *target = out->accum; if (!expr_name_is_active (thename)) { g_string_append (target, value_error_name (GNM_ERROR_REF, out->convs->output.translated)); return; } if (name->...
false
false
false
false
false
0
getConfiguration( io::IReadFile* file ) { tBSPLump l; l.offset = file->getPos(); l.length = file->getSize (); core::array<u8> entity; entity.set_used( l.length + 2 ); entity[l.length + 1 ] = 0; file->seek(l.offset); file->read( entity.pointer(), l.length); parser_parse( entity.pointer(), l.leng...
false
false
false
false
false
0
view_history_finalize (GObject *object) { GiggleViewHistoryPriv *priv; priv = GIGGLE_VIEW_HISTORY (object)->priv; if (priv->job) { giggle_git_cancel_job (priv->git, priv->job); g_object_unref (priv->job); priv->job = NULL; } if (priv->diff_current_job) { giggle_git_cancel_job (priv->git, priv->diff_curr...
false
false
false
false
false
0
HandleRequest() { const int bytes_left = _addr_len - _addr_buf.count(); _addr_buf.append(_socket->read(bytes_left)); qDebug() << "_addr_buf len" << _addr_buf.count(); if(_addr_buf.count() == _addr_len) { ProcessRequest(); } ReadFromSocket(); }
false
false
false
false
false
0
vector_op_rshift( vector* tgt, /*!< Target vector for storage of results */ const vector* left, /*!< Expression value being shifted left */ const vector* right /*!< Expression containing number of bit positions to shift */ ) { PROFILE(VECTOR_OP_RSHIFT); bool retval; /* Return value for this function...
false
false
false
false
false
0
unpack_RGBA_INT8(const void *src, GLfloat dst[][4], GLuint n) { const GLbyte *s = (const GLbyte *) src; GLuint i; for (i = 0; i < n; i++) { dst[i][RCOMP] = (GLfloat) s[i*4+0]; dst[i][GCOMP] = (GLfloat) s[i*4+1]; dst[i][BCOMP] = (GLfloat) s[i*4+2]; dst[i][ACOMP] = (GLfloat) s[i*4+3]; ...
false
false
false
false
false
0
exact_real_inverse (enum machine_mode mode, REAL_VALUE_TYPE *r) { const REAL_VALUE_TYPE *one = real_digit (1); REAL_VALUE_TYPE u; int i; if (r->class != rvc_normal) return false; /* Check for a power of two: all significand bits zero except the MSB. */ for (i = 0; i < SIGSZ-1; ++i) if (r->sig[i] ...
false
false
false
false
false
0
aim_im_sendch2_odcrequest(aim_session_t *sess, fu8_t *cookie, const char *sn, const fu8_t *ip, fu16_t port) { aim_conn_t *conn; aim_frame_t *fr; aim_snacid_t snacid; fu8_t ck[8]; aim_tlvlist_t *tl = NULL, *itl = NULL; int hdrlen, i; fu8_t *hdr; aim_bstream_t hdrbs; if (!sess || !(conn = aim_conn_findbygroup(...
false
false
false
false
false
0
getBinaryFile(string relativeFilePath) { //TODO: Check for .. in file path. No website should be able to access files outside the garmin device! // Check if site is allowed to read from that directory if (Log::enabledDbg()) { Log::dbg("getBinaryFile called for "+this->displayName); } if (Log::enabledDb...
false
false
false
false
false
0
ar5008_hw_set_rf_regs(struct ath_hw *ah, struct ath9k_channel *chan, u16 modesIndex) { u32 eepMinorRev; u32 ob5GHz = 0, db5GHz = 0; u32 ob2GHz = 0, db2GHz = 0; int regWrites = 0; int i; /* * Software does not need to program bank data * for single chip devices, that is AR9280 or anything * afte...
false
false
false
false
false
0
tstepsNewEntry(stream_t *streamptr) { int tsID = 0; int tstepsTableSize; tsteps_t *tstepsTable; tsID = streamptr->tstepsNextID++; tstepsTableSize = streamptr->tstepsTableSize; tstepsTable = streamptr->tsteps; /* If the table overflows, double its size. */ if ( tsID == tstepsTableS...
false
false
false
false
false
0
assoc_get(ASSOC *assoc, const char *name) { if (assoc->dbop == NULL) abort(); return dbop_get(assoc->dbop, name); }
false
false
false
false
false
0
inline_undotify(char *buf, size_t len) { unsigned pos; unsigned dots; char *reader, *writer; writer = buf; reader = writer; pos = 0; dots = 0; while (pos < len) { if (*reader == '.') { reader++; pos++; dots++; continue; } *writer++ = *reader++; pos++; } /* return new length of string ...
false
false
false
false
false
0
gnutls_bye (gnutls_session_t session, gnutls_close_request_t how) { int ret = 0; switch (STATE) { case STATE0: case STATE60: ret = _gnutls_io_write_flush (session); STATE = STATE60; if (ret < 0) { gnutls_assert (); return ret; } case STATE61: ...
false
false
false
false
false
0
IoSeq_append(IoSeq *self, IoObject *locals, IoMessage *m) { /*doc Sequence append(aNumber) Appends aNumber (cast to a byte) to the receiver. Returns self. */ int i; IO_ASSERT_NOT_SYMBOL(self); IOASSERT(IoMessage_argCount(m), "requires at least one argument"); for (i = 0; i < IoMessage_argCount(m); i ++) { ...
false
false
false
false
false
0
control_terminal( int sig ) { if(sig==SIGTTOU) { tcsetpgrp(1,getpgrp()); tcsetpgrp(2,getpgrp()); } else { tcsetpgrp(0,getpgrp()); } }
false
false
false
false
false
0
make_wall(char **maze, int x, int y, int dir) { maze[x][y] = 'D'; /* mark a door */ switch (dir) { case 0: { /* horizontal */ int i1; for (i1 = x-1; maze[i1][y] == 0; i1--) maze[i1][y] = '#'; for (i1 = x+1; maze[i1][y] == 0; i1++) maze[i1]...
false
false
false
false
false
0
compare(const path& p) const BOOST_NOEXCEPT { return detail::lex_compare(begin(), end(), p.begin(), p.end()); }
false
false
false
false
false
0
addLayer(String name) { iLayers.push_back(SLayer(name)); iLayers.back().iVisible.resize(countViews()); for (int i = 0; i < countViews(); ++i) iLayers.back().iVisible[i] = false; }
false
false
false
false
false
0
_rtl8812ae_get_integer_from_string(char *str, u8 *pint) { u16 i = 0; *pint = 0; while (str[i] != '\0') { if (str[i] >= '0' && str[i] <= '9') { *pint *= 10; *pint += (str[i] - '0'); } else { return false; } ++i; } return true; }
false
false
false
false
false
0
ui_minimal_dialog_new(GtkWindow *parent, const gchar *title) { GtkWidget *dialog; dialog = gtk_window_new(GTK_WINDOW_POPUP); if (parent) { gtk_window_set_transient_for(GTK_WINDOW(dialog), parent); gtk_window_set_destroy_with_parent(GTK_WINDOW(dialog), TRUE); } gtk_window_set_title(GTK_WINDOW(dialog), title)...
false
false
false
false
false
0
_is_same_pv(struct pv_match *pvmatch __attribute((unused)), struct pv_segment *pvseg, struct pv_area *pva) { if (pvseg->pv != pva->map->pv) return 0; return 1; }
false
false
false
false
false
0
process_tree(struct rooted_tree *tree, void(* output_function)(struct tree_properties *)) { struct tree_properties props; props.type = get_tree_type(tree); props.num_nodes = tree->nodes_in_order->count; props.num_leaves = leaf_count(tree); if (! get_properties(tree, &props)) { perror("Could not get tree prope...
false
false
false
false
false
0
checkGame( GameMap* game ) { if( game == NULL || game->packageData == NULL ) return; for ( PackageData::Packages::const_iterator i = game->packageData->packages.begin(); i != game->packageData->packages.end(); ++i ) packageRepository.checkPackageDependency( i->second, game->packageData ); }
false
false
false
false
false
0
StrongBonds_ (MolComplexS *mol_complexSP, int mol_complexI, ConfigS *configSP) { size_t total_bondsN = 0; size_t atomsN, atomI; /* Use signed int to store the following indices: */ int neigh_start, neigh_end, neighborI, combinedI; size_t neighbor_arrayI; AtomS *curr_atomSP, *curr_neighborSP; char *symbol...
false
false
false
false
false
0
stk807xpvr_frontend_attach0(struct dvb_usb_adapter *adap) { struct dib0700_adapter_state *state = adap->priv; if (!dvb_attach(dib8000_attach, &state->dib8000_ops)) return -ENODEV; dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 0); msleep(30); dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1); msleep(500); dib070...
false
false
false
false
false
0
af9005_write_tuner_registers(struct dvb_usb_device *d, u16 reg, u8 * values, int len) { /* don't let the name of this function mislead you: it's just used as an interface from the firmware to the i2c bus. The actual i2c addresses are contained in the data */ int ret, i, done = 0, fail = 0; u8 temp; ret...
false
false
false
false
false
0
patch(char *filename) { int fd, i, n, ret = 0; guchar version[3]; if ((fd = g_open(filename, O_RDWR)) == -1) { g_error(_("Error while opening firmware file for patching.")); return -1; } firmware_version(fd, version); n = G_N_ELEMENTS(patches); for (i = 0; i < n; i++) { g_message(_("Apply patch %i : %s"...
false
false
false
false
false
0
Execute () { Editor* editor = GetEditor(); Selection* s = editor->GetSelection(); Clipboard* cb = new Clipboard(); GraphicView* views = ((OverlayViewer*)editor->GetViewer())->GetCurrentGraphicView(); s->Sort(views); cb->CopyInit(s); index_clipboard(s, cb); editor->GetComponent()->Interp...
false
false
false
false
false
0
print_source_line( FRAME * frame ) { const char * file; int line; get_source_line( frame, &file, &line ); if ( line < 0 ) printf( "(builtin):" ); else printf( "%s:%d:", file, line ); }
false
false
false
false
false
0
modff(float x, float *iptr) { int32_t i0,j0; u_int32_t i; GET_FLOAT_WORD(i0,x); j0 = ((i0>>23)&0xff)-0x7f; /* exponent of x */ if(j0<23) { /* integer part in x */ if(j0<0) { /* |x|<1 */ SET_FLOAT_WORD(*iptr,i0&0x80000000); /* *iptr = +-0 */ return x; } else { i = (0x007fffff)>>j0; if((...
false
false
false
false
false
0
es_mapRGBA(sdl_data *sd, int len, char *buff) { char *bp, *start; int sendlen; SDL_Surface * sptr; Uint32 res; Uint8 r,g,b,a; bp = buff; POPGLPTR(sptr, bp); r = get8(bp); g = get8(bp); b = get8(bp); a = get8(bp); if(sptr == NULL || sptr->format == NULL) error(); res ...
false
false
false
false
false
0
PyUnknownEncodingHandler(void *encodingHandlerData, const XML_Char *name, XML_Encoding *info) { static unsigned char template_buffer[256] = {0}; PyObject* u; int i; void *data; unsigned int kind; if (PyErr_Occurred()) return XML_STATUS_E...
true
true
false
false
false
1
JimCheckConversion(const char *str, const char *endptr) { if (str[0] == '\0' || str == endptr) { return JIM_ERR; } if (endptr[0] != '\0') { while (*endptr) { if (!isspace(UCHAR(*endptr))) { return JIM_ERR; } endptr++; } } r...
false
false
false
false
false
0
calculate_minimum_redundancy(sym_freq *A, int n) { int root, leaf, next, avbl, used, dpth; if (n==0) return; else if (n==1) { A[0].m_key = 1; return; } A[0].m_key += A[1].m_key; root = 0; leaf = 2; for (next=1; next < n-1; next++) { if (leaf>=n || A[root].m_key<A[leaf].m_key)...
false
false
false
false
false
0
inf_text_gtk_buffer_active_user_notify_status_cb(GObject* object, GParamSpec* pspec, gpointer user_data) { InfTextGtkBuffer* buffer; InfTextGtkBufferPrivate* priv; GtkTextMark* insert_mark; GtkTextMark* sel_mark; ...
false
false
false
false
false
0
_set_key (bmc_config_state_data_t *state_data, const char *section_name, uint8_t key_type, const void *key, unsigned int key_len) { fiid_obj_t obj_cmd_rs = NULL; config_err_t rv = CONFIG_ERR_FATAL_ERROR; config_err_t ret; uint8_t channel_number; assert (state_data); assert ...
false
false
false
false
false
0
getVertexID(const LodData::Vertex* v) const { for (int i = 0; i < 3; i++) { if (vertex[i] == v) { return vertexID[i]; } } OgreAssert(0, ""); return 0; }
false
false
false
false
false
0
cli_scandesc(int desc, cli_ctx *ctx, cli_file_t ftype, uint8_t ftonly, struct cli_matched_type **ftoffset, unsigned int acmode, struct cli_ac_result **acres) { int ret = CL_EMEM, empty; fmap_t *map = *ctx->fmap; if((*ctx->fmap = fmap_check_empty(desc, 0, 0, &empty))) { ret = cli_fmap_scandesc(ctx, ftype, ...
false
false
false
false
false
0
load_cert(BIO *err, const char *file, int format, const char *pass, ENGINE *e, const char *cert_descrip) { X509 *x=NULL; BIO *cert; if ((cert=BIO_new(BIO_s_file())) == NULL) { ERR_print_errors(err); goto end; } if (file == NULL) { #ifdef _IONBF # ifndef OPENSSL_NO_SETVBUF_IONBF setvbuf(stdin, NULL, ...
false
false
false
false
false
0
xmpp_buddy_req(HybridAccount *account, HybridGroup *group, const gchar *id, const gchar *alias, gboolean accept, const gpointer user_data) { XmppStream *stream; XmppBuddy *buddy; HybridBuddy *bd; stream = hybrid_account_get_protocol_data(account); if (accept) { ...
false
false
false
false
false
0
obj_list_remove(struct obj_list *list, void (*freeFcn)(void *), TSS_HOBJECT hObject, TSS_HCONTEXT tspContext) { struct tsp_object *obj, *prev = NULL; MUTEX_LOCK(list->lock); for (obj = list->head; obj; prev = obj, obj = obj->next) { if (obj->handle == hObject) { /* validate tspContext */ if (obj->tspContex...
false
false
false
false
false
0
GetDirName(const string& path, string& dir) { string::size_type pos = path.length(); while (pos >= 1 && path[pos-1] != '/' && path[pos-1] != '\\') { pos--; } // position pos-1 is where the slash is, so if pos = 1 then the slash is the first // character of the path and the file is in the root of the system if (...
false
false
false
false
false
0
parse_catalog_server_description(char *server_string, char **host, int *port) { char *colon; colon = strchr(server_string, ':'); if(!colon) { *host = NULL; *port = 0; return 0; } *colon = '\0'; *host = strdup(server_string); *port = atoi(colon + 1); *colon = ':'; // if (*port) == 0, parsing failed,...
false
true
false
false
true
1
encoder( const ImageExportInfo & info ) { std::auto_ptr<Encoder> enc; std::string filetype = info.getFileType(); if ( filetype != "" ) { validate_filetype(filetype); std::auto_ptr<Encoder> enc2 = getEncoder( std::string( info.getFileName() ), filetype, std::string( info.getMode(...
false
false
false
false
false
0
logger_iface_proxy_get_favourite_contacts_finish (LoggerIface* self, GAsyncResult* _res_, int* result_length1, GError** error) { GDBusMessage *_reply_message; GVariant *_reply; GVariantIter _reply_iter; AccountFavourites* _result; int _result_length1; GVariant* _tmp9_; AccountFavourites* _tmp10_; int _tmp10__le...
false
false
false
false
false
0
compute_action(struct lemon *lemp, struct action *ap) { int act; switch( ap->type ){ case SHIFT: act = ap->x.stp->statenum; break; case SHIFTREDUCE: act = ap->x.rp->index + lemp->nstate; break; case REDUCE: act = ap->x.rp->index + lemp->nstate+lemp->nrule; break; case ...
false
false
false
false
false
0
RefreshStyleData() { if (!stylesValid) { stylesValid = true; AutoSurface surface(this); if (surface) { vs.Refresh(*surface); RefreshColourPalette(palette, true); palette.Allocate(wMain); RefreshColourPalette(palette, false); } if (wrapIndentMode == SC_WRAPINDENT_INDENT) { wrapAddIndent = pdoc-...
false
false
false
false
false
0
start_capability(parse_context_t* context, int nb_attributes, const xmlChar** attributes) { const xmlChar* xml_name = get_attribute(context, nb_attributes, attributes, ATTR_NAME); if(xml_name) { const xmlChar* xml_value = get_attribute(context, nb_attributes, attributes, ATTR_VALUE); const char* name = create_...
false
false
false
false
false
0
load_config_file(GKeyFile *config) { char **list; int i; if (config == NULL) return; list = g_key_file_get_string_list(config, "General", "Disable", NULL, NULL); for (i = 0; list && list[i] != NULL; i++) { if (g_str_equal(list[i], "FindMe")) enabled.findme = FALSE; else if (g_str_equal(list[i], ...
false
false
false
false
false
0
get_autoinscription(object_kind *kind) { return kind ? quark_str(kind->note) : NULL; }
false
false
false
false
false
0
apply_recursive_clicked (GtkWidget *recursive_button, NemoPropertiesWindow *window) { guint32 file_permission, file_permission_mask; guint32 dir_permission, dir_permission_mask; guint32 vfs_mask, vfs_new_perm, p; GtkWidget *button, *combo; gboolean active, is_folder, is_special, use_original; GList *l; GtkTr...
false
false
false
false
false
0
print_days_appts(struct tm *date) { CalendarEventList *ce_list; out = print_open(); if (!out) { return EXIT_FAILURE; } ce_list = NULL; get_days_calendar_events2(&ce_list, date, 2, 2, 2, CATEGORY_ALL, NULL); print_dayview(date, ce_list); print_close(out); free_CalendarEventList(&ce...
false
false
false
false
false
0
read_whole_file(FILE *fin) { size_t chunk_size = 65536; std::string accum; std::string chunk(chunk_size, 0); size_t num_read; while(0 < (num_read = fread(&chunk[0], 1, chunk_size, fin))) { accum.append(chunk, 0, num_read); } return accum; }
false
false
false
false
false
0
zoran_s_crop(struct file *file, void *__fh, const struct v4l2_crop *crop) { struct zoran_fh *fh = __fh; struct zoran *zr = fh->zr; int res = 0; struct zoran_jpg_settings settings; settings = fh->jpg_settings; if (fh->buffers.allocated) { dprintk(1, KERN_ERR "%s: VIDIOC_S_CROP - cannot change settings while...
false
false
false
false
false
0
miniexp_isa(miniexp_t p, miniexp_t c) { miniobj_t *obj = miniexp_to_obj(p); if (obj && obj->isa(c)) return obj->classof(); return miniexp_nil; }
false
false
false
false
false
0
ortran_(integer *nm, integer *n, integer *low, integer * igh, doublereal *a, doublereal *ort, doublereal *z) { /* System generated locals */ integer a_dim1, a_offset, z_dim1, z_offset, i_1, i_2, i_3; /* Local variables */ static doublereal g; static integer i, j, kl, mm, mp, mp1; /* ...
false
false
false
false
false
0
rule_id (rule) struct rules *rule; { struct rules *this_ruletab_entry, *canonical_rule = rule; static char edit_buffer[32], *canonical_name; int hasht, hasht_ext = 0; if (!rule) return ""; canonical_name = rule->name; if (rule->next) { /* find "canonical" (lexically first) name in rule group */ ...
false
false
false
false
false
0
Init() { const Byte kFastSlots = 22; int c = 2; g_FastPos[0] = 0; g_FastPos[1] = 1; for (Byte slotFast = 2; slotFast < kFastSlots; slotFast++) { UInt32 k = (1 << ((slotFast >> 1) - 1)); for (UInt32 j = 0; j < k; j++, c++) g_FastPos[c] = slotFast; } } }
false
false
false
false
false
0
get_image_page(gfp_t gfp_mask, int safe_needed) { void *res; res = (void *)get_zeroed_page(gfp_mask); if (safe_needed) while (res && swsusp_page_is_free(virt_to_page(res))) { /* The page is unsafe, mark it for swsusp_free() */ swsusp_set_page_forbidden(virt_to_page(res)); allocated_unsafe_pages++; res...
false
false
false
false
false
0
group_cursor_change (ETableGroup *etg, gint row, ETable *et) { ETableCursorLoc old_cursor_loc; old_cursor_loc = et->cursor_loc; et->cursor_loc = E_TABLE_CURSOR_LOC_TABLE; g_signal_emit (et, et_signals[CURSOR_CHANGE], 0, row); if (old_cursor_loc == E_TABLE_CURSOR_LOC_ETC...
false
false
false
false
false
0
StartupSUBTRANS(TransactionId oldestActiveXID) { int startPage; int endPage; /* * Since we don't expect pg_subtrans to be valid across crashes, we * initialize the currently-active page(s) to zeroes during startup. * Whenever we advance into a new page, ExtendSUBTRANS will likewise zero * the new page w...
false
false
false
false
false
0