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
ExtendGaussian(MeasureType *originalArray, MeasureType *extendedArray, int startingPointForInsertion) { // Use the parameters from originalArray to construct a Gaussian in // extendedArray // shifting the mean to the right by startingPointForInsertion. double mean = startingPointForInsertion + m_ComputedMean; ...
false
false
false
false
false
0
TestFile(string filename, string results_file) { std::ifstream mifs; if (!SafeOpen(mifs, filename.c_str())) { cout << "Bail out! Cannot read file " << filename << endl; return; } std::ifstream rifs; if (!SafeOpen(rifs, results_file.c_str())) { cout << "Bail out! Cannot read file "...
false
false
false
false
false
0
best_distance(const char*const*const suggs, const char *const word, size_t len) { int best_dist; const char*const* sugg_it; char* normalized_word; normalized_word = g_utf8_normalize (word, len, G_NORMALIZE_NFD); best_dist = g_utf8_strlen(normalized_word, -1); if(suggs) { for(sugg_it = suggs; *sugg_it; ++su...
false
false
false
false
false
0
gp_close_printer(const gs_memory_t *mem, FILE * pfile, const char *fname) { if (fname[0] == '|') pclose(pfile); else fclose(pfile); }
false
false
false
false
false
0
PlaceWidget(double bds[6]) { int i; double bounds[6], center[3]; double placeFactor = this->PlaceFactor; this->PlaceFactor = 1.0; this->AdjustBounds(bds, bounds, center); this->PlaceFactor = placeFactor; for (i=0; i<6; i++) { this->InitialBounds[i] = bounds[i]; } this->InitialLength = sq...
false
false
false
false
false
0
Pdata_pop(Pdata *self) { PickleState *st = _Pickle_GetGlobalState(); if (Py_SIZE(self) == 0) { PyErr_SetString(st->UnpicklingError, "bad pickle data"); return NULL; } return self->data[--Py_SIZE(self)]; }
false
false
false
false
false
0
addComponentData(IOP::MultipleComponentProfile& components, CORBA::ULong connection_id, CORBA::ULong max_connections, CORBA::ULong max_threads, CORBA::Boolean data_batch, CORBA::Boolean permit_interleaved, CORBA::Boolean server_hold_open) { CORBA::ULong...
false
false
false
false
false
0
vimoswcsrange (vimoswcs, ra1, ra2, dec1, dec2) struct WorldCoor *vimoswcs; /* World coordinate system structure */ double *ra1; /* Minimum right ascension of image (deg) (returned) */ double *ra2; /* Maximum right ascension of image (deg) (returned) */ double *dec1; /* Minimum declination of image (deg) (returned) ...
false
false
false
false
false
0
loadRawData( DataStreamPtr& stream, ushort uWidth, ushort uHeight, PixelFormat eFormat) { Image img; img.loadRawData(stream, uWidth, uHeight, eFormat); loadImage(img); }
false
false
false
false
false
0
InitializeHandles(vtkPoints* points) { if ( !points ){ return; } int npts = points->GetNumberOfPoints(); if ( npts < 2 ){ return; } double p0[3]; double p1[3]; points->GetPoint(0,p0); points->GetPoint(npts-1,p1); if ( vtkMath::Distance2BetweenPoints(p0,p1) == 0.0 ) { --npts; this->Closed...
false
false
false
false
false
0
null_request_fn(struct request_queue *q) { struct request *rq; while ((rq = blk_fetch_request(q)) != NULL) { struct nullb_cmd *cmd = rq->special; spin_unlock_irq(q->queue_lock); null_handle_cmd(cmd); spin_lock_irq(q->queue_lock); } }
false
false
false
false
false
0
priv_gst_structure_append_to_gstring (const GstStructure * structure, GString * s) { GstStructureField *field; guint i, len; g_return_val_if_fail (s != NULL, FALSE); g_string_append (s, g_quark_to_string (structure->name)); len = structure->fields->len; for (i = 0; i < len; i++) { char *t; GTy...
false
false
false
false
false
0
exsub(Expr_t * ex, register Exnode_t * expr, void *env, int global) { char *str; char *pat; char *repl; char *p; char *s; Extype_t v; int sub[20]; int flags = STR_MAXIMAL; int ng; str = (eval(ex, expr->data.string.base, env)).string; pat = (eval(ex, expr->data.string.pat, env)).string; if (expr->data.strin...
false
false
false
false
false
0
minimize(std::vector<unsigned int>& cut, bool sort_like_input) { double submod_min, new_min; int iter = 0; // Do maxflow for initial solution, then set the submodular cost higher // to kickstart the iterative optimization. new_min = F->segment(); submod_min = new_min + 1; // Re-establish the approximati...
false
false
false
false
false
0
getRandGrowth( int coeff ) { int tmp = 0; tmp = 2 * (int) (rand() % coeff); TRACE("GenericResource::getRandGrowth coeff %d , rand %d", coeff,tmp); return tmp; }
false
false
false
false
false
0
tapeCkNewFileCbk (TimeoutId id, void *d) { (void) d ; ASSERT (id == ckNewFileId) ; ASSERT (tapeCkNewFilePeriod > 0) ; tapesSetCheckNew () ; ckNewFileId = prepareSleep (tapeCkNewFileCbk,tapeCkNewFilePeriod,NULL) ; }
false
false
false
false
false
0
_fm_folder_init() { hash = g_hash_table_new((GHashFunc)fm_path_hash, (GEqualFunc)fm_path_equal); volume_monitor = g_volume_monitor_get(); if(G_LIKELY(volume_monitor)) { g_signal_connect(volume_monitor, "mount-added", G_CALLBACK(on_mount_added), NULL); g_signal_connect(volume_monitor, "mo...
false
false
false
false
false
0
arg_cat_optionv(char *dest, size_t ndest, const char *shortopts, const char *longopts, const char *datatype, int optvalue, const char *separator) { separator = separator ? separator : ""; if (shortopts) { const char *c = shortopts; while(*c) { /* "-a|-b|-c" ...
false
false
false
false
false
0
si_is_smc_running(struct radeon_device *rdev) { u32 rst = RREG32_SMC(SMC_SYSCON_RESET_CNTL); u32 clk = RREG32_SMC(SMC_SYSCON_CLOCK_CNTL_0); if (!(rst & RST_REG) && !(clk & CK_DISABLE)) return true; return false; }
false
false
false
false
false
0
close_connection(struct Client *client_p) { struct ConfItem *conf; struct AccessItem *aconf; struct ClassItem *aclass; assert(NULL != client_p); if (!IsDead(client_p)) { /* attempt to flush any pending dbufs. Evil, but .. -- adrian */ /* there is still a chance that we might send data to this sock...
false
false
false
false
true
1
delete_cronfile(const char *userName) { CronFile **pfile = &G.cron_files; CronFile *file; while ((file = *pfile) != NULL) { if (strcmp(userName, file->cf_username) == 0) { CronLine **pline = &file->cf_lines; CronLine *line; file->cf_has_running = 0; file->cf_deleted = 1; while ((line = *pline) !=...
false
false
false
false
false
0
clear_queue (GQueue * queue) { gpointer p; while ((p = g_queue_pop_head (queue))) gst_object_unref (p); }
false
false
false
false
false
0
del_all_accepts(struct Client *client_p) { rb_dlink_node *ptr; rb_dlink_node *next_ptr; struct Client *target_p; if(MyClient(client_p) && client_p->localClient->allow_list.head) { /* clear this clients accept list, and remove them from * everyones on_accept_list */ RB_DLINK_FOREACH_SAFE(ptr, next_ptr, ...
false
false
false
false
false
0
hex2bytes(const char *string, unsigned char *out, int len) { int i; for (i=0; i<len; i++) { char hex[3], *ep; hex[0]= *string++; if (!hex[0]) badusage(); hex[1]= *string++; if (!hex[1]) badusage(); hex[2]= 0; *out++ = strtoul(hex,&ep,16); if (ep != &hex[2]) badusage(); } }
false
false
false
false
false
0
unique_status(const char *s, void *ctx) { const struct edit_unique_ctx *unique_ctx = ctx; if (!strcmp(s, *unique_ctx->s)) return es_unchanged; return !unique_ctx->validate || unique_ctx->validate(s, unique_ctx->ctx) ? es_good : es_bad; }
false
false
false
false
false
0
wm8350_mic_handler(int irq, void *data) { struct wm8350_data *priv = data; struct wm8350 *wm8350 = priv->wm8350; u16 reg; int report = 0; #ifndef CONFIG_SND_SOC_WM8350_MODULE trace_snd_soc_jack_irq("WM8350 mic"); #endif reg = wm8350_reg_read(wm8350, WM8350_JACK_PIN_STATUS); if (reg & WM8350_JACK_MICSCD_LVL) ...
false
false
false
false
false
0
http_receive_request_chunked_entity(request, line_buffer) HTTP_Request *request; Line_Buffer *line_buffer; { ssize_t line_length; size_t chunk_length; size_t chunk_rest_length; ssize_t chunk_read_length; char *end_p; char line[HTTP_MAX_LINE_LENGTH + 1]; char *line_p; request->co...
false
false
false
false
false
0
_pm_save_everything(FILE *f, netsnmp_container *cin, int flags) { char line[STRINGMAX], *ptr; size_t len; netsnmp_assert(NULL != f); netsnmp_assert(NULL != cin); while (fgets(line, sizeof(line), f) != NULL) { ptr = line; len = strlen(line) - 1; if...
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)); CalendarNavbar *_t = static_cast<CalendarNavbar *>(_o); switch (_id) { case 0: _t->firstDateChanged(); break; case 1: _t...
false
false
false
false
false
0
ves_icall_Type_GetConstructors_internal (MonoReflectionType *type, guint32 bflags, MonoReflectionType *reftype) { MonoDomain *domain; static MonoClass *System_Reflection_ConstructorInfo; MonoClass *startklass, *klass, *refklass; MonoArray *res; MonoMethod *method; MonoObject *member; int i, match; gpointer ite...
false
false
false
false
false
0
AddRuleHash(const std::vector<std::string>& outputs, std::string const& content) { #if defined(CMAKE_BUILD_WITH_CMAKE) // Ignore if there are no outputs. if(outputs.empty()) { return; } // Compute a hash of the rule. RuleHash hash; { unsigned char const* data = ...
false
false
false
false
false
0
Read_am(MeshIstream &ff) { if (verbosity>1) cout << " -- ReadMesh .am_fmt file " << ff.CurrentFile << endl; Metric M1(1); IFortranUnFormattedFile f_in(ff); Int4 l=f_in.Record(); assert(l==2*sizeof(Int4)); f_in >> nbv >> nbt ; l=f_in.Record(); assert((size_t) l==nbt*sizeof(long)*4 + nbv*(2...
false
false
false
false
false
0
draw (Canvas* c, Graphic* gs) { if (!gs->GetBrush()->None()) { update(gs); #if __GNUC__>=2 && __GNUC_MINOR__>=5 || __GNUC__>=3 #undef Line _p->Line(c, _x0, _y0, _x1, _y1); #define Line _lib_iv(Line) #else _p->Line(c, _x0, _y0, _x1, _y1); #endif /* Line */ } }
false
false
false
false
false
0
stmt_overflow_infinity (gimple stmt) { if (is_gimple_assign (stmt) && get_gimple_rhs_class (gimple_assign_rhs_code (stmt)) == GIMPLE_SINGLE_RHS) return is_overflow_infinity (gimple_assign_rhs1 (stmt)); return false; }
false
false
false
false
false
0
parseatt(struct xmlparser * p) { const char * attname; int attnamelen; const char * attvalue; int attvaluelen; while(p->xml < p->xmlend) { if(*p->xml=='/' || *p->xml=='>') return 0; if( !IS_WHITE_SPACE(*p->xml) ) { char sep; attname = p->xml; attnamelen = 0; while(*p->xml!='=' && !IS_WHITE_SP...
false
false
false
false
false
0
AssignGlyphAttrsToClassMembers(GrcGlyphAttrMatrix * pgax, GdlRenderer * prndr, GrcLigComponentList * plclist, std::vector<GdlGlyphAttrSetting *> & vpglfaAttrs, int cgid, int & igid) { for (size_t iglfd = 0; iglfd < m_vpglfdMembers.size(); iglfd++) { m_vpglfdMembers[iglfd]->AssignGlyphAttrsToClassMembers(pgax, prn...
false
false
false
false
false
0
GetArrayTypeID( const char *type ) { if ( strcmp( type, "CELL" ) == 0 ) { return vtkExodusReader::CELL; } else if ( strcmp( type, "POINT" ) == 0 ) { return vtkExodusReader::POINT; } else if ( strcmp( type, "BLOCK" ) == 0 ) { return vtkExodusReader::BLOCK; } else if ( strcmp( ...
false
false
false
false
false
0
ndmp_3to9_fh_add_dir_free_request (ndmp9_fh_add_dir_request *request9) { int i; if (request9) { if(request9->dirs.dirs_val) { int n_ent = request9->dirs.dirs_len; for (i = 0; i < n_ent; i++) { ndmp9_dir *ent9 = &request9->dirs.dirs_val[i]; if (ent9->unix_name) NDMOS_API_FREE(ent9->unix_na...
false
false
false
false
false
0
print_hex(const struct dhcpv4_option *opt, int elem_size, void (*print)(const char *fmt, ...)) { const uint8_t *ptr = opt->data; const uint8_t *endptr = ptr + opt->len; for(; ptr < endptr; ptr++) print("%02x", *ptr); }
false
false
false
false
false
0
finalize() { if (nlc_) { nlc_->productIndex.clear(); LitVec::size_type i = nlc_->productLits.size(); ClauseCreator gc(ctx_.master()), bc(ctx_.master()); while (i > 1) { Literal B = nlc_->productLits[--i]; assert(B.watched()); B.clearWatch(); gc.start(); gc.add(B); for (Literal x; !(x = nlc_-...
false
false
false
false
false
0
test_tiff_directory_info(t4_state_t *s) { static const struct { float resolution; int code; } x_res_table[] = { { 102.0f/CM_PER_INCH, T4_X_RESOLUTION_R4}, { 204.0f/CM_PER_INCH, T4_X_RESOLUTION_R8}, { 300.0f/CM_PER_INCH, T4_X_RESOLUTION_300}, { 408.0f/CM_PE...
false
false
false
false
false
0
intersectTriangle(const Ray& ray,const GVector3& v0,const GVector3& v1,const GVector3& v2,double &dist,GVector3& normal) { GVector3 E1=v1-v0; GVector3 E2=v2-v0; GVector3 P = ray.getDirection().cross(E2); double det = E1*P; GVector3 T; if (det > 0) { T = ray.getOrigin() -v0; } else { T = v0 - ray...
false
false
false
false
false
0
WXMPUtils_RemoveProperties_1 ( XMPMetaRef wxmpObj, XMP_StringPtr schemaNS, XMP_StringPtr propName, XMP_OptionBits options, WXMP_Result * wResult ) { XMP_ENTER_WRAPPER ( "WXMPUtils_RemoveProperties_1" ) if ( wxmpObj == 0 ) XMP_Throw ( "Output XMP pointer is null", kXMPEr...
false
false
false
false
false
0
dico_stream_read_unbuffered(dico_stream_t stream, void *buf, size_t size, size_t *pread) { int rc = 0; if (!stream->read) return _stream_seterror(stream, ENOSYS, 0); if (!(stream->flags & DICO_STREAM_READ)) return _stream_seterror(stream, EACCES, 1); if (stream->flags & _STR_ERR) retu...
false
true
false
false
true
1
ocfs2_grab_pages_for_write(struct address_space *mapping, struct ocfs2_write_ctxt *wc, u32 cpos, loff_t user_pos, unsigned user_len, int new, struct page *mmap_page) { int ret = 0, i; unsigned long start, target_index, end_index, index; struct inode *inode = mapping->host; lo...
false
false
false
false
false
0
nfs41_handle_backchannel_fault(struct nfs_client *clp) { set_bit(NFS4CLNT_SESSION_RESET, &clp->cl_state); nfs4_schedule_state_manager(clp); dprintk("%s: server %s declared a backchannel fault\n", __func__, clp->cl_hostname); }
false
false
false
false
false
0
addChar(GfxState *state, double x, double y, double dx, double dy, double ox, double oy, Unicode *u, int uLen) { double x1, y1, w1, h1, dx2, dy2; int n, i; state->transform(x, y, &x1, &y1); n = curStr->len; // check that new character is in the same direction as current string // and is not t...
false
false
false
false
false
0
dbus_g_proxy_new_for_name (DBusGConnection *connection, const char *name, const char *path, const char *iface) { g_return_val_if_fail (connection != NULL, NULL); g_return_val_if_fail (g_dbus_is_name (name), NULL); g_re...
false
false
false
false
false
0
svg_drawpolyline(VPoint *vps, int n, int mode) { int i; if (n <= 0) { return; } svg_group_props(TRUE, FALSE); fprintf(prstream, " <path d=\"M%.4f,%.4f", scaleval(vps[0].x), scaleval(vps[0].y)); for (i = 1; i < n; i++) { if (i%10 == 0) { fprintf(prstrea...
false
false
false
false
false
0
parseKeyLine( n2n_cipherspec_t * spec, const char * linein ) { /* parameters are separated by whitespace */ char line[N2N_KEYFILE_LINESIZE]; char * lp=line; const char * token; strncpy( line, linein, N2N_KEYFILE_LINESIZE ); memset( spec, 0, sizeof( n2n_cipherspec_t ) )...
false
false
false
false
false
0
libipw_copy_snap(u8 * data, __be16 h_proto) { struct libipw_snap_hdr *snap; u8 *oui; snap = (struct libipw_snap_hdr *)data; snap->dsap = 0xaa; snap->ssap = 0xaa; snap->ctrl = 0x03; if (h_proto == htons(ETH_P_AARP) || h_proto == htons(ETH_P_IPX)) oui = P802_1H_OUI; else oui = RFC1042_OUI; snap->oui[0] = o...
false
false
false
false
false
0
complain_about_open(ErrorHandler *errh, const String &hname, int errno_val) { const char *dot = find(hname, '.'); String k_elt = hname.substring(hname.begin(), dot); if (errno_val == ENOENT) { String try_fn = "/click/" + k_elt; if (access("/click", F_OK) < 0) complain(errh, hname, CSERR_NO_R...
false
false
false
false
false
0
xsh_instrument_nir_corr_if_JH(cpl_frameset* raws, xsh_instrument* instr) { cpl_frame* frame=NULL; frame=cpl_frameset_get_frame(raws,0); if(instr->arm == XSH_ARM_NIR) { if(xsh_instrument_nir_is_JH(frame,instr)) { instr->config->order_min=13; instr->config->order_max=26; instr->config->o...
false
false
false
false
false
0
ffselect_table( fitsfile **fptr, /* IO - pointer to input table; on output it */ /* points to the new selected rows table */ char *outfile, /* I - name for output file */ char *expr, /* I - Boolean expression */ int *status) { ...
false
false
false
false
false
0
pid_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat) { struct inode *inode = d_inode(dentry); struct task_struct *task; const struct cred *cred; struct pid_namespace *pid = dentry->d_sb->s_fs_info; generic_fillattr(inode, stat); rcu_read_lock(); stat->uid = GLOBAL_ROOT_UID; stat->gid =...
false
false
false
false
false
0
calcLodLevelSize(const Mesh* pMesh) { if (isLodMixed(pMesh) || pMesh->getLodStrategy() != DistanceLodStrategy::getSingletonPtr()) { return 0; // Supported in v1_9+ } exportedLodCount = pMesh->getNumLodLevels(); size_t size = MSTREAM_OVERHEAD_SIZE; // Header //size...
false
false
false
false
false
0
dump_type_prefix (tree t, int flags) { if (TYPE_PTRMEMFUNC_P (t)) { t = TYPE_PTRMEMFUNC_FN_TYPE (t); goto offset_type; } switch (TREE_CODE (t)) { case POINTER_TYPE: case REFERENCE_TYPE: { tree sub = TREE_TYPE (t); dump_type_prefix (sub, flags); if (TREE_CODE (sub) == ARRAY...
false
false
false
false
false
0
UpdateSpellCritChance(uint32 school) { // For normal school set zero crit chance if (school == SPELL_SCHOOL_NORMAL) { SetFloatValue(PLAYER_SPELL_CRIT_PERCENTAGE1, 0.0f); return; } // For others recalculate it from: float crit = 0.0f; // Crit from Intellect crit += GetSpel...
false
false
false
false
false
0
send_packet(Octstr *out, int opcode, int sequence, ...) { va_list ap; int parm; unsigned char *value; int checksum; int old_len, new_len; if (activity == ACT_listen) return; old_len = octstr_len(out); octstr_format_append(out, "%c%02d:%03d%c", STX, opcode, sequence, TAB); va_start(ap, sequence); for (pa...
false
false
false
false
false
0
octstr_append(Octstr *ostr1, const Octstr *ostr2) { gw_assert(ostr1 != NULL); octstr_insert(ostr1, ostr2, ostr1->len); }
false
false
false
true
false
1
serial8250_request_rsa_resource(struct uart_8250_port *up) { unsigned long start = UART_RSA_BASE << up->port.regshift; unsigned int size = 8 << up->port.regshift; struct uart_port *port = &up->port; int ret = -EINVAL; switch (port->iotype) { case UPIO_HUB6: case UPIO_PORT: start += port->iobase; if (request...
false
false
false
false
false
0
_homebindIfInstance(Player* player) { if (player && !player->isGameMaster()) { Map* map = player->GetMap(); if (map->IsDungeon()) { // leaving the group in an instance, the homebind timer is started // unless the player is permanently saved to the instance ...
false
false
false
false
false
0
htab_map_update_elem(struct bpf_map *map, void *key, void *value, u64 map_flags) { struct bpf_htab *htab = container_of(map, struct bpf_htab, map); struct htab_elem *l_new, *l_old; struct hlist_head *head; unsigned long flags; u32 key_size; int ret; if (map_flags > BPF_EXIST) /* unknown flags */ return ...
false
true
false
false
false
1
get_hash() { HashStringValue* result=new HashStringValue(); ffields.for_each(add_field, result); return result; }
false
false
false
false
false
0
CharArray_get_value(CDataObject *self) { int i; char *ptr = self->b_ptr; for (i = 0; i < self->b_size; ++i) if (*ptr++ == '\0') break; return PyBytes_FromStringAndSize(self->b_ptr, i); }
false
false
false
false
false
0
tabAt(int index) { if (index >= d->pages.count()) { return 0; } QGraphicsWidget *page = d->pages.value(index); QGraphicsLayoutItem *returnItem = 0; QGraphicsLayout *lay = page->layout(); if (lay && lay->count() == 1) { returnItem = lay->itemAt(0); } else { returnIte...
false
false
false
false
false
0
gst_play_sink_vis_blocked (GstPad * tee_pad, GstPadProbeInfo * info, gpointer user_data) { GstPlaySink *playsink; GstPlayVisChain *chain; playsink = GST_PLAY_SINK (user_data); GST_PLAY_SINK_LOCK (playsink); GST_DEBUG_OBJECT (playsink, "vis pad blocked"); /* now try to change the plugin in the running ...
false
false
false
false
false
0
finish_prepare_screenshot (ScreenshotApplication *self, GdkRectangle *rectangle) { GdkPixbuf *screenshot; screenshot = screenshot_get_pixbuf (rectangle); if (screenshot == NULL) { g_critical ("Unable to capture a screenshot of any window"); if (screenshot_config->inte...
false
false
false
false
false
0
Clear() { if( paoFields != NULL ) delete[] paoFields; paoFields = NULL; nFieldCount = 0; if( pachData != NULL ) CPLFree( pachData ); pachData = NULL; nDataSize = 0; nReuseHeader = FALSE; }
false
false
false
false
false
0
ComputeAxes() { double normals[3][3]; for (int i = 0; i < 3; i++) { this->GetPlane(i)->GetNormal(normals[i]); } // The axes are the intersections of the plane normals. vtkMath::Cross(normals[0], normals[1], this->ZAxis); vtkMath::Cross(normals[1], normals[2], this->XAxis); vtkMath::Cross(norma...
false
false
false
false
false
0
vt_request_create(MPI_Request request, unsigned flags, int tag, int dest, int bytes, MPI_Datatype datatype, MPI_Comm comm) { struct VTRequestBlock *new_block; MPI_Datatype type; MPI_Group group; VT_MPI_INT intercomm; lastidx++; if (lastidx >= VT_REQBLK_SIZE) { if (head_blo...
false
false
false
false
false
0
isl_map_preimage_multi_pw_aff(__isl_take isl_map *map, enum isl_dim_type type, __isl_take isl_multi_pw_aff *mpa) { int n; isl_pw_multi_aff *pma; if (!map || !mpa) goto error; n = isl_map_dim(map, type); if (!isl_map_involves_dims(map, type, 0, n)) { isl_space *space; isl_multi_aff *ma; space = isl_mult...
false
false
false
false
false
0
gmlc_gui_server_tab_query_display_all_result(GmlcGuiServerTabQuery * pGmlcGuiSrvTabQuery) { GtkWidget * msgdlg; do { /* Modification query - Display affected rows */ if (pGmlcGuiSrvTabQuery->pGmlcMysqlQry->iErrCode == 0 && pGmlcGuiSrvTabQuery->pGmlcMysqlQry->iNbField == 0) { gmlc_gui_server_tab_query_display...
false
false
false
false
false
0
FuncLOG_TO ( Obj self, Obj filename ) { while ( ! IsStringConv(filename) ) { filename = ErrorReturnObj( "LogTo: <filename> must be a string (not a %s)", (Int)TNAM_OBJ(filename), 0L, "you can replace <filename> via 'return <filename>...
false
false
false
false
false
0
configapachelogfmt(void *opt, char *cmd, char *arg1, char *arg2, int rc) { char *p; if (rc == 0) { shortwarn(cmd, arg1, rc); return; } if (rc > 1) longwarn(cmd, arg1, arg2, rc); if ((p = apachelogfmt(arg1)) == NULL) warn('C', TRUE, "Sorry, can't parse \"%%...{format}t\" in %s: ignoring who...
false
false
false
false
false
0
count_nondeletable_pages(Relation onerel, LVRelStats *vacrelstats) { BlockNumber blkno; /* Strange coding of loop control is needed because blkno is unsigned */ blkno = vacrelstats->rel_pages; while (blkno > vacrelstats->nonempty_pages) { Buffer buf; Page page; OffsetNumber offnum, maxoff; bool ha...
false
false
false
false
false
0
checkElementValue(DcmElement &delem, const OFString &vm, const OFString &type, const OFCondition &searchCond, const char *moduleName) { OFBool result = OFTrue; DcmTag tag =...
false
false
false
false
false
0
islocalnet_sock(struct sockaddr *sa) { uint32_t host[4], family; if(!lnet) return 0; if(sa->sa_family == AF_INET) { struct sockaddr_in *sa4 = (struct sockaddr_in *)sa; family = INET_HOST; host[0] = htonl(sa4->sin_addr.s_addr); } else if(sa->sa_family == AF_INET6) { struct sockaddr_in6 *sa6 = (str...
false
false
false
false
false
0
whlp_prepare(WHLP h) { /* * We must go through pre_contexts and allocate a context ID to * each anonymous context, making sure it doesn't clash with * the existing contexts. * * Our own context IDs will just be of the form `t00000001', * and we'll increment the number each time and sk...
false
true
false
false
false
1
ulog64(unsigned long val, unsigned int log) { while (log-- && val) val >>= UNIT_SHIFT; return val; }
false
false
false
false
false
0
list_output_eval (GnmDependent *dep) { GnmEvalPos pos; GnmValue *v = gnm_expr_top_eval (dep->texpr, eval_pos_init_dep (&pos, dep), GNM_EXPR_EVAL_SCALAR_NON_EMPTY); SheetWidgetListBase *swl = DEP_TO_LIST_BASE_OUTPUT (dep); if (swl->result_as_index) sheet_widget_list_base_set_selection (swl, floor (value_ge...
false
false
false
false
false
0
strifind(const char* str, const char* substr) { // the case insensitive version of strstr -- finding a string within a strin int l,i; if (str==NULL || *str==0) return NULL; if (substr==NULL || *substr==0) return NULL; l=strlen(substr); char* smax=(char*)str+strlen(str)-l; //rightmost position that could m...
false
false
false
false
false
0
parse_strength(struct magic_set *ms, struct magic_entry *me, const char *line) { const char *l = line; char *el; unsigned long factor; struct magic *m = &me->mp[0]; if (m->factor_op != FILE_FACTOR_OP_NONE) { file_magwarn(ms, "Current entry already has a strength type: %c %d", m->factor_op, m->factor...
false
false
false
false
false
0
command_historycleanup(struct plugin_handle* plugin, struct plugin_user* user, struct plugin_command* cmd) { struct chat_history_data* data = (struct chat_history_data*) plugin->ptr; struct cbuffer* buf = cbuf_create(128); int rc = 0; rc = sql_execute(data, null_callback, NULL, "DELETE FROM chat_history;"); if ...
false
false
false
false
false
0
cli_cache_is_fresh (cli_cache_t *cache) { /* Check if all items are fresh */ return freshness_is_fresh (&cache->freshness_currpos) && freshness_is_fresh (&cache->freshness_currid) && freshness_is_fresh (&cache->freshness_playback_status) && freshness_is_fresh (&cache->freshness_active_playlist...
false
false
false
false
false
0
GetEntryString(int i) { if ( i < 0 || i >= this->NumberOfEntries ) { return NULL; } else { return this->TextMapper[i]->GetInput(); } }
false
false
false
false
false
0
LoadFile(struct config_entry *p, char *Arg, AfCmd Cmd, int x) { struct stat FileStats; FILE *fp; char *cp; char **pBuf; int Ret = 0; pBuf = (char **) p->var_ptr; if(p->var_ptr != NULL && *pBuf != NULL) { free(*pBuf); *pBuf = NULL; } switch(Cmd) { case AF_SET_VAR: ...
false
false
false
true
true
1
dwc3_ulpi_busyloop(struct dwc3 *dwc) { unsigned count = 1000; u32 reg; while (count--) { reg = dwc3_readl(dwc->regs, DWC3_GUSB2PHYACC(0)); if (!(reg & DWC3_GUSB2PHYACC_BUSY)) return 0; cpu_relax(); } return -ETIMEDOUT; }
false
false
false
false
false
0
gbf_project_model_remove_invalid_shortcut (GbfProjectModel *model, GtkTreeIter *iter) { GtkTreeIter child; gboolean valid; GbfTreeData *data; /* Get all shortcut */ valid = gtk_tree_model_iter_children (GTK_TREE_MODEL (model), &child, iter); while (valid) { gtk_tree_model_get (GTK_TREE_MODEL (model), &child, ...
false
false
false
false
false
0
Slab_Wrapper2(Pointer a) { struct argblk *ap = (struct argblk *)a; struct argblk a2; Object o; memcpy((char *)&a2, (char *)a, sizeof(struct argblk)); o = Object_Slab(a2.toslab, &a2); if (!o) return ((DXGetError() == ERROR_NONE) ? OK : ERROR); if (IsEmpty(o)) return OK; DXSetM...
false
false
false
false
false
0
get( size_t index, CPose3DPDFPtr &out_posePDF, CSensoryFramePtr &out_SF ) const { if (index>=m_posesObsPairs.size()) THROW_EXCEPTION("Index out of bounds"); out_posePDF = m_posesObsPairs[index].first; out_SF = m_posesObsPairs[index].second; }
false
false
false
false
false
0
e_fwin_zone_shutdown(E_Zone *zone) { Eina_List *f, *fn; E_Fwin *win; const char *dev, *path; EINA_LIST_FOREACH_SAFE(fwins, f, fn, win) { if (win->zone != zone) continue; win->path->desktop_mode = e_fm2_view_mode_get(win->cur_page->fm_obj); e_fm2_path_get(win->cur_page->fm_obj, ...
false
false
false
false
false
0
get_routing_data(void *n) { g_assert(n != NULL); switch (((struct node_magic *) n)->magic) { case NODE_MAGIC: { struct gnutella_node *gn = n; struct routing_udp_node *un; if (!NODE_IS_UDP(gn)) return gn->routing_data; /* * Since we have to get at the routing data of an UDP node, we * nee...
false
false
false
false
false
0
location_gnome_clock_init(location_gnome_clock_state_t *state) { g_type_init(); GConfClient *client = gconf_client_get_default(); /* Get a list of active applets in the panel. */ GSList *applets = gconf_client_get_list(client, "/apps/panel/general/applet_id_list", GCONF_VALUE_STRING, NULL); if (applets ==...
false
false
false
false
false
0
buildApplicationIndex(bool unusedOnly) { foreach (AppsInfo *info, m_appsInfoList) { info->dictCategories.clear(); QMutableHashIterator<QString,KService::Ptr> it = info->applications; while (it.hasNext()) { KService::Ptr s = it.next().value(); if (unusedOnly && m_usedAppsD...
false
false
false
false
false
0
amdgpu_atombios_scratch_regs_lock(struct amdgpu_device *adev, bool lock) { uint32_t bios_6_scratch; bios_6_scratch = RREG32(mmBIOS_SCRATCH_6); if (lock) { bios_6_scratch |= ATOM_S6_CRITICAL_STATE; bios_6_scratch &= ~ATOM_S6_ACC_MODE; } else { bios_6_scratch &= ~ATOM_S6_CRITICAL_STATE; bios_6_scratch |= AT...
false
false
false
false
false
0
_iterator_for_each(iterator_info *ii, netsnmp_container_obj_func *f, void *ctx) { netsnmp_ref_void loop_ctx = { NULL }; netsnmp_ref_void tmp = { NULL }; DEBUGMSGT(("container_iterator",">%s\n", "_iterator_foreach")); if(NULL == ii) return; if(ii->init_loop_ctx) ...
false
false
false
false
false
0
blame_copy_callback(const struct option *option, const char *arg, int unset) { int *opt = option->value; /* * -C enables copy from removed files; * -C -C enables copy from existing files, but only * when blaming a new file; * -C -C -C enables copy from existing files for * everybody */ if...
false
false
false
false
false
0
inflate_run(VALUE args) { struct zstream *z = (struct zstream*)((VALUE*)args)[0]; VALUE src = ((VALUE*)args)[1]; zstream_run(z, (Bytef*)RSTRING_PTR(src), RSTRING_LEN(src), Z_SYNC_FLUSH); zstream_run(z, (Bytef*)"", 0, Z_FINISH); /* for checking errors */ return zstream_detach_buffer(z); }
false
false
false
false
false
0
e1000_kumeran_lock_loss_workaround(struct e1000_hw *hw) { int32_t ret_val; int32_t reg; int32_t cnt; uint16_t phy_data; if (hw->kmrn_lock_loss_workaround_disabled) return E1000_SUCCESS; /* Make sure link is up before proceeding. If not just return. * Attempting this while link is...
false
false
false
false
false
0