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
AdoptBlock( int nXBlockOff, int nYBlockOff, GDALRasterBlock * poBlock ) { int nBlockIndex; if( !InitBlockInfo() ) return CE_Failure; /* -------------------------------------------------------------------- */ /* Simple case without subblocking. ...
false
false
false
false
false
0
randomFrenchCity() const { if (d->zipCodes.isEmpty()) d->readZipCodes(); QPair<int, QString> p; int r = makeRand(d->zipCodes.count() - 1); p.first = d->zipCodes.keys().at(r); p.second = d->zipCodes.value(p.first); return p; }
false
false
false
false
false
0
uploadEntry(Provider *provider, Entry *entry) { //kDebug() << "Uploading " << entry->name().representation() << "..."; if (m_uploadedentry) { kError() << "Another upload is in progress!" << endl; return false; } if (!provider->uploadUrl().isValid()) { kError() << "The provider ...
false
false
false
false
false
0
gen_indirect_jump (rtx operand0) { rtx _val = 0; start_sequence (); { rtx operands[1]; operands[0] = operand0; #line 1474 "/home/dcharvest/ubuntu64-builder/genericMake/build/toolchain/dl/gcc-4.7.4/gcc/config/xtensa/xtensa.md" { rtx dest = operands[0]; if (GET_CODE (dest) != REG || GET_MODE (dest) != P...
false
false
false
false
false
0
spl_ptr_heap_insert(spl_ptr_heap *heap, spl_ptr_heap_element elem, void *cmp_userdata TSRMLS_DC) { /* {{{ */ int i; if (heap->count+1 > heap->max_size) { /* we need to allocate more memory */ heap->elements = (void **) safe_erealloc(heap->elements, sizeof(spl_ptr_heap_element), (heap->max_size), (sizeof(spl_ptr...
false
false
false
false
false
0
phantom_post_rds ( struct phantom_nic *phantom, struct phantom_rds *rds ) { unsigned int rds_producer_idx; unsigned int next_rds_producer_idx; struct phantom_rds *entry; /* Copy descriptor to ring */ rds_producer_idx = phantom->rds_producer_idx; entry = &phantom->desc->rds[rds_producer_idx]; memcpy ( ...
false
true
false
false
false
1
getnum(unsigned base, int count) { int c, n; unsigned i; for (n = 0; count; count--) { if (isdigit(c = input())) i = c - '0'; else i = toupper(c) - 'A' + 10; if (i > base) { unput(c); break; } n = n * base + i; } return n; }
false
false
false
false
false
0
get_timer_desc(fsa_timer_t * timer) { if (timer == election_trigger) { return "Election Trigger"; } else if (timer == election_timeout) { return "Election Timeout"; } else if (timer == shutdown_escalation_timer) { return "Shutdown Escalation"; } else if (timer == integration_t...
false
false
false
false
false
0
jobs_next( struct state * s, struct job * job ) { struct jobs * j; if ( !( j = s->job_mngr ) ) return 0; /* int kk = 0; for (kk = 0; kk<10; kk++) { printf("%d ", j->processed[kk].n); } printf("\n"); */ if ( j->finished ) return 0; /* Finding next available job */ struct job next; ...
false
false
false
false
false
0
moveBall(const int boxPositionFrom, const int boxPositionTo) { int newPos = positionAfterMovingBall(boxPositionFrom, boxPositionTo); if (!m_pause && m_inputAccepted && (!m_balls->containsVisible(boxPositionTo)) && (!m_ballsUnsure->containsVisible(boxPositionTo))) { m_markersNothing->remove(boxPositionTo); if (bo...
false
false
false
false
false
0
set_var_compressed(int ogrp, int o_varid) { int stat = NC_NOERR; if (option_deflate_level >= 0) { int deflate = 1; NC_CHECK(nc_def_var_deflate(ogrp, o_varid, option_shuffle_vars, deflate, option_deflate_level)); } return stat; }
false
false
false
false
false
0
data(const QModelIndex &index, int role) const { if (!index.isValid()) return QVariant(); if (index.row() < 0 || index.row() >= d->m_UserCalendars.count()) return QVariant(); const UserCalendar *u = d->m_UserCalendars.at(index.row()); switch (role) { case Qt::DisplayRole: case ...
false
false
false
false
false
0
gf_rtp_reorderer_get(GF_RTPReorder *po, u32 *pck_size) { GF_POItem *t; u32 bounds; void *ret; if (!po || !pck_size) return NULL; *pck_size = 0; //empty queue if (!po->in) return NULL; //check we have received the first packet if ( po->head_seqnum && po->MaxCount && (po->MaxCount > po->Count) && (po->i...
false
false
false
false
false
0
GenerateCRD(void) { cmsHPROFILE hProfile = OpenStockProfile(0, cOutProf); size_t n; char* Buffer; cmsUInt32Number dwFlags = 0; if (hProfile == NULL) return; if (BlackPointCompensation) dwFlags |= cmsFLAGS_BLACKPOINTCOMPENSATION; if (Undecorated) dwFlags |= cmsFLAGS_NODEFAULTRESOURCEDEF;...
false
false
false
false
true
1
Translate(double eventPos[2]) { double x1[3], x2[3], y1[3], y2[3], dpos[3]; dpos[0] = dpos[1] = dpos[2] = 0.0; this->XAxis->GetPositionCoordinate()->GetValue(x1); this->XAxis->GetPosition2Coordinate()->GetValue(x2); this->YAxis->GetPositionCoordinate()->GetValue(y1); this->YAxis->GetPosition2Coordinate()...
false
false
false
false
false
0
get(LLVMContext &Context, const std::vector<Constant*>& V, bool packed) { std::vector<const Type*> StructEls; StructEls.reserve(V.size()); for (unsigned i = 0, e = V.size(); i != e; ++i) StructEls.push_back(V[i]->getType()); return get(StructType::get(Context, StructEls, packed...
false
false
false
false
false
0
dma_pte_clear_range(struct dmar_domain *domain, unsigned long start_pfn, unsigned long last_pfn) { unsigned int large_page = 1; struct dma_pte *first_pte, *pte; BUG_ON(!domain_pfn_supported(domain, start_pfn)); BUG_ON(!domain_pfn_supported(domain, last_pfn)); BUG_ON(start_pfn > last_pfn); /* we don't ne...
false
false
false
false
false
0
webauth_keyring_best_key(struct webauth_context *ctx, const struct webauth_keyring *ring, enum webauth_key_usage usage, time_t hint, const struct webauth_key **output) { size_t i; time_t now, valid; struct webauth_keyring_entry *best...
false
false
false
false
false
0
nm_setting_ip4_config_add_dns_search (NMSettingIP4Config *setting, const char *dns_search) { NMSettingIP4ConfigPrivate *priv; GSList *iter; g_return_val_if_fail (NM_IS_SETTING_IP4_CONFIG (setting), FALSE); g_return_val_if_fail (dns_search != NULL, FALSE); g_return_val_if_fail...
false
false
false
false
false
0
pref_end_dictgroup() { #if 0 GtkTreeIter parent_iter; gchar *title; #endif LOG(LOG_DEBUG, "IN : pref_end_dictgroup()"); if(update_last_dictionary() == FALSE) return(FALSE); #if 0 // "Disk Search Result" $B$H$$$&%0%k!<%W$,$"$C$?$i:o=|$9$k(B if(gtk_tree_model_get_iter_first(GTK_TREE_MODEL(dict_store), &pare...
false
false
false
false
false
0
maybePrintComdat(formatted_raw_ostream &Out, const GlobalObject &GO) { const Comdat *C = GO.getComdat(); if (!C) return; if (isa<GlobalVariable>(GO)) Out << ','; Out << " comdat"; if (GO.getName() == C->getName()) return; Out << '('; PrintLLVMName(Out, C->getNam...
false
false
false
false
false
0
mark_out_glyphs(const Gsub &gsub, Vector<bool> &gmap) const { int nlookup = _d.u16(4); switch (_type) { case L_SINGLE: for (int i = 0; i < nlookup; i++) { GsubSingle x(subtable(i)); // this pattern makes gcc-3.3.4 happier x.mark_out_glyphs(gmap); } return; case L_MULTIPLE: for (int i =...
false
false
false
false
false
0
component_bind_all(struct device *master_dev, void *data) { struct master *master; struct component *c; int ret = 0; WARN_ON(!mutex_is_locked(&component_mutex)); master = __master_find(master_dev, NULL); if (!master) return -EINVAL; list_for_each_entry(c, &master->components, master_node) { ret = componen...
false
false
false
false
false
0
aer_report_error(const char *fmt) { sub_context_ty sc; aer_lex_error(sc, fmt); }
false
false
false
false
false
0
hiddev_lookup_report(struct hid_device *hid, struct hiddev_report_info *rinfo) { unsigned int flags = rinfo->report_id & ~HID_REPORT_ID_MASK; unsigned int rid = rinfo->report_id & HID_REPORT_ID_MASK; struct hid_report_enum *report_enum; struct hid_report *report; struct list_head *list; if (rinfo->report_type < ...
false
false
false
false
false
0
bcf_hrec_find_key(bcf_hrec_t *hrec, const char *key) { int i; for (i=0; i<hrec->nkeys; i++) if ( !strcasecmp(key,hrec->keys[i]) ) return i; return -1; }
false
true
false
false
false
1
serialize_leaf(DDS &dds, ConstraintEvaluator &eval, Marshaller &m, bool ce_eval) { DBG(cerr << "Entering Sequence::serialize_leaf for " << name() << endl); int i = (d_starting_row_number != -1) ? d_starting_row_number : 0; // read_row returns true if valid data was read, false if t...
false
false
false
false
false
0
remove_chain_operator(int op_index) { if (op_index < 0) op_index = selected_chainop_number_rep; CHAIN_OPERATOR *to_remove = 0; if (op_index > 0 && op_index <= static_cast<int>(chainops_rep.size())) to_remove = chainops_rep[op_index - 1].cop; if (to_remove != 0) { for(std::vector<CHAIN::COP_...
false
false
false
false
false
0
paint_long_pipeline (TestState *state) { int i; for (i = 0; i < LONG_ARRAY_SIZE; i++) { int location = state->long_uniform_locations[i]; cogl_pipeline_set_uniform_1i (state->long_pipeline, location, i == LONG_ARRAY_SIZE - 1); ...
false
false
false
false
false
0
fill_buffer(int sockfd) { int n, stat = 1; char buf[1000]; statbuf[0] = '\0'; statlen = 0; if (net_send(sockfd, "status", 6) != 6) { snprintf(errmsg, sizeof(errmsg), "fill_buffer: write error on socket\n"); return 0; } while ((n = net_recv(sockfd, buf, sizeof(buf)-1)) > 0) { bu...
false
false
false
false
false
0
main(int argc, char **argv) { SGML_PARSER sgml; SGML_HANDLERS handlers; memset(&handlers, 0, sizeof(handlers)); handlers.elementBegin = elementBegin; handlers.elementEnd = elementEnd; handlers.attributeNew = attributeNew; handlers.textNew = textNew; sgmlParserInitialize(&sgml, SGML_EXTENSION_TYPE_CUS...
false
false
false
false
false
0
handler_index( HttpMessage& request, HttpMessage& response ){ response_options_t out; std::string body; if( request.get_path() != "/index" ){ out.ok = false; return out; } body += "/*************************\\\n"; body += "| |\n"; body += "| Saiga Server |\n"; body +=...
false
false
false
false
false
0
unlink_pads (const GValue * item, gpointer user_data) { GstPad *pad; GstPad *peer; pad = g_value_get_object (item); if ((peer = gst_pad_get_peer (pad))) { if (gst_pad_get_direction (pad) == GST_PAD_SRC) gst_pad_unlink (pad, peer); else gst_pad_unlink (peer, pad); gst_object_unref (peer...
false
false
false
false
false
0
gfire_game_by_id(guint32 p_gameid) { GList *cur = gfire_games; for(; cur; cur = g_list_next(cur)) { if(((gfire_game*)cur->data)->id == p_gameid) return (gfire_game*)cur->data; } return NULL; }
false
false
false
false
false
0
fitsbin_write_items_to(fitsbin_chunk_t* chunk, void* data, int N, FILE* fid) { if (fwrite(data, chunk->itemsize, N, fid) != N) { SYSERROR("Failed to write %i items", N); return -1; } return 0; }
false
false
false
false
false
0
vpfe_s_std(struct file *file, void *priv, v4l2_std_id std_id) { struct vpfe_device *vpfe = video_drvdata(file); struct vpfe_subdev_info *sdinfo; int ret; vpfe_dbg(2, vpfe, "vpfe_s_std\n"); sdinfo = vpfe->current_subdev; if (!(sdinfo->inputs[0].capabilities & V4L2_IN_CAP_STD)) return -ENODATA; /* If streamin...
false
false
false
false
false
0
gf128mul_free_64k(struct gf128mul_64k *t) { int i; for (i = 0; i < 16; i++) kfree(t->t[i]); kfree(t); }
false
false
false
false
false
0
gst_video_balance_planar_yuv (GstVideoBalance * videobalance, GstVideoFrame * frame) { gint x, y; guint8 *ydata; guint8 *udata, *vdata; gint ystride, ustride, vstride; gint width, height; gint width2, height2; guint8 *tabley = videobalance->tabley; guint8 **tableu = videobalance->tableu; guint8 **...
false
false
false
false
false
0
e_cal_client_view_start (ECalClientView *client_view, GError **error) { GMainContext *main_context; GError *local_error = NULL; g_return_if_fail (E_IS_CAL_CLIENT_VIEW (client_view)); /* Emit signals from the current thread-default main context. */ main_context = g_main_context_ref_thread...
false
false
false
false
false
0
load(const char* file, int flags) { if(__SHARED_MATRIX_DISABLED) flags = MATRIX_LOCAL; if((flags & MATRIX_LOCAL) && (flags & MATRIX_CREATE)) throw "MATRIX_LOCAL and MATRIX_CREATE are incompatible"; if((flags & MATRIX_ATTACH) && attach(file)) { this->bShared = true; return; } this->bShared = ((flags & MATR...
false
false
false
false
false
0
hybrid_variable_set_string_default(HybridAccountVariable *var, const gchar *defalut_value) { g_return_if_fail(VARIABLE_TYPE_STRING == var->type); g_free(var->str_value); var->str_value = g_strdup(defalut_value); }
false
false
false
false
false
0
L1() {register object *base=vs_base; register object *sup=base+VM1; VC1 vs_reserve(VM1); ihs_check; {object V1; check_arg(1); V1=(base[0]); vs_top=sup; goto TTL; TTL:; base[1]=symbol_function(((object)VV[64])); base[2]= (V1); base[4]=symbol_function(((object)VV[65])); base[6]=symbol_function(((object)VV[66]...
false
false
false
false
false
0
set_render_hint(page_renderer::render_hint hint, bool on) { if (on) { d->hints |= hint; } else { d->hints &= ~(int)hint; } }
false
false
false
false
false
0
turbo_update_tachometer(void) { int i; char buf[8] = "Speed00"; for (i = 0; i < 16; i++) { buf[5] = '0' + i / 10; buf[6] = '0' + i % 10; artwork_show(buf, i == turbo_speed); } }
false
false
false
false
false
0
wdidle3_data_in (int fd, unsigned char *timeout) { char data[512]; int ret; struct ata_tf tf; memset(data, 0, sizeof(data)); tf_init(&tf, ATA_OP_SMART, 0xc24fbf, 1); tf.lob.feat = 0xd5; tf.dev = 0xa0; ret = wdidle3_issue(fd, SG_READ, &tf, data, __func__); if (!ret) *timeout = data[0]; return ret; }
false
false
false
false
false
0
ginBuildCallback(Relation index, HeapTuple htup, Datum *values, bool *isnull, bool tupleIsAlive, void *state) { GinBuildState *buildstate = (GinBuildState *) state; MemoryContext oldCtx; int i; oldCtx = MemoryContextSwitchTo(buildstate->tmpCtx); for (i = 0; i < buildstate->ginstate.origTupdesc->natts; i++...
false
false
false
false
false
0
mime_type_from_filename (const gchar *filename) { gchar *extension; gchar *mime_type; gchar *content_type; extension = strrchr (filename, '.'); if (extension) extension++; if (!extension) return NULL; mime_type = g_uri_unescape_string (extension, NULL); content_type = g_content_type_from_mime_type (mime_...
false
false
false
false
false
0
us_http_request_header_set_methodn( us_http_request_header_t *self, const char *method, int len ) { us_delete( self->m_allocator, self->m_method ); self->m_method = us_strndup( self->m_allocator, method, len ); return self->m_method != 0; }
false
false
false
false
false
0
qof_commit_edit_part2(QofInstance *inst, void (*on_error)(QofInstance *, QofBackendError), void (*on_done)(QofInstance *), void (*on_free)(QofInstance *)) { QofInstancePrivate *priv; QofBackend * be; priv = GET_PRIVATE(inst); /* See if ...
false
false
false
false
false
0
_get_prev_page(OggVorbis_File *vf,ogg_page *og){ ogg_int64_t begin=vf->offset; ogg_int64_t end=begin; ogg_int64_t ret; ogg_int64_t offset=-1; while(offset==-1){ begin-=CHUNKSIZE; if(begin<0) begin=0; ret=_seek_helper(vf,begin); if(ret)return(ret); while(vf->offset<end){ ret=...
false
false
false
false
false
0
_wapi_shm_base_name (_wapi_shm_t type) { gchar *name = NULL; gchar machine_name[256]; const gchar *fake_name; struct utsname ubuf; int ret; int len; ret = uname (&ubuf); if (ret == -1) { ubuf.machine[0] = '\0'; ubuf.sysname[0] = '\0'; } else { g_strdelimit (ubuf.sysname, "/", '_'); g_strdelimit (ubuf...
false
false
false
false
false
0
_gda_sqlite_meta__columns (G_GNUC_UNUSED GdaServerProvider *prov, GdaConnection *cnc, GdaMetaStore *store, GdaMetaContext *context, GError **error) { GdaDataModel *mod_model, *tmpmodel; gboolean retval = TRUE; gint i, nrows; SqliteConnectionData *cdata; cdata = (SqliteConnectionData*) gda_connection_intern...
false
false
false
false
false
0
g2_us2pds_double(g2_physical_device *pd, double x, double y, double *dx, double *dy) { if(dx!=NULL) *dx=x*fabs(pd->x_mul*pd->a11); if(dy!=NULL) *dy=y*fabs(pd->y_mul*pd->a22); }
false
false
false
false
false
0
_IO_old_file_fopen (fp, filename, mode) _IO_FILE *fp; const char *filename; const char *mode; { int oflags = 0, omode; int read_write, fdesc; int oprot = 0666; if (_IO_file_is_open (fp)) return 0; switch (*mode++) { case 'r': omode = O_RDONLY; read_write = _IO_NO_WRITES;...
false
false
false
false
false
0
nm_device_wired_refresh_ui (NetDeviceWired *device_wired) { const char *str; GString *status; GtkWidget *widget; guint speed = 0; NMDevice *nm_device; NMDeviceState state; NetDeviceWiredPrivate *priv = device_wired->priv; /* set device kind */ nm_...
false
false
false
false
false
0
elm_frame_autocollapse_set(Evas_Object *obj, Eina_Bool autocollapse) { ELM_FRAME_CHECK(obj); ELM_FRAME_DATA_GET_OR_RETURN(obj, sd); sd->collapsible = !!autocollapse; }
false
false
false
false
false
0
ath10k_wmi_event_debug_print(struct ath10k *ar, struct sk_buff *skb) { char buf[101], c; int i; for (i = 0; i < sizeof(buf) - 1; i++) { if (i >= skb->len) break; c = skb->data[i]; if (c == '\0') break; if (isascii(c) && isprint(c)) buf[i] = c; else buf[i] = '.'; } if (i == sizeof(buf) - ...
true
true
false
false
true
1
LoadPinPath(void) { char *Source; int i,j; if(!(Source = getenv("M2E_PIN_LIB"))) { if(VerboseMode>=VMERROR) fprintf(stderr,"[m2e] Error : M2E_PIN_LIB undefined\n"); return 1; } strcpy(PathString,Source); PathStringV[0]=Source; i=0; j=1; for(i=0;Source[i];i++) { if(Source[i]==':...
false
false
false
false
false
0
tw9910_set_hsync(struct i2c_client *client) { struct tw9910_priv *priv = to_tw9910(client); int ret; /* bit 10 - 3 */ ret = i2c_smbus_write_byte_data(client, HSBEGIN, (HSYNC_START & 0x07F8) >> 3); if (ret < 0) return ret; /* bit 10 - 3 */ ret = i2c_smbus_write_byte_data(client, HSEND, (HSYNC_END & ...
false
false
false
false
false
0
rsrc_parse_entry (bfd * abfd, bfd_boolean is_name, rsrc_entry * entry, bfd_byte * datastart, bfd_byte * data, bfd_byte * dataend, bfd_vma rva_bias, rsrc_directory * parent) { unsigned long val, addr, size; val = bfd_get_32 (abfd, data); ...
false
false
false
false
false
0
Save_INI_flush(FILE * old_file,FILE * new_file,char * buffer) { while (fgets(buffer,1024,old_file)!=0) fprintf(new_file,"%s",buffer); }
false
false
false
false
false
0
xfs_vm_kill_delalloc_range( struct inode *inode, loff_t start, loff_t end) { struct xfs_inode *ip = XFS_I(inode); xfs_fileoff_t start_fsb; xfs_fileoff_t end_fsb; int error; start_fsb = XFS_B_TO_FSB(ip->i_mount, start); end_fsb = XFS_B_TO_FSB(ip->i_mount, end); if (end_fsb <= start_fsb) return; x...
false
false
false
false
false
0
_redisRetVal_parse(char *rdata, char **tail) { switch (*rdata) { case '-' : return _redisRetVal_parseError(++rdata, tail); case '+' : return _redisRetVal_parseLine(++rdata, tail); case '$' : return _redisRetVal_parseBulk(++rdata, tail); case '*' : return _redisRetVal_parseMultiBulk(++rdata, tail); ...
false
false
false
false
false
0
trim_warm_tree(sym_environment *env, bc_node *n) { int i, not_pruned = 0; /* There isn't anything to do if this is a leaf. */ if (n->bobj.child_num == 0) return(0); /* There isn't anything to do if all children are pruned, and we are better off to go down if only one is not pruned. */ for (...
false
false
false
false
false
0
expand_lonlat_grid(int gridID) { char units[CDI_MAX_NAME]; int gridIDnew; long nx, ny, nxp4, nyp4; double *xvals, *yvals; nx = gridInqXsize(gridID); ny = gridInqYsize(gridID); nxp4 = nx+4; nyp4 = ny+4; xvals = (double *) malloc(nxp4*sizeof(double)); yvals = (double *) malloc(nyp4*sizeof(double)); ...
false
false
false
false
false
0
mangle_name(const char *name, char *target) { char *t = target; while (*name == '/' || *name == '.') name++; if (target) { for (; *name; name++) { if (*name == '/') *(t)++ = '.'; else if (isspace(*name)) *(t)++ = '_'; else if (isalnum(*name) || strchr("._-", *name)) *(t)++ = *name; } ...
false
false
false
false
false
0
xfermem_init (txfermem **xf, size_t bufsize, size_t msize, size_t skipbuf) { size_t regsize = bufsize + msize + skipbuf + sizeof(txfermem); #ifdef HAVE_MMAP # ifdef MAP_ANON if ((*xf = (txfermem *) mmap(0, regsize, PROT_READ | PROT_WRITE, MAP_ANON | MAP_SHARED, -1, 0)) == (txfermem *) -1) { perror ("mmap()"); ...
false
false
false
false
true
1
read_uint32 (struct dwarf_buf *buf) { const unsigned char *p = buf->buf; if (!advance (buf, 4)) return 0; if (buf->is_bigendian) return (((uint32_t) p[0] << 24) | ((uint32_t) p[1] << 16) | ((uint32_t) p[2] << 8) | (uint32_t) p[3]); else return (((uint32_t) p[3] << 24) | ((uint32_t) p[2] << 16)...
false
false
false
false
false
0
subset(const Clause& c) const { if (clause.size()==0) return true; if (clause.size() > c.size()) return false; for (Clause::const_iterator itr = cbegin(); itr != cend(); itr++) { if (!c.contain(*itr)) return false; } return true; }
false
false
false
false
false
0
utest_write(ESL_ALPHABET *abc, ESL_SQ **sqarr, int N, int format) { char *msg = "sqio write unit test failure"; char tmpfile[32] = "esltmpXXXXXX"; ESL_SQFILE *sqfp = NULL; ESL_SQ *sq = esl_sq_CreateDigital(abc); FILE *fp = NULL; int iterations ...
false
false
false
false
false
0
combo_action_cell_changed (GtkCellRendererCombo *cell, const gchar *path_string, GtkTreeIter *new_iter, CcWacomPage *page) { GtkTreeView *tree_view; GtkTreePath *path; GtkTreeModel *m...
false
false
false
false
false
0
dict_destroy (dict_t *this) { if (!this) { gf_log_callingfn ("dict", GF_LOG_WARNING, "dict is NULL"); return; } data_pair_t *pair = this->members_list; data_pair_t *prev = this->members_list; LOCK_DESTROY (&this->lock); while (prev) { ...
false
false
false
false
false
0
to_string() { if(links != NULL) return name->to_string() + "(" + links->to_string() + ")"; else return name->to_string(); }
false
false
false
false
false
0
isns_encode_padded(buf_t *bp, const void *ptr, size_t len) { if (!buf_put(bp, ptr, len)) return 0; if ((len & 3) == 0) return 1; return buf_put(bp, "\0\0\0", 4 - (len & 3)); }
false
false
false
false
false
0
snd_pcm_hw_unlink(snd_pcm_t *pcm) { snd_pcm_hw_t *hw = pcm->private_data; if (ioctl(hw->fd, SNDRV_PCM_IOCTL_UNLINK) < 0) { SYSMSG("SNDRV_PCM_IOCTL_UNLINK failed (%i)", -errno); return -errno; } return 0; }
false
false
false
false
false
0
v_reset_phylumdeclaration_marks #ifdef KC_USE_PROTOTYPES (void) #else () #endif #line 1764 "../util.k" { { #line 1765 "../util.k" phylumdeclarations kc_fe_selvar_1 = Thephylumdeclarations ; #line 1765 "../util.k" /*SUPPRESS 622*/ assert_phylumdeclarations(kc_fe_selvar_1, "foreach_list_expression"); #line 2622 "util...
false
false
false
true
false
1
Service() { if(packet->brxHasData()) { // If the data is a 'pure socket command', which is to say it begins // with a header as defined in ../src/protocol.h, then the data // will be further parsed by ParseObject(). If the data has an // invalid header, then we assume that the data is for the command...
false
false
false
false
false
0
mca_memheap_ptmalloc_alloc(size_t size, void** p_buff) { if (size > memheap_ptmalloc.max_alloc_size) { *p_buff = 0; return OSHMEM_ERR_OUT_OF_RESOURCE; } OPAL_THREAD_LOCK(&memheap_ptmalloc.lock); *p_buff = dlmalloc(size); OPAL_THREAD_UNLOCK(&memheap_ptmalloc.lock); if (NULL == *...
false
false
false
false
false
0
configurable_widget_destroy_callback (GtkWidget *widget, gpointer data) { guint notify_id; GConfClient *client; client = g_object_get_data (G_OBJECT (widget), "client"); notify_id = GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (widget), "notify_id")); if (notify_id !...
false
false
false
false
false
0
readLine() { Glib::ustring str; while (available() > 0) { gunichar ch = get(); if (ch == '\n') break; str.push_back(ch); } return str; }
false
false
false
false
false
0
dollar_line(char *p) // return pointer to just before NL line { p = end_line(p); // Try to stay off of the Newline if (*p == '\n' && (p - begin_line(p)) > 0) p--; return p; }
false
false
false
false
false
0
initDatabase(QDir home) { if(dbconn.isOpen()) return; QString cyclist = QFileInfo(home.path()).baseName(); sessionid = QString("%1%2").arg(cyclist).arg(main->session++); if (main->session == 1) { // use different name for v3 metricDB to avoid constant rebuilding // when switching bet...
false
false
false
false
false
0
findBRCapability(u_short br, const Class1Cap caps[]) { for (u_int i = NCAPS-1; i > 0; i--) { const Class1Cap* cap = &caps[i]; if (cap->br == br && cap->ok) { if (cap->mod == V17 && HasShortTraining(cap-1)) cap--; return (cap); } } protoTrace("MODEM: unsupported baud rate %#x", br); return...
false
false
false
false
false
0
setOptCol(gint i) { optcol = i; if(optcol<-1 || optcol>6) optcol = 0; }
false
false
false
false
false
0
find_user_by_id( int id ) { ServerUser *user; ServerChannel *channel; list_reset( channels ); while ( ( channel = list_next( channels ) ) ) { list_reset( channel->users ); while ( ( user = list_next( channel->users ) ) ) if ( user->id == id ) return user;...
false
false
false
false
false
0
record_vars_into (tree vars, tree fn) { bool change_cfun = fn != current_function_decl; if (change_cfun) push_cfun (DECL_STRUCT_FUNCTION (fn)); for (; vars; vars = DECL_CHAIN (vars)) { tree var = vars; /* BIND_EXPRs contains also function/type/constant declarations we don't need to...
false
false
false
false
false
0
loadSummary(STD_NAMESPACE ostream& out) { out << "DcmHashDict: size=" << hashTabLength << ", total entries=" << size() << OFendl; DcmDictEntryList* bucket = NULL; int largestBucket = 0; for (int i=0; i<hashTabLength; i++) { bucket = hashTab[i]; if (bucket != NULL) { i...
false
false
false
false
false
0
pset_union(s1, s2, dontreplicate) Pset s1, s2; int dontreplicate; { Pset hd, curr, new = NULL; Pset replicas2 = NULL, temps2 = s2; /* code added: 26/Aug/96 */ /* Code added on 26/Aug/96 */ if (dontreplicate) replicas2 = s2; else while (temps2 != NULL) { new_node(Pset, new, new); if (new == NULL) return NULL; ...
false
false
false
false
false
0
read_events(lrmd_event_data_t * event) { report_event(event); if (options.listen) { if (safe_str_eq(options.listen, event_buf_v0)) { print_result(printf("LISTEN EVENT SUCCESSFUL\n")); test_exit(0); } } if (exec_call_id && (event->call_id == exec_call_id)) { ...
false
false
false
false
false
0
ncp_file_mmap_fault(struct vm_area_struct *area, struct vm_fault *vmf) { struct inode *inode = file_inode(area->vm_file); char *pg_addr; unsigned int already_read; unsigned int count; int bufsize; int pos; /* XXX: loff_t ? */ /* * ncpfs has nothing against high pages as long * as recvmsg and memset wor...
false
false
false
false
false
0
setTo(const Jid &j) { d->e.setAttribute("to", j.full()); }
false
false
false
false
false
0
buildTocEntryArrays(ArchiveHandle *AH) { DumpId maxDumpId = AH->maxDumpId; TocEntry *te; AH->tocsByDumpId = (TocEntry **) pg_malloc0((maxDumpId + 1) * sizeof(TocEntry *)); AH->tableDataId = (DumpId *) pg_malloc0((maxDumpId + 1) * sizeof(DumpId)); for (te = AH->toc->next; te != AH->toc; te = te->next) { /* ...
false
false
false
false
false
0
gst_collect_pads2_set_clip_function (GstCollectPads2 * pads, GstCollectPads2ClipFunction clipfunc, gpointer user_data) { g_return_if_fail (pads != NULL); g_return_if_fail (GST_IS_COLLECT_PADS2 (pads)); pads->priv->clip_func = clipfunc; pads->priv->clip_user_data = user_data; }
false
false
false
false
false
0
struct_union_add_member( struct_union* su, /*!< Pointer to struct/union to add member to */ su_member* mem /*!< Pointer to struct/union member to add */ ) { PROFILE(STRUCT_UNION_ADD_MEMBER); if( su->mem_head == NULL ) { su->mem_head = su->mem_tail = mem; } else { su->mem_tail->next = mem; su->...
false
false
false
false
false
0
imColorRGB2HSI(float r, float g, float b, float *h, float *s, float *i) { float v, u; double H; /* Parametric equations */ v = r - (g + b)/2; u = (g - b) * (sqrt3/2); *i = (r + g + b)/3; /* already normalized to 0-1 */ *s = (float)sqrt(v*v + u*u); /* s is between 0-1, it is linear in the ...
false
false
false
false
false
0
gfs2_replay_incr_blk(struct gfs2_inode *ip, unsigned int *blk) { uint32_t jd_blocks = ip->i_di.di_size / ip->i_sbd->sd_sb.sb_bsize; if (++*blk == jd_blocks) *blk = 0; }
false
false
false
false
false
0
gsql_content_size_request (GtkWidget *widget, GtkRequisition *requisition) { GSQLContent *content = GSQL_CONTENT (widget); GtkWidget *child = GTK_WIDGET (content->private->child); GtkRequisition req; gtk_widget_size_request (child, &req); widget->requisition.width = 0; widget->requisition.height = 0; widg...
false
false
false
false
false
0
scatter_from_arglist(Arg_List *a) { Scatter *sc = 0, **scp; Arg_List *anext; for (scp = &sc; a; a = anext, scp = &((*scp)->next)) { if (a->expr->kind == EXPR_ID) { *scp = alloc_scatter(a->kind == ARG_NORMAL ? SCAT_REQUIRED : SCAT_REST, a->expr->e.id, 0); anext = a->next; ...
false
false
false
false
false
0
drm_atomic_helper_set_config(struct drm_mode_set *set) { struct drm_atomic_state *state; struct drm_crtc *crtc = set->crtc; int ret = 0; state = drm_atomic_state_alloc(crtc->dev); if (!state) return -ENOMEM; state->acquire_ctx = drm_modeset_legacy_acquire_ctx(crtc); retry: ret = __drm_atomic_helper_set_confi...
false
false
false
false
false
0
icalproperty_add_parameters(struct icalproperty_impl *prop,va_list args) { void* vp; struct icalproperty_impl *impl = (struct icalproperty_impl*)prop; while((vp = va_arg(args, void*)) != 0) { if (icalvalue_isa_value(vp) != 0 ){ } else if (icalparameter_isa_parameter(vp) != 0 ){ icalproperty_ad...
false
false
false
false
false
0