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
exit_program( GtkWidget *widget, gpointer data ) { #if 0 #ifndef __WIN32__ void *p; #endif #endif if(pthread_self() == server_tid) pthread_exit(0); ebook_end(); gdk_window_get_root_origin(main_window->window, &window_x, &window_y); window_width = main_window->allocation.width; window_height = main_win...
false
false
false
false
false
0
printheader(struct fetchheaderinfo *fi, const char *p, size_t s) { size_t i; if (fi->skipping) { if (fi->skipping > s) { fi->skipping -= s; return; } p += fi->skipping; s -= fi->skipping; fi->skipping=0; } if (s > fi->cnt) s=fi->cnt; for (i=0; i <= s; i++) if (p[i] != '\r') ++header_count;...
false
false
false
false
false
0
read_metadata_block_data_picture_cb_(FLAC__IOHandle handle, FLAC__IOCallback_Read read_cb, FLAC__StreamMetadata_Picture *block) { FLAC__Metadata_SimpleIteratorStatus status; FLAC__byte buffer[4]; /* asserted below that this is big enough */ FLAC__uint32 len; FLAC__ASSERT(sizeof(buffer) >= FLAC__STREAM_METADATA_PIC...
false
false
false
false
false
0
win_wininfo_build(const WinInfo *wi, gboolean *modified) { GtkWidget *vbox, *frame, *hbox, *sframe; GList *iter; gchar tmp[64]; WinDef *win; vbox = gtk_vbox_new(FALSE, 0); for(iter = wi->windows; iter != NULL; iter = g_list_next(iter)) { win = iter->data; g_snprintf(tmp, sizeof tmp, "%c%s", toupper(*win->...
false
false
false
false
false
0
wusbhc_rh_create(struct wusbhc *wusbhc) { int result = -ENOMEM; size_t port_size, itr; port_size = wusbhc->ports_max * sizeof(wusbhc->port[0]); wusbhc->port = kzalloc(port_size, GFP_KERNEL); if (wusbhc->port == NULL) goto error_port_alloc; for (itr = 0; itr < wusbhc->ports_max; itr++) wusb_port_init(&wusbhc->...
false
false
false
false
false
0
ras_validate(jas_stream_t *in) { uchar buf[RAS_MAGICLEN]; int i; int n; uint_fast32_t magic; assert(JAS_STREAM_MAXPUTBACK >= RAS_MAGICLEN); /* Read the validation data (i.e., the data used for detecting the format). */ if ((n = jas_stream_read(in, buf, RAS_MAGICLEN)) < 0) { return -1; } /* Put the vali...
false
false
false
false
false
0
snd_pcm_free_stream(struct snd_pcm_str * pstr) { struct snd_pcm_substream *substream, *substream_next; #if IS_ENABLED(CONFIG_SND_PCM_OSS) struct snd_pcm_oss_setup *setup, *setupn; #endif substream = pstr->substream; while (substream) { substream_next = substream->next; snd_pcm_timer_done(substream); snd_pcm_s...
false
false
false
false
false
0
A_RestoreSpecialThing1(mobj_t * thing) { if (thing->type == MT_WMACE) { // Do random mace placement P_RepositionMace(thing); } thing->flags2 &= ~MF2_DONTDRAW; S_StartSound(thing, sfx_respawn); }
false
false
false
false
false
0
simpleSplit (const UT_String & str, char separator, size_t max) { UT_GenericVector<UT_String*> * utvResult = new UT_GenericVector<UT_String*>(); UT_String* utsEntry; UT_uint32 start = 0; for(size_t j = 0; (max == 0 || j < max) && start < str.size(); j++) { utsEntry = new UT_String; for (; (str[start] ...
false
false
false
false
false
0
setDataToUi() { ui->databaseList->clear(); d->m_Infos = drugsBase().getAllDrugSourceInformation(); const DrugsDB::DatabaseInfos *actual = drugsBase().actualDatabaseInformation(); if (!actual) return; int row = 0; foreach(DrugsDB::DatabaseInfos *info, d->m_Infos) { if (!info) ...
false
false
false
false
false
0
ui_asg_manage_getlast(struct ui_asg_manage_data *data) { gchar *txt; gboolean bool; Assign *item; DB( g_print("\n(ui_asg_manage_getlast)\n") ); DB( g_print(" -> for assign id=%d\n", data->lastkey) ); item = da_asg_get(data->lastkey); if(item != NULL) { data->change++; txt = (gchar *)gtk_entry_get_text(GTK_...
false
false
false
false
false
0
_e_color_dialog_button2_click(void *data, E_Dialog *edia __UNUSED__) { E_Color_Dialog *dia; dia = data; if (dia->cancel_func && dia->initial) dia->cancel_func(dia, dia->initial, dia->cancel_data); _e_color_dialog_free(data); }
false
false
false
false
false
0
check_specified_kernel_debug_file() { if (pc->flags & GDB_INIT) return NULL; return (pc->namelist_debug ? pc->namelist_debug : NULL); }
false
false
false
false
false
0
in_denotation (NODE_T *p) { if (IS (p, ROW_CHAR_DENOTATION)) { in_literal (NSYMBOL (p)); } else if (IS (p, LONGETY) || IS (p, SHORTETY)) { in_sizety (SUB (p)); in_denotation (NEXT (p)); } else { put_sym (p, !KEYWORD); } }
false
false
false
false
false
0
cob_sync (cob_file *f, const int mode) { #ifdef WITH_DB struct indexed_file *p; size_t i; #ifdef USE_DB41 int n; #endif #endif #if defined(WITH_CISAM) || defined(WITH_DISAM) || defined(WITH_VBISAM) struct indexfile *fh = f->file; #endif if (f->organization == COB_ORG_INDEXED) { #ifdef WITH_DB p = f->file; ...
false
false
false
false
false
0
get_genomic_range(const void *sa) { GtSSplicedAlignment *alignment = *(GtSSplicedAlignment**) sa; gt_assert(alignment); return gt_sspliced_alignment_genomic_range(alignment); }
false
false
false
false
false
0
cgroup_config_try_unmount(struct cg_mount_table_s *mount_info) { char *controller, *controller_list; struct cg_mount_point *mount = &(mount_info->mount); void *handle = NULL; int ret, lvl; struct cgroup_file_info info; char *saveptr = NULL; /* parse the first controller name from list of controllers */ control...
false
false
false
false
false
0
popTransparencyGroup() { /* pop color space */ ColorSpaceStack *css = groupColorSpaceStack; if (css->knockout) { knockoutCount--; if (!knockoutCount) { /* we don't need to track the shape anymore because * we are not above any knockout groups */ cairo_destroy(cairo_shape); cairo_s...
false
false
false
false
false
0
FreeImage_Invert(FIBITMAP *src) { if (!FreeImage_HasPixels(src)) return FALSE; unsigned i, x, y, k; const unsigned width = FreeImage_GetWidth(src); const unsigned height = FreeImage_GetHeight(src); const unsigned bpp = FreeImage_GetBPP(src); FREE_IMAGE_TYPE image_type = FreeImage_GetImageType(src); if(ima...
false
false
false
false
false
0
str_units(int n) { /* n==1: use singular */ if (n == 1) return display_in_cyl_units ? "cylinder" : "sector"; return display_in_cyl_units ? "cylinders" : "sectors"; }
false
false
false
false
false
0
byword(register const char *const word, register const struct lookup *const table) { register const struct lookup * foundlp; register const struct lookup * lp; if (word == NULL || table == NULL) return NULL; /* ** Look for exact match. */ for (lp = table; lp->l_word != NULL; ++lp) if (ciequal(word, l...
false
false
false
false
false
0
pmu_code(struct nv50_devinit *init, u32 pmu, u32 img, u32 len, bool sec) { struct nvkm_device *device = init->base.subdev.device; struct nvkm_bios *bios = device->bios; int i; nvkm_wr32(device, 0x10a180, 0x01000000 | (sec ? 0x10000000 : 0) | pmu); for (i = 0; i < len; i += 4) { if ((i & 0xff) == 0) nvkm_wr32...
false
false
false
false
false
0
_mesa_remove_dead_code_local(struct gl_program *prog) { GLboolean *removeInst; GLuint i, arg, rem = 0; removeInst = calloc(1, prog->NumInstructions * sizeof(GLboolean)); for (i = 0; i < prog->NumInstructions; i++) { const struct prog_instruction *inst = prog->Instructions + i; const GLui...
false
false
false
false
false
0
init(std::string _host, std::string _port, std::string _topic) { ns[""] = "http://eu-emi.eu/namespaces/2012/11/aggregatedcomputerecord"; ns["urf"] = "http://eu-emi.eu/namespaces/2012/11/computerecord"; ns_query["car"] = "http://eu-emi.eu/namespaces/2012/11/aggregatedcomputerecord"; ns_query["urf"...
false
false
false
false
false
0
inf_gtk_chat_strdup_strftime(const char* format, const struct tm* tm, gsize* len) { gsize alloc; gchar* str; size_t result; alloc = 64; str = g_malloc(alloc * sizeof(gchar)); result = strftime(str, alloc, format, tm); while(result == 0 && alloc <...
false
false
false
false
false
0
intel_panel_get_backlight(struct intel_connector *connector) { struct drm_device *dev = connector->base.dev; struct drm_i915_private *dev_priv = dev->dev_private; struct intel_panel *panel = &connector->panel; u32 val = 0; mutex_lock(&dev_priv->backlight_lock); if (panel->backlight.enabled) { val = panel->bac...
false
false
false
false
false
0
horizonv(float *z,int ix1,int iy1,int ix2,int iy2) { float ux; int x1,x2,putback=false; float y1,y2; if (sf.zcolour[0]!=0 && (z[ix1 + iy1 * (int32)nnx] <= min_zed || z[ix2 + iy2 * (int32)nnx] <= min_zed)) { putback = true; g_set_color_if_defined(sf.zcolour); } touser(ix1,iy1,z[ix1 + iy1 * (int32)nnx],&...
false
false
false
false
false
0
ldapqry_delete_folder( LdapQuery *qry ) { AddressCache *cache; ItemFolder *folder; cm_return_if_fail( qry != NULL ); folder = ADDRQUERY_FOLDER(qry); if( folder ) { cache = qry->server->addressCache; folder = addrcache_remove_folder_delete( cache, folder ); if( folder ) { addritem_free_item_folder( folde...
false
false
false
false
false
0
newsgroup_list_append(GSList *group_list, const gchar *str) { gchar *work; gchar *workp; if (!str) return group_list; Xstrdup_a(work, str, return group_list); workp = work; while (workp && *workp) { gchar *p, *next; if ((p = strchr_with_skip_quote(workp, '"', ','))) { *p = '\0'; next = p + 1; } e...
false
false
false
false
false
0
set_mode(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { struct virtual_consumer_data *data = dev_get_drvdata(dev); unsigned int mode; int ret; /* * sysfs_streq() doesn't need the \n's, but we add them so the strings * will be shared with show_mode(), above. */ if (sys...
false
false
false
false
false
0
acl_index_by_name(char *name) { named_acl_t *curr = named_acls; if ( !name || !named_acls ) return(0); while ( curr ) { if ( !strcmp(curr->name, name) ) { return(curr->internal_number); } curr = curr->next; } return(0); }
false
false
false
false
false
0
grow_trail (int pl, int size) { int i, k; k = ((trail_offset[pl] + trail_size[pl] - 1) & (maxq - 1)); while (size != 0 && trail_size[pl] + 5 < maxq) { i = ((trail_offset[pl] + trail_size[pl]) & (maxq - 1)); trail_pos[pl][i] = trail_pos[pl][k]; trail_way[pl][i] = trail_way[pl][k]; trail_size[pl]++...
false
false
false
false
false
0
buildFullPathname(string& fullpath, const char* filename) { char old[FAUST_PATH_MAX]; if (isAbsolutePathname(filename)) { fullpath = filename; } else { fullpath = getcwd (old, FAUST_PATH_MAX); fullpath += '/'; fullpath += filename; } }
false
false
false
false
false
0
mptspi_deny_binding(struct scsi_target *starget) { struct _MPT_SCSI_HOST *hd = (struct _MPT_SCSI_HOST *)dev_to_shost(starget->dev.parent)->hostdata; return ((mptspi_is_raid(hd, starget->id)) && starget->channel == 0) ? 1 : 0; }
false
false
false
false
false
0
readFData( FILE* fp, fData* t, const fDataType* types ) { char** currentRow; char* rowPtr; int rowCount = 0; int i; int errFlag = 0;//not used, but possibly for future usage. set when data types disagree //allocate the datatypes table, and set the default values t->types = (fDataType*)malloc( sizeof(f...
false
true
false
false
true
1
nssCertificate_AddRef ( NSSCertificate *c ) { if (c) { nssPKIObject_AddRef(&c->object); } return c; }
false
false
false
false
false
0
retrieve( char* buf, int buf_len ) { char *name; debug(D_SYSCALL, "retrieving location"); if(!data || list_size(data)<=0) return 0; name = (char*)list_pop_head(data); memset(buf, 0, buf_len); strncpy(buf, name, buf_len); buf[buf_len-1] = 0; free(name); return strlen(buf); }
false
false
false
false
false
0
lex_open_file(LEX *lf, const char *filename, LEX_ERROR_HANDLER *scan_error) { LEX *nf; FILE *fd; BPIPE *bpipe = NULL; char *fname = bstrdup(filename); if (fname[0] == '|') { if ((bpipe = open_bpipe(fname+1, 0, "rb")) == NULL) { free(fname); return NULL; } fd = bpipe...
false
false
false
false
true
1
plural_lookup (domain, n, translation, translation_len) struct loaded_l10nfile *domain; unsigned long int n; const char *translation; size_t translation_len; { struct loaded_domain *domaindata = (struct loaded_domain *) domain->data; unsigned long int index; const char *p; index = plural_ev...
false
false
false
false
false
0
globus_i_gss_assist_gridmap_line_free( globus_i_gss_assist_gridmap_line_t * gline) { static char * _function_name_ = "globus_i_gss_assist_gridmap_line_free"; GLOBUS_I_GSI_GSS_ASSIST_DEBUG_ENTER; if (gline != NULL)...
false
false
false
false
false
0
rfbSetTcpNoDelay(int sock) { int one = 1; struct sockaddr_in addr; socklen_t addrlen = sizeof(addr); memset(&addr, 0, sizeof(addr)); if (getsockname(sock, (struct sockaddr *)&addr, &addrlen) < 0) { /* non-socket */ return TRUE; } if (addr.sin_family == AF_INET) { if (setsockopt(sock, IP...
false
false
false
false
false
0
stk3310_read_raw(struct iio_dev *indio_dev, struct iio_chan_spec const *chan, int *val, int *val2, long mask) { u8 reg; __be16 buf; int ret; unsigned int index; struct stk3310_data *data = iio_priv(indio_dev); struct i2c_client *client = data->client; if (chan->type != IIO_LIGHT && chan->type != I...
false
false
false
false
false
0
set_field_sens(KILL_WIDGETS *w, int field) { int msgid = field == KillFieldMsgid; int all_sens = field < 0; XtSetSensitive(w->messageid_field, all_sens || msgid); XtSetSensitive(w->subject_field, all_sens || !msgid); XtSetSensitive(w->from_field, all_sens || !msgid); XtSetSensitive(w->xref_fiel...
false
false
false
false
false
0
printrusage(struct tcb *tcp, long addr) { struct rusage ru; if (!addr) tprintf("NULL"); else if (syserror(tcp) || !verbose(tcp)) tprintf("%#lx", addr); else if (umove(tcp, addr, &ru) < 0) tprintf("{...}"); else if (!abbrev(tcp)) { tprintf("{ru_utime={%lu, %lu}, ru_stime={%lu, %lu}, ", (long) ru.ru_utim...
false
false
false
false
false
0
setoptstring(ns_server_t *server, char **field, const cfg_obj_t *obj) { if (cfg_obj_isvoid(obj)) return (setstring(server, field, NULL)); else return (setstring(server, field, cfg_obj_asstring(obj))); }
false
false
false
false
false
0
movl(const Operand& dst, Label* src) { EnsureSpace ensure_space(this); emit_optional_rex_32(dst); emit(0xC7); emit_operand(0, dst); if (src->is_bound()) { int offset = src->pos() - pc_offset() - sizeof(int32_t); ASSERT(offset <= 0); emitl(offset); } else if (src->is_linked()) { emitl(src->po...
false
false
false
false
false
0
importer_ib ( void ) { GtkWidget *dialog; gint resultat; gchar *budget_name; gint last_transaction_number; GtkFileFilter * filter; dialog = gtk_file_chooser_dialog_new ( _("Import budgetary lines"), GTK_WINDOW ( window ), GTK_FILE_CHOOSER_ACTION_OPEN, GTK_STOCK_CANCEL, G...
false
false
false
false
false
0
AsFloat() const { if( !typeTag_ ) throw MissingArgumentException(); else if( *typeTag_ == FLOAT_TYPE_TAG ) return AsFloatUnchecked(); else throw WrongArgumentTypeException(); }
false
false
false
false
false
0
arma_model_get_x_coeffs (const MODEL *pmod) { const double *xc = NULL; if (pmod->ci == ARMA && gretl_model_get_int(pmod, "armax")) { xc = pmod->coeff; xc += pmod->ifc; xc += arma_AR_lags(pmod); xc += arma_MA_lags(pmod); xc += gretl_model_get_int(pmod, "arma_P"); xc += gretl_model_get_int(pmod, "arma_Q");...
false
false
false
false
false
0
main(int argc, char **argv) { l_int32 i, j, equal; PIX *pixs, *pixt, *pixd; static char mainName[] = "rasteropip_reg"; pixs = pixRead("test8.jpg"); pixt = pixCopy(NULL, pixs); /* Copy, in-place and one COLUMN at a time, from the right side to the left side. */ for (j =...
false
false
false
false
false
0
avrcp_handle_request_continuing(struct avrcp_player *player, struct avrcp_header *pdu, uint8_t transaction) { uint16_t len = ntohs(pdu->params_len); struct pending_pdu *pending; if (len != 1 || player->pending_pdu == NULL) goto err; pending = player->pending_pdu; if (pending->pdu_id != pdu->params...
false
false
false
false
false
0
rk3x_i2c_clk_notifier_cb(struct notifier_block *nb, unsigned long event, void *data) { struct clk_notifier_data *ndata = data; struct rk3x_i2c *i2c = container_of(nb, struct rk3x_i2c, clk_rate_nb); unsigned long div_low, div_high; switch (event) { case PRE_RATE_CHANGE: if (rk3x_i2c_calc_divs(ndata->new_...
false
false
false
false
false
0
get_gicon (ButtonData *button_data) { switch (button_data->type) { case ROOT_BUTTON: return g_themed_icon_new (NAUTILUS_ICON_FILESYSTEM); case HOME_BUTTON: return g_themed_icon_new (NAUTILUS_ICON_HOME); case MOUNT_BUTTON: return get_gicon_for_mount (button_data); default: return NULL; ...
false
false
false
false
false
0
control_to_string(control c) { map<string,control>::iterator it = bigraph::control_map.begin(); while(it != control_map.end()) { if(it->second == c) return it->first; ++it; } return "<unknown control>"; }
false
false
false
false
false
0
add_sorter (ESelectionModel *model, ESorter *sorter) { model->sorter = sorter; if (sorter) { g_object_ref (sorter); } }
false
false
false
false
false
0
Sop_a8_to_Dacc( GenefxState *gfxs ) { int w = gfxs->length; GenefxAccumulator *D = gfxs->Dacc; u8 *S = gfxs->Sop[0]; while (w--) { D->RGB.a = *S++; D->RGB.r = 0xFF; D->RGB.g = 0xFF; D->RGB.b = 0xFF; D++; } }
false
false
false
false
false
0
parse_cookie(struct b43legacy_wldev *dev, u16 cookie, struct b43legacy_pio_txpacket **packet) { struct b43legacy_pio *pio = &dev->pio; struct b43legacy_pioqueue *queue = NULL; int packetindex; switch (cookie & 0xF000) { case 0x0000: queue = pio->queue0; break; case 0x1000: queue = pio->queue1; ...
false
false
false
false
false
0
detach_data(CL_ResourceData *data) { std::map<std::string, CL_ResourceData *>::iterator it; for (it = impl->datas.begin(); it != impl->datas.end(); it++) { if (it->second == data) { impl->datas.erase(it); break; } } }
false
false
false
false
false
0
rtl8187b_init_status_urb(struct ieee80211_hw *dev) { struct rtl8187_priv *priv = dev->priv; struct urb *entry; int ret = 0; entry = usb_alloc_urb(0, GFP_KERNEL); if (!entry) return -ENOMEM; usb_fill_bulk_urb(entry, priv->udev, usb_rcvbulkpipe(priv->udev, 9), &priv->b_tx_status.buf, sizeof(priv->b_tx_stat...
false
false
false
false
false
0
SaveEmoticon(GtkTreeModel* model, GtkTreePath* path UNUSED, GtkTreeIter* iter, FILE* file) { gchar* text = NULL; gtk_tree_model_get( model, iter, 0, &text, -1 ); if( text ) { fprintf(file, "%s\n", text); g_free(text); } return false; }
false
false
false
false
false
0
default_tokenization(cst_utterance *u) { const char *text,*token; cst_tokenstream *fd; cst_item *t; cst_relation *r; text = utt_input_text(u); r = utt_relation_create(u,"Token"); fd = ts_open_string(text, get_param_string(u->features,"text_whitespace",NULL), get_param_string(u->features,"...
false
false
false
false
false
0
media_open(struct inode *inode, struct file *filp) { struct media_devnode *mdev; int ret; /* Check if the media device is available. This needs to be done with * the media_devnode_lock held to prevent an open/unregister race: * without the lock, the device could be unregistered and freed between * the media_d...
false
false
false
false
true
1
getCopyStart(PGconn *conn, ExecStatusType copytype) { PGresult *result; int nfields; int i; result = PQmakeEmptyPGresult(conn, copytype); if (!result) goto failure; if (pqGetc(&conn->copy_is_binary, conn)) goto failure; result->binary = conn->copy_is_binary; /* the next two bytes are the number of f...
false
false
false
false
false
0
sync_init(void) { int res; sync_queue = q_init(); if (!sync_queue) return -1; pthread_mutex_lock(&m_sync_ht); /* initialize dirname ht */ ht_init(&sync_ht, sync_hash, sync_cmp); /* load sync data from db, call sync_ht_set() for each row */ res = db_load_sync(sync_ht_set); ...
false
false
false
false
false
0
clnt_reacquire_lock_error (xlator_t *this, clnt_fd_ctx_t *fdctx, clnt_conf_t *conf) { int32_t ret = -1; GF_VALIDATE_OR_GOTO ("client", this, out); GF_VALIDATE_OR_GOTO (this->name, fdctx, out); GF_VALIDATE_OR_GOTO (this->name, conf, out); clnt_...
false
false
false
false
false
0
setToken(Trie *trie, int tokenLength, Token token, Priority::Type pri, TokenVector &ambiguities) { if (tokenLength > trie->tokenLength_ || (tokenLength == trie->tokenLength_ && pri > trie->priority_)) { trie->tokenLength_ = tokenLength; trie->token_ = token; trie->priority...
false
false
false
false
false
0
rhash_sha1_process_block(unsigned* hash, const unsigned* block) { int t; /* Loop counter */ uint32_t temp; /* Temporary word value */ uint32_t W[80]; /* Word sequence */ uint32_t A, B, C, D, E; /* Word buffers */ /* initialize the first 16 word...
false
false
false
false
false
0
open_chfile(void) { char *chfile = envprocess(CHFILE); if ((chfid = open(chfile, O_WRONLY|O_APPEND|O_CREAT, 0644)) < 0) report(1133); /* {Create charge file error} */ free(chfile); if (Daemuid != ROOTID) #if defined(HAVE_FCHOWN) && !defined(M88000) fchown(chfid, Daemuid, getegid()); #else chown(chfile, Daem...
false
false
false
false
false
0
backup_pidmem_free( Backup_pid *bp ) { pthread_mutex_lock( &pid_holder.lock ); if( bp->pids->in_use ) { bp->next = bp->pids->to_free; bp->pids->to_free = bp; pthread_mutex_unlock( &pid_holder.lock ); return; } bp->pids->s[ bp->pids_idx ] = 0; bp->pids->count--; pthread_mutex_unlock( &pid_holder.lock ); ...
false
false
false
false
false
0
MV_Mix16BitStereo16Stereo( unsigned int position, unsigned int rate, char *start, unsigned int length ) { unsigned short *source = (unsigned short *) start; short *dest = (short *) MV_MixDestination; int sample0l, sample0h, sample0; int sample1l, sample1h, sample1; whil...
false
false
false
false
false
0
bch_data_invalidate(struct closure *cl) { struct data_insert_op *op = container_of(cl, struct data_insert_op, cl); struct bio *bio = op->bio; pr_debug("invalidating %i sectors from %llu", bio_sectors(bio), (uint64_t) bio->bi_iter.bi_sector); while (bio_sectors(bio)) { unsigned sectors = min(bio_sectors(bio),...
false
false
false
false
false
0
undo_move(MOVE *m) { #if PRINT if ( m->totype == O_Type ) fprintf( stderr, "\nundo move %d from %d out (at %d)\n\n", m->card_index, m->from, m->turn_index ); else fprintf( stderr, "\nundo move %d from %d to %d (%d)\n\n", m->card_index, m->from, m->to, m->turn_index ); print_layout(); #endif...
false
false
false
false
false
0
e_printable_print_page (EPrintable *e_printable, GtkPrintContext *context, gdouble width, gdouble height, gboolean quantized) { g_return_if_fail (E_IS_PRINTABLE (e_printable)); g_signal_emit ( e_printable, e_printable...
false
false
false
false
false
0
CrossLinkService( ServiceDescriptor* service, const ServiceDescriptorProto& proto) { if (service->options_ == NULL) { service->options_ = &ServiceOptions::default_instance(); } for (int i = 0; i < service->method_count(); i++) { CrossLinkMethod(&service->methods_[i], proto.method(i)); } }
false
false
false
false
false
0
ut_find_eol (char * eol_name) { ASSERT (eol_name) UtEolType j; for (j= UT_EOL_CR; j<UT_EOL_NONE; j++) if ( UT_EOL_NAME[j] && ut_str_fuzzy_cmp (eol_name, UT_EOL_NAME[j], 0) ) break; if (j==UT_EOL_NONE) return UT_EOL_UNSET; else return j; }
false
false
false
false
false
0
scld_dock_exrom_from_snapshot( memory_page *dest, int page_num, int writable, void *source ) { int i; libspectrum_byte *data = memory_pool_allocate( 0x2000 ); memcpy( data, source, 0x2000 ); for( i = 0; i < MEMORY_PAGES_IN_8K; i++ ) { memory_page *page = &dest[ page_num * ...
false
true
false
false
false
1
pCurrentGroup(int p_group_num) { _ParticleState &_ps = _GetPState(); if(_ps.in_new_list) return; // ERROR _ps.pgrp = _ps.GetGroupPtr(p_group_num); if(_ps.pgrp) _ps.group_id = p_group_num; else _ps.group_id = -1; }
false
false
false
false
false
0
pixCountConnComp(PIX *pixs, l_int32 connectivity, l_int32 *pcount) { l_int32 h, iszero; l_int32 x, y, xstart, ystart; PIX *pixt; PSTACK *pstack, *auxstack; PROCNAME("pixCountConnComp"); if (!pcount) return ERROR_INT("&count not defined", procName, 1); ...
false
false
false
false
true
1
embDmxScophitToHit(EmbPHit *to, const AjPScophit from) { if(!from) { ajWarn("NULL arg passed to embDmxScophitToHit"); return ajFalse; } if(!(*to)) *to = embHitNew(); ajStrAssignS(&(*to)->Seq, from->Seq); (*to)->Start = from->Start; (*to)->End = from->End; ajStrAssignS(&(*to)-...
false
false
false
false
false
0
H5S_hyper_reset_scratch(H5S_t *space) { FUNC_ENTER_NOAPI_NOINIT_NOERR HDassert(space); /* Check if there are spans in the span tree */ if(space->select.sel_info.hslab->span_lst != NULL) /* Reset the scratch pointers for the next routine which needs them */ H5S_hyper_span_scratch(space-...
false
false
false
false
false
0
getOverflowComparisonString(const UnicodeString &lowerLimit, UErrorCode &/*status*/) { for (int32_t i=0; i<firstScriptCharacters_->size(); i++) { const UnicodeString *s = static_cast<const UnicodeString *>(firstScriptCharacters_->elementAt(i)); if (collator_->compare(*s, lowerLimit) ...
false
false
false
false
false
0
trsp_selected_cb (GtkComboBox *box, gpointer data) { GtkRigCtrl *ctrl = GTK_RIG_CTRL (data); gint i, n; i = gtk_combo_box_get_active (box); n = g_slist_length (ctrl->trsplist); if (i == -1) { /* clear transponder data */ ctrl->trsp = NULL; } else if (i < n) { ...
false
false
false
false
false
0
kook_ASSURE_asm(CTX ctx, kStmtExpr *stmt) { kStmtExpr *stmt0 = stmtNN(stmt, 0); kStmtExpr *stmt1 = stmtNN(stmt, 1); CALL(ctx, COMPILER_API.ASSURE, 3, stmt, stmt0, stmt1); }
false
false
false
false
false
0
getAdrLabelOpValue(const MCInst &MI, unsigned OpIdx, SmallVectorImpl<MCFixup> &Fixups) const { const MCOperand MO = MI.getOperand(OpIdx); if (MO.isExpr()) return ::getBranchTargetOpValue(MI, OpIdx, ARM::fixup_arm_adr_pcrel_12, Fixups); int32_t offset = MO...
false
false
false
false
false
0
DecodeMem(MCInst &MI, unsigned insn, uint64_t Address, const void *Decoder, bool isLoad, DecodeFunc DecodeRD) { unsigned rd = fieldFromInstruction(insn, 25, 5); unsigned rs1 = fieldFromInstruction(insn, 14, 5); bool isImm = fieldFromInstruction(insn, 13,...
false
false
false
false
false
0
PrintSelf(std::ostream & os, Indent indent) const { os << indent << "Dimension: " << m_Dimension << std::endl; os << indent << "Degree: " << m_Degree << std::endl; os << indent << "DomainSize: "; for ( unsigned int i = 0; i < m_DomainSize.size(); ++i ) { os << m_DomainSize[i] << " "; } os << std::...
false
false
false
false
false
0
skl_tplg_alloc_pipe_widget(struct device *dev, struct snd_soc_dapm_widget *w, struct skl_pipe *pipe) { struct skl_module_cfg *src_module = NULL; struct snd_soc_dapm_path *p = NULL; struct skl_pipe_module *p_module = NULL; p_module = devm_kzalloc(dev, sizeof(*p_module), GFP_KERNEL); if (!p_module) return -ENOME...
false
false
false
false
false
0
partons(tcPDPtr particle) const { assert(thePDF); return thePDF->partons(particle); }
false
false
false
false
false
0
zone_show(struct device *dev, struct device_attribute *attr, char *buf) { struct platform_zone *target_zone; target_zone = match_zone(attr); if (target_zone == NULL) return sprintf(buf, "red: -1, green: -1, blue: -1\n"); return sprintf(buf, "red: %d, green: %d, blue: %d\n", target_zone->colors.red, ...
false
false
false
false
false
0
define_attr_by_hp(HSCPRC * hp, STRPTR default_value, ULONG unmasked_flags) { HSCATTR *attr = define_var(hp, hp->defattr, 0); if (attr) { /* set scope for local attribute */ attr->macro_id = ((attr->varflag & VF_GLOBAL) ? MCI_GLOBAL : get_current_mci(hp)); /* see "attrib.h" why...
false
false
false
false
false
0
isValid() const { /* ConceptNameCodeSequence not allowed */ return DSRDocumentTreeNode::isValid() && getConceptName().isEmpty() && ValidReference; }
false
false
false
false
false
0
set_buttons(void* data) { SocketListDialog* instance_p = static_cast<SocketListDialog*>(data); // see if anything is selected GtkTreeSelection* selection_p = gtk_tree_view_get_selection(instance_p->tree_view_p); if (gtk_tree_selection_get_selected(selection_p, 0, 0)) { gtk_widget_set_sensitive(in...
false
false
false
false
false
0
parseTime(const std::string& ts, long& time) { std::string hstr, mstr, sstr; char *cts = new char[ts.length() + 1]; strcpy(cts, ts.c_str()); char *tmp = ::strtok(cts, ":"); if (tmp) hstr = tmp; tmp = ::strtok(0, ":"); if (tmp) mstr = tmp; tmp = ::strto...
false
false
false
false
false
0
command_setlights(struct gspca_dev *gspca_dev) { struct sd *sd = (struct sd *) gspca_dev; int ret, p1, p2; p1 = (sd->params.qx3.bottomlight == 0) << 1; p2 = (sd->params.qx3.toplight == 0) << 3; ret = do_command(gspca_dev, CPIA_COMMAND_WriteVCReg, 0x90, 0x8f, 0x50, 0); if (ret) return ret; return do_comm...
false
false
false
false
false
0
get_unaligned(size_t size, void *buffer, ErrorHandler *errh) { // we may need to read bits of the file if (_pos + size <= _len) { const uint8_t *chunk = _buffer + _pos; _pos += size; return reinterpret_cast<const uint8_t *>(chunk); } else if (read(buffer, size, errh) == (int)size) return reinterpret_cas...
false
false
false
false
false
0
bigauss_derivative(const double x[], const double a[], double result[]) { errno = 0; if (a[5] != 0.0 && a[6] != 0.0 && 1.0 - a[2] * a[2] >= 0.0) { const double b1 = 1 / (1 - a[2] * a[2]); const double b2 = (x[0] - a[3]) / a[5]; const double b3 = (x[1] - a[4]) / a[6]; const doub...
false
false
false
false
false
0
getQuaternaries(uint32_t variableTop, uint32_t pair) { // Return the primary weight of a variable CE, // or the maximum primary weight for a non-variable, not-completely-ignorable CE. if(pair <= 0xffff) { // one mini CE if(pair >= MIN_SHORT) { // A high secondary weight means we ...
false
false
false
false
false
0
cpl_table_duplicate_column(cpl_table *to_table, const char *to_name, const cpl_table *from_table, const char *from_name) { cpl_column *column; if (to_table == 0x0 || from_table == 0x...
false
false
false
false
false
0
Pickler_dealloc(PicklerObject *self) { PyObject_GC_UnTrack(self); Py_XDECREF(self->output_buffer); Py_XDECREF(self->write); Py_XDECREF(self->pers_func); Py_XDECREF(self->dispatch_table); Py_XDECREF(self->fast_memo); PyMemoTable_Del(self->memo); Py_TYPE(self)->tp_free((PyObject *)self)...
false
false
false
false
false
0
copy_array_region_list(Array_region_list *source) { Array_region_list *dest; if(source == NULL) return NULL; dest = alloc_array_region_list(); dest->dim_head = copy_array_range(source->dim_head); dest->next = copy_array_region_list(source->next); return dest; }
false
false
false
false
false
0