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
gnac_file_list_selection_changed_cb(GtkTreeSelection *selection, gpointer user_data) { gint selected_rows = gnac_file_list_count_selected_rows(); if (selected_rows != 0 && state == GNAC_AUDIO_READY_STATE) { gnac_bars_activate_remove(TRUE); } gnac_bars_activa...
false
false
false
false
false
0
ioh_gpio_restore_reg_conf(struct ioh_gpio *chip) { int i; for (i = 0; i < 8; i ++, chip++) { iowrite32(chip->ioh_gpio_reg.po_reg, &chip->reg->regs[chip->ch].po); iowrite32(chip->ioh_gpio_reg.pm_reg, &chip->reg->regs[chip->ch].pm); iowrite32(chip->ioh_gpio_reg.ien_reg, &chip->reg->regs[chip->ch]....
false
false
false
false
false
0
acpi_video_device_bind(struct acpi_video_bus *video, struct acpi_video_device *device) { struct acpi_video_enumerated_device *ids; int i; for (i = 0; i < video->attached_count; i++) { ids = &video->attached_array[i]; if (device->device_id == (ids->value.int_val & 0xffff)) { ids->bind_info = device; ...
false
false
false
false
false
0
import_constants(const Constants& c, OperationTree& otree, Tintintmap& tmap) { for (Tconstantmap::const_iterator it = c.cmap.begin(); it != c.cmap.end(); ++it) { int told = (*it).first; int tnew = otree.add_nulary(); tmap.insert(Tintintmap::value_type(told, tnew)); add_constant(tnew, (*it).second); } }
false
false
false
false
false
0
new_cgroup(char *group, char *controller_name, char *control_file, int value_type, struct cntl_val_t cval, struct uid_gid_t ids, int i) { int retval; /* Names of wrapper apis */ char wr[SIZE]; struct cgroup *newcgroup; struct cgroup_controller *newcontroller; newcgroup = cgroup_new_cgroup(group); if (n...
false
false
false
false
false
0
mc2b (double *mc, double *b, int m, double a) { b[m] = mc[m]; for (m--; m>=0; m--) b[m] = mc[m] - a * b[m+1]; return; }
false
false
false
false
false
0
get_sorted_properties (GladeWidgetAdaptor * adaptor, GladeEditorPageType type) { const GList *l, *properties; GList *list = NULL; properties = (type == GLADE_PAGE_PACKING) ? glade_widget_adaptor_get_packing_props (adaptor) : glade_widget_adaptor_get_properties (adaptor); for (l = properties; l; ...
false
false
false
false
false
0
defaultButton2Behavior(const XEvent *pEvent_) { if (rowDragDrop()==MSTrue) dragRow(pEvent_); else if(selectionMode()!=MSToggle) startEditing(pEvent_); }
false
false
false
false
false
0
gst_soup_http_client_sink_start (GstBaseSink * sink) { GstSoupHttpClientSink *souphttpsink = GST_SOUP_HTTP_CLIENT_SINK (sink); if (souphttpsink->prop_session) { souphttpsink->session = souphttpsink->prop_session; } else { GSource *source; GError *error = NULL; souphttpsink->context = g_main_cont...
false
false
false
false
false
0
save(const char * fileName, bool isBinaryMode) { FILE * pFile = fopen(fileName, "w"); if (isBinaryMode) { saveBinary(pFile); } else { saveText(pFile); } fclose(pFile); }
false
false
false
false
false
0
PredictorSetupEncode(TIFF* tif) { TIFFPredictorState* sp = PredictorState(tif); TIFFDirectory* td = &tif->tif_dir; if (!(*sp->setupencode)(tif) || !PredictorSetup(tif)) return 0; if (sp->predictor == 2) { switch (td->td_bitspersample) { ...
false
false
false
false
false
0
isl_ast_build_node_from_schedule( __isl_keep isl_ast_build *build, __isl_take isl_schedule *schedule) { isl_ctx *ctx; isl_schedule_node *node; if (!build || !schedule) goto error; ctx = isl_ast_build_get_ctx(build); node = isl_schedule_get_root(schedule); isl_schedule_free(schedule); build = isl_ast_build...
false
false
false
false
false
0
wd719x_wait_done(struct wd719x *wd, int timeout) { u8 status; while (timeout > 0) { status = wd719x_readb(wd, WD719X_AMR_INT_STATUS); if (status) break; timeout--; udelay(1); } if (timeout <= 0) { dev_err(&wd->pdev->dev, "direct command timed out\n"); return -ETIMEDOUT; } if (status != WD719X_IN...
false
false
false
false
false
0
operator<(ObjUser const& rhs) const { if (this->ou_type < rhs.ou_type) { return true; } else if (this->ou_type == rhs.ou_type) { if (this->pageno < rhs.pageno) { return true; } else if (this->pageno == rhs.pageno) { return (this->key < rhs.key); } } return false; }
false
false
false
false
false
0
_LoadBlobs(ArchiveHandle *AH, RestoreOptions *ropt) { Oid oid; lclContext *ctx = (lclContext *) AH->formatData; char fname[K_STD_BUF_SIZE]; StartRestoreBlobs(AH); ctx->blobToc = fopen("blobs.toc", PG_BINARY_R); if (ctx->blobToc == NULL) die_horribly(AH, modulename, "could not open large object TOC for inp...
true
true
false
false
true
1
GetFontList(lc, pattern) HTMLClass lc; char *pattern; { int count; int scale_count; int i, j, k; MemPool mp; HTMLFontList fl; fl = (HTMLFontList)MPCGet(lc->mp, sizeof(struct HTMLFontListP)); fl->names = XListFonts(lc->dpy, pattern, 999, &count); if (fl->names == NULL || count == 0) { fprintf (st...
false
false
false
false
false
0
BDB_NextDB(CF_DB *dbp,CF_DBC *dbcp,char **key,int *ksize,void **value,int *vsize) { DBT dbvalue,dbkey; int ret; memset(&dbkey,0,sizeof(DBT)); memset(&dbvalue,0,sizeof(DBT)); ret = dbcp->c_get(dbcp,&dbkey,&dbvalue,DB_NEXT); *ksize = dbkey.size; *vsize = dbvalue.size; *key = dbkey.data; *value = dbvalue.data; if (re...
false
false
false
false
false
0
CheckiTXtChunkHeader ( LFA_FileRef fileRef, ChunkState& inOutChunkState, ChunkData& inOutChunkData ) { try { LFA_Seek(fileRef, (inOutChunkData.pos + 8), SEEK_SET); char buffer[ITXT_HEADER_LEN]; long bytesRead = LFA_Read ( fileRef, buffer, ITXT_HEADER_LEN ); if (bytesRead == ITXT_HEADER_LEN) { ...
false
false
false
false
false
0
xmms2_quit (void) { xmmsc_visualization_shutdown (x_connection, x_vis); if (x_connection) { xmmsc_unref (x_connection); } }
false
false
false
false
false
0
pci_bus_unlock(struct pci_bus *bus) { struct pci_dev *dev; list_for_each_entry(dev, &bus->devices, bus_list) { if (dev->subordinate) pci_bus_unlock(dev->subordinate); pci_dev_unlock(dev); } }
false
false
false
false
false
0
del() { if(isPEmpty==false) if(mat) { int i=0; while(i!=mat->m_zeilen) { delete [] mat->m_matrix[i]; ++i; } delete [] mat->m_matrix; delete mat; //cout<<endl<<"Matrix gelscht"; } isPEmpty=true; mat=NULL; }
false
false
false
false
false
0
NSC_SignFinal(CK_SESSION_HANDLE hSession,CK_BYTE_PTR pSignature, CK_ULONG_PTR pulSignatureLen) { SFTKSession *session; SFTKSessionContext *context; unsigned int outlen; unsigned int maxoutlen = *pulSignatureLen; CK_RV crv; CHECK_FORK(); /* make sure we're legal */ crv = sftk_G...
false
false
false
false
false
0
PositionSortedDensePlist ( Obj list, Obj obj ) { UInt l; /* low */ UInt h; /* high */ UInt m; /* mid ...
false
false
false
false
false
0
create_job_record(int *error_code) { struct job_record *job_ptr; struct job_details *detail_ptr; if (job_count >= slurmctld_conf.max_job_cnt) { error("create_job_record: job_count exceeds MaxJobCount limit " "configured"); *error_code = EAGAIN; return NULL; } job_count++; *error_code = 0; last_j...
false
false
false
false
false
0
propagate(Space& home, const ModEventDelta&) { //I, drop ranges from UB that are shorter than cardMin //II, add range LB.smallest to LB.largest to LB //III, Drop ranges from UB that do not contain all elements of LB //that is: range.min()>LB.smallest or range.max()<LB.largest //This leaves only one ...
false
false
false
false
false
0
cm_tr_mx_Destroy(CM_TR_MX *mx) { if (mx == NULL) return; int v; if (mx->Jdp != NULL) { for (v = 0; v <= mx->M; v++) if(mx->Jdp[v] != NULL) free(mx->Jdp[v]); } free(mx->Jdp); if (mx->Ldp != NULL) { for (v = 0; v <= mx->M; v++) if(mx->Ldp[v] != NULL) free(mx->Ldp[v]); } free(...
false
false
false
false
false
0
dhl_set_target_email (HyperlinkState *state, const char* const target) { GtkWidget *w = go_gtk_builder_get_widget (state->gui, "email-address"); GtkWidget *w2 = go_gtk_builder_get_widget (state->gui, "email-subject"); gchar* cursor; gchar* subject; gchar* guitext; if (!target || *target == '\0') return; if( ...
false
false
false
false
false
0
_glewInit_GL_NV_evaluators (GLEW_CONTEXT_ARG_DEF_INIT) { GLboolean r = GL_FALSE; r = ((glEvalMapsNV = (PFNGLEVALMAPSNVPROC)glewGetProcAddress((const GLubyte*)"glEvalMapsNV")) == NULL) || r; r = ((glGetMapAttribParameterfvNV = (PFNGLGETMAPATTRIBPARAMETERFVNVPROC)glewGetProcAddress((const GLubyte*)"glGetMapAttribP...
false
false
false
false
false
0
write_tiff (UcaRingBuffer *buffer, Options *opts, guint width, guint height, guint bits_per_pixel) { TIFF *tif; guint32 rows_per_strip; guint n_frames; guint bits_per_sample; gsize bytes_per_pixel; if (opts->filename) tif = TIFFOpen (opts-...
false
false
false
false
false
0
specularMessCallback(void *data, t_symbol*s,int argc, t_atom*argv) { float red, green, blue, alpha=1.f; switch(argc){ case 4: alpha=atom_getfloat(argv+3); case 3: red= atom_getfloat(argv); green=atom_getfloat(argv+1); blue= atom_getfloat(argv+2); GetMyClass(data)->specularMess(static_cast<f...
false
false
false
false
false
0
HandleDebugSendEquipErrorCommand(char* args) { if (!*args) return false; uint8 msg = atoi(args); m_session->GetPlayer()->SendEquipError(InventoryResult(msg), NULL, NULL); return true; }
false
false
false
false
false
0
pcxhr_create(struct pcxhr_mgr *mgr, struct snd_card *card, int idx) { int err; struct snd_pcxhr *chip; static struct snd_device_ops ops = { .dev_free = pcxhr_chip_dev_free, }; chip = kzalloc(sizeof(*chip), GFP_KERNEL); if (! chip) { dev_err(card->dev, "cannot allocate chip\n"); return -ENOMEM; } chip...
false
false
false
false
false
0
Erase( GRA_wxWidgets *graphicsOutput, wxDC &dc ) { int xminM, yminM, xmaxM, ymaxM; graphicsOutput->GetLimits( xminM, yminM, xmaxM, ymaxM ); double xminW, yminW, xmaxW, ymaxW; ExGlobals::GetWorldLimits( xminW, yminW, xmaxW, ymaxW ); double yConvert = (ymaxW-yminW)/(ymaxM-yminM); double xConvert = (xmaxW-xmin...
false
false
false
false
false
0
FindCodeInCache(Code** code_out) { int index = Heap::code_stubs()->FindEntry(GetKey()); if (index != NumberDictionary::kNotFound) { *code_out = Code::cast(Heap::code_stubs()->ValueAt(index)); return true; } return false; }
false
false
false
false
false
0
SetThreadCallBackFunction( _CCallback0 * callback ) { Lock(); delete _thread_callback_function; _thread_callback_function = callback; UnLock(); }
false
false
false
false
false
0
append_member(ED4_base *new_member) { ED4_index index = no_of_members; if (index>=size_of_list) { // ensure free element ED4_index new_size_of_list = (size_of_list*3)/2; // resize to 1.5*size_of_list ED4_base **new_member_list = (ED4_base**)GB_calloc(new_size_of_list, sizeof(*new_member_...
false
false
false
false
false
0
normalize_ban ( /*const */ char *src, char *dest, int destlen) { /* normalize the ban to the full user!host syntax */ if (strchr (src, '!')) return src; /* already in proper format */ else if (invalid_nick (src)) { char *star; /* append a star if the last char is a . so that it means the same *...
false
false
false
false
false
0
WMProtocols(w, event, params, num_params) Widget w; /* popup shell */ XEvent *event; String *params; Cardinal *num_params; { Atom wm_delete_window; Atom wm_protocols; wm_delete_window = XInternAtom(XtDisplay(w), WM_DELETE_WINDOW, True); wm_protocols = XInternAtom(XtDisplay(w), "WM_PROT...
false
false
false
false
false
0
ctl_next_token(struct ctl_string *s) { /* * If we have a read-ahead token, reuse it. */ if (s->unread != NULL) { struct ctl_tok *tok = s->unread; s->unread = NULL; return tok; } /* * Read next token. */ s->p = skip_ascii_blanks(s->p); if ('\0' == *s->p) return ctl_token_alloc(CTL_TOK_EOF, s->p...
false
false
false
false
false
0
while_command() { int do_start, do_end; char *clause; int save_token, end_token; double exprval; c_token++; save_token = c_token; exprval = real_expression(); if (!equals(c_token,"{")) int_error(c_token,"expecting {while-clause}"); end_token = find_clause(&do_start, &do_end); ...
false
false
false
false
false
0
add_locks (client_posix_lock_t *l1, client_posix_lock_t *l2) { client_posix_lock_t *sum = NULL; sum = GF_CALLOC (1, sizeof (*sum), gf_client_mt_clnt_lock_t); if (!sum) return NULL; sum->fl_start = min (l1->fl_start, l2->fl_start); sum->fl_end = max (l1->fl_end, l2->fl_end); sum->user_flock.l_start =...
false
false
false
false
false
0
ipv4_open_server_sock(IrmoNetModule *module, unsigned int port) { SockBaseSocket *result; struct sockaddr_in addr; socklen_t addr_len; int status; result = irmo_sockbase_open(&ipv4_socket_class, AF_INET); if (result == NULL) {...
false
false
false
false
false
0
eslist_foreach_remove(eslist_t *list, data_rm_fn_t cbr, void *data) { slink_t *lk, *next, *prev; size_t removed = 0; eslist_check(list); eslist_invariant(list); g_return_val_unless(cbr != NULL, 0); safety_assert(eslist_length(list->head) == list->count); for (lk = list->head, prev = NULL; lk != NULL; lk = next...
false
false
false
false
false
0
snd_seq_timer_new(void) { struct snd_seq_timer *tmr; tmr = kzalloc(sizeof(*tmr), GFP_KERNEL); if (!tmr) return NULL; spin_lock_init(&tmr->lock); /* reset setup to defaults */ snd_seq_timer_defaults(tmr); /* reset time */ snd_seq_timer_reset(tmr); return tmr; }
false
false
false
false
false
0
natural(string::const_iterator& in) { unsigned int val = 0; while(isdigit(*in) ) { val = val * 10 + *in - '0'; in++; } return val; }
false
false
false
false
false
0
Decode(LowFirstBitReader &reader, value_t &value) const { reader.FillBuffer(m_maxCodeBits); unsigned int codeBits = Decode(reader.PeekBuffer(), value); if (codeBits > reader.BitsBuffered()) return false; reader.SkipBits(codeBits); return true; }
false
false
false
false
false
0
gs_make_mem_device(gx_device_memory * dev, const gx_device_memory * mdproto, gs_memory_t * mem, int page_device, gx_device * target) { gx_device_init((gx_device *) dev, (const gx_device *)mdproto, mem, true); dev->stype = &st_device_memory; switch (page_device) { ...
false
false
false
false
false
0
lastfree(Vmalloc_t * vm, reg Void_t * data) #else static int lastfree(vm, data) Vmalloc_t *vm; reg Void_t *data; #endif { reg Seg_t *seg; reg Block_t *fp; reg size_t s; reg Vmdata_t *vd = vm->data; reg int local; if (!data) return 0; if (!(local = vd->mode & VM_TRUST)) { if (ISLOCK(vd, 0)...
false
false
false
false
false
0
ntb_netaddress_to_string(const struct ntb_netaddress *address) { const int buffer_length = (8 * 5 + /* length of ipv6 address */ 2 + /* square brackets */ 1 + /* colon separator */ 5 + /* port number */ ...
false
false
false
false
false
0
nextTurn() { if (m_scores -> allScores()) endGame(); else { m_scores -> nextPlayer(); while (m_scores -> currentPlayer().allScores()) m_scores -> nextPlayer(); m_lateral -> nextTurn(); if (!m_scores -> currentPlayer().isHuman()) { m_hintAction -> setEnabled(false); QTimer::singleShot(kirikiSettin...
false
false
false
false
false
0
cs4265_set_bias_level(struct snd_soc_codec *codec, enum snd_soc_bias_level level) { switch (level) { case SND_SOC_BIAS_ON: break; case SND_SOC_BIAS_PREPARE: snd_soc_update_bits(codec, CS4265_PWRCTL, CS4265_PWRCTL_PDN, 0); break; case SND_SOC_BIAS_STANDBY: snd_soc_update_bits(codec, CS4265_PWRCTL, ...
false
false
false
false
false
0
scanner_downshift_word() { int offset = 'a' - 'A'; char * tp; strcpy_s( scanner_word_string, scanner_token_string ); tp = scanner_word_string; do { *tp = (char)((*tp>='A') && (*tp <='Z') ? *tp + offset : *tp) ; tp++; } while (*tp != '\0' ); }
false
false
false
false
false
0
VAR_dw_rho (MODEL *pmod) { double ut, u1; double xx = 0; double ut1 = 0, u11 = 0; int t, s; for (t=pmod->t1; t<=pmod->t2; t++) { s = t - 1; if (s >= 0 && !na(pmod->uhat[s])) { ut = pmod->uhat[t]; u1 = pmod->uhat[s]; xx += (ut - u1) * (ut - u1); ut1 += ut * u1; u11 += u1 ...
false
false
false
false
false
0
init_llcsaparray(void) { int i; struct hnamemem *table; for (i = 0; llcsap_db[i].s != NULL; i++) { table = &llcsaptable[llcsap_db[i].v]; while (table->name) table = table->nxt; table->name = llcsap_db[i].s; table->addr = llcsap_db[i].v; table->nxt = (struct hnamemem *)ca...
false
false
false
false
false
0
gvir_config_domain_graphics_spice_new_from_xml(const gchar *xml, GError **error) { GVirConfigObject *object; object = gvir_config_object_new_from_xml(GVIR_CONFIG_TYPE_DOMAIN_GRAPHICS_SPICE, "graphics", NULL, xml, error)...
false
false
false
false
false
0
AddBinaryItem( void *theEnv, char *name, int priority, void (*findFunction)(void *), void (*expressionFunction)(void *,FILE *), void (*bsaveStorageFunction)(void *,FILE *), void (*bsaveFunction)(void *,FILE *), void (*bloadStorageFunction)(void *), void (*bloadFunction)(void *), void (*clearFunction...
false
false
false
false
false
0
git_packfile_free(struct git_pack_file *p) { if (!p) return; cache_free(&p->bases); if (p->mwf.fd >= 0) { git_mwindow_free_all_locked(&p->mwf); p_close(p->mwf.fd); } pack_index_free(p); git__free(p->bad_object_sha1); git_mutex_free(&p->lock); git_mutex_free(&p->bases.lock); git__free(p); }
false
false
false
false
false
0
gnumeric_cell_renderer_toggle_get_size (GtkCellRenderer *cell, G_GNUC_UNUSED GtkWidget *widget, GdkRectangle const *cell_area, gint *x_offset, gint *y_offset, gint *width, gint *height) { GnumericCellRendererToggle *cellpixbuf = (GnumericCellRen...
false
false
false
false
false
0
drop_col(struct isl_tab *tab, int col) { int var; var = tab->col_var[col]; if (col != tab->n_col - 1) swap_cols(tab, col, tab->n_col - 1); tab->n_col--; if (var_drop_entry(tab, var) < 0) return -1; return 0; }
false
false
false
false
false
0
rsc_string(RESULT* rp, char* buf) { APP_VERSION* avp = rp->avp; if (avp->gpu_usage.rsc_type) { sprintf(buf, "%.2f CPU + %.2f %s", avp->avg_ncpus, avp->gpu_usage.usage, rsc_name(avp->gpu_usage.rsc_type) ); } else { sprintf(buf, "%.2f CPU", avp->avg_ncpus); ...
false
false
false
false
false
0
convert_line(void) { char *c, *cc; char xbuf[BUFSZ]; cc = out_line; for (c = xcrypt(in_line, xbuf); *c; c++) { *cc = 0; switch(*c) { case '\r': case '\n': *(++cc) = 0; return; case '%': if (*(c+1)) { ...
false
false
false
false
false
0
verify_exception_table(struct cafebabe_code_attribute *ca, struct verifier_jump_destinations *jd) { int err, i = 1; struct cafebabe_code_attribute_exception *ex = ca->exception_table; if (ca->exception_table_length == 0) return 0; do { if (ex->start_pc > ex->end_pc) return vrf_err("Exception table: protect...
false
false
false
false
false
0
iclass_fill_buffer (pixma_t * s, pixma_imagebuf_t * ib) { int error, n; iclass_t *mf = (iclass_t *) s->subdriver; unsigned block_size, lines_size, first_block_size; uint8_t info; /* * 1. send a block request cmd (d4 20 00... 04 00 06) * 2. examine the response for block size and/or end-of-scan flag * 3. rea...
false
false
false
false
false
0
dlog(int level, const char *format, ...) { va_list arglist; char text[LOGLEN], timestamped[LOGLEN]; FILE *out = stderr; int dotimestamp = 0; if(level > debug_level) return; va_start(arglist, format); vsnprintf(text, LOGLEN, format, arglist); va_end(arglist); text[LOGLEN -1] = 0; if (level > 7) { ...
true
true
false
false
true
1
wasp_svc_recv_mt( wasp_os_service svc, wasp_value* data ){ if( svc->closed ){ *data = wasp_vf_symbol( wasp_ss_close ); return 1; }else{ wasp_root_obj( (wasp_object) svc ); IO_TRACE( "-- %4i -- LISTENER -- ENABLE --\n", svc->handle ); wasp_enable_os_loop( ); event_...
false
false
false
false
false
0
putString(const char *stringValue) { OFCondition result = EC_Normal; /* clear internal list */ clear(); /* check input string */ if ((stringValue != NULL) && (strlen(stringValue) > 0)) { Uint16 group = 0; Uint16 channel = 0; const char *ptr = stringValue; /* retri...
false
false
false
false
false
0
Next(void) { struct icon_info *new, *old; int i; old = new = Hilite; if (new != NULL) new = new->next; if (new != NULL) Hilite = new; else new = Hilite = Head; if (new == NULL) return; if (old != NULL) RedrawIcon(old, redraw_flag,NULL); if (new != NULL) RedrawIcon(new, red...
false
false
false
false
false
0
GOGossipSelectWithCode(Player* pPlayer, GameObject* pGo, uint32 uiSender, uint32 uiAction, const char* sCode) { debug_log("SD2: GO Gossip selection with code, sender: %u, action: %u", uiSender, uiAction); Script* pTempScript = m_scripts[pGo->GetGOInfo()->ScriptId]; if (!pTempScript || !pTempScript->pGossi...
false
false
false
false
false
0
bind_socket_ai(struct evutil_addrinfo *ai, int reuse) { evutil_socket_t fd; int on = 1, r; int serrno; /* Create listen socket */ fd = evutil_socket_(ai ? ai->ai_family : AF_INET, SOCK_STREAM|EVUTIL_SOCK_NONBLOCK|EVUTIL_SOCK_CLOEXEC, 0); if (fd == -1) { event_sock_warn(-1, "socket"); return (-1); } ...
false
false
false
false
false
0
eval(SeVec3d& result) const { const SeExprNode* child0 = child(0); const SeExprNode* child1 = child(1); SeVec3d a, b; child0->eval(a); child1->eval(b); if (!_isVec) { if(a[0]<0 && std::floor(b[0])!=b[0]) a[0]=0.; result[0] = std::pow(a[0], b[0]); } else { // at least one child...
false
false
false
false
false
0
grl_source_notify_change_list (GrlSource *source, GPtrArray *changed_medias, GrlSourceChangeType change_type, gboolean location_unknown) { const gchar *source_id; g_return_if_fail (GRL_IS_SOURCE (source)); ...
false
false
false
false
false
0
Previous_Enum(FIELD * field, const void * argp) { const enumARG *args = (const enumARG *)argp; int cnt = args->count; char **kwds = &args->kwds[cnt-1]; bool ccase = args->checkcase; unsigned char *bp = (unsigned char *)field_buffer(field,0); if (kwds) { while(cnt--) { if (Compare((uns...
false
false
false
false
false
0
get_client_header( void *_c, const char *key, const char *val ) { mcontext *c = (mcontext*)_c; if( key == NULL || val == NULL ) return 1; if( config.proxy_mode && strcmpi(key,"X-Forwarded-For") == 0 ) protocol_send_header(c->p,key,c->xff); else protocol_send_header(c->p,key,val); return 1; }
false
false
false
false
false
0
make_eh_edge (edge_cache, src, insn) sbitmap *edge_cache; basic_block src; rtx insn; { int is_call = GET_CODE (insn) == CALL_INSN ? EDGE_ABNORMAL_CALL : 0; rtx handlers, i; handlers = reachable_handlers (insn); for (i = handlers; i; i = XEXP (i, 1)) make_label_edge (edge_cache, src, XEXP (i...
false
false
false
false
false
0
reset_partlist(blkid_partlist ls) { if (!ls) return; free_parttables(ls); if (ls->next_partno) { /* already initialized - reset */ int tmp_nparts = ls->nparts_max; blkid_partition tmp_parts = ls->parts; memset(ls, 0, sizeof(struct blkid_struct_partlist)); ls->nparts_max = tmp_nparts; ls->parts = tm...
false
false
false
false
false
0
contentsMargin() const { qreal a, b, c, d; getContentsMargins(&a, &b, &c, &d); if (a == b && a == c && a == d) return a; return -1; }
false
false
false
false
false
0
setup_frame_stacking(FvwmWindow *fw) { int i; int n; Window w[10 + NUMBER_OF_TITLE_BUTTONS]; /* Stacking order (top to bottom): * - Parent window * - Title and buttons * - Corner handles * - Side handles */ n = 0; if (!IS_SHADED(fw)) { w[n] = FW_W_PARENT(fw); n++; } if (HAS_TITLE(fw)) { f...
false
false
false
false
false
0
python_assist_query_calltip (PythonAssist* assist, const gchar *call_context) { IAnjutaEditor *editor = IANJUTA_EDITOR (assist->priv->iassist); gint offset = python_assist_get_calltip_context_position (assist); gchar *interpreter_path; const gchar *cur_filename; gchar *source = ianjuta_editor_get_text_all (edi...
false
false
false
false
false
0
htdbm_verify(htdbm_t *htdbm) { apr_datum_t key, val; char *pwd; char *rec, *cmnt; key.dptr = htdbm->username; key.dsize = strlen(htdbm->username); if (!apr_dbm_exists(htdbm->dbm, key)) return APR_ENOENT; if (apr_dbm_fetch(htdbm->dbm, key, &val) != APR_SUCCESS) return APR_ENO...
false
false
false
false
false
0
default_mangle_assembler_name (const char *name ATTRIBUTE_UNUSED) { const char *skipped = name + (*name == '*' ? 1 : 0); const char *stripped = targetm.strip_name_encoding (skipped); if (*name != '*' && user_label_prefix[0]) stripped = ACONCAT ((user_label_prefix, stripped, NULL)); return get_identifier (st...
false
false
false
false
false
0
setSelected(int id) { if (!testAttribute(Qt::WA_WState_Polished)) { d->wantToBeId = id; ensurePolished(); return; } QHash<QObject*, int>::Iterator it = d->btnMap.begin(); QHash<QObject*, int>::Iterator itEnd = d->btnMap.end(); QAbstractButton* button = 0; for (; it != i...
false
false
false
false
false
0
gfs_output_destroy (GtsObject * object) { GfsOutput * output = GFS_OUTPUT (object); if (output->file) gfs_output_file_close (output->file); output_free (output); (* GTS_OBJECT_CLASS (gfs_output_class ())->parent_class->destroy) (object); }
false
false
false
false
false
0
SyfSynthFreeCodeAbl( FsmFigure ) fsmfig_list *FsmFigure; { syfinfo *SyfInfo; syfcode *CodeArray; long Index; SyfInfo = FSM_SYF_INFO( FsmFigure ); CodeArray = SyfInfo->CODE_ARRAY; for ( Index = 0; Index < SyfInfo->NUMBER_CODE; Index++ ) { if ( CodeArray[ Index ].ABL != (ablexpr *)0 ) { ...
false
false
false
false
false
0
hdspm_get_latency(struct hdspm *hdspm) { int n; n = hdspm_decode_latency(hdspm->control_register); /* Special case for new RME cards with 32 samples period size. * The three latency bits in the control register * (HDSP_LatencyMask) encode latency values of 64 samples as * 0, 128 samples as 1 ... 4096 samples...
false
false
false
false
false
0
_GD_CDivideData(DIRFILE *D, void *A, gd_spf_t spfA, GD_DCOMPLEXP(B), gd_spf_t spfB, gd_type_t type, size_t n) { size_t i; dtrace("%p, %p, %u, %p, %u, 0x%x, %zu", D, A, spfA, B, spfB, type, n); switch (type) { case GD_NULL: break; case GD_UINT8: DIVIDE( uint8_t); break; ...
false
false
false
false
false
0
has_key(int keycode) { T((T_CALLED("has_key(%d)"), keycode)); returnCode(SP != 0 ? has_key_internal(keycode, SP->_keytry) : FALSE); }
false
false
false
false
false
0
evm_init_secfs(void) { int error = 0; evm_init_tpm = securityfs_create_file("evm", S_IRUSR | S_IRGRP, NULL, NULL, &evm_key_ops); if (!evm_init_tpm || IS_ERR(evm_init_tpm)) error = -EFAULT; return error; }
false
false
false
false
false
0
blunder_size(int move, int color, int *defense_point, signed char safe_stones[BOARDMAX]) { int libs[5]; int liberties = accuratelib(move, color, 5, libs); int trouble = 0; int save_verbose = verbose; float return_value = 0.0; int atari; signed char defense_moves[BOARDMAX]; if (defense_point) ...
true
true
false
false
false
1
_advanced_apply_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata) { int i; const Eina_List *l; CFText_Class *tc; E_Ilist_Item *ili; /* Save current data */ if (cfdata->cur_class) { tc = cfdata->cur_class; tc->size = cfdata->cur_size; if (cfdata->cur_font...
false
false
false
false
false
0
sdhci_led_control(struct led_classdev *led, enum led_brightness brightness) { struct sdhci_host *host = container_of(led, struct sdhci_host, led); unsigned long flags; spin_lock_irqsave(&host->lock, flags); if (host->runtime_suspended) goto out; if (brightness == LED_OFF) sdhci_deactivate_led(host); else ...
false
false
false
false
false
0
resize(int w, int h) { if((unsigned int)w == nx && (unsigned int)h == ny) return sz; if(w == GAGenome::ANY_SIZE) w = GARandomInt(minX, maxX); else if(w < 0) w = nx; // do nothing else if(minX == maxX) minX=maxX = w; else{ if(w < STA_CAST(int, minX)) w=minX; if(w > STA_CAST(int, maxX)) w=...
false
false
false
false
false
0
ooCapabilityCreateVideoCapability (ooH323EpCapability *epCap, OOCTXT *pctxt, int dir) { if(!epCap) { OOTRACEERR1("Error:Invalid capability parameter passed to " "ooCapabilityCreateVideoCapability.\n"); return NULL; } if(!(epCap->dir & dir)) { OOTRACEERR1("Error...
false
false
false
false
false
0
b43_nphy_update_tx_cal_ladder(struct b43_wldev *dev, u16 core) { struct b43_phy_n *nphy = dev->phy.n; int i; u16 scale, entry; u16 tmp = nphy->txcal_bbmult; if (core == 0) tmp >>= 8; tmp &= 0xff; for (i = 0; i < 18; i++) { scale = (ladder_lo[i].percent * tmp) / 100; entry = ((scale & 0xFF) << 8) | ladder...
false
false
false
false
false
0
wav_sample_rate(input_object *obj) { struct wav_local_data *data; int result = 0; if (!obj) return result; data = (struct wav_local_data *)obj->local_data; if (!data) { return result; } result = data->format.rate; return result; }
false
false
false
false
false
0
__freading (FILE *fp) { return ((fp->_flags & _IO_NO_WRITES) || ((fp->_flags & (_IO_CURRENTLY_PUTTING | _IO_NO_READS)) == 0 && fp->_IO_read_base != NULL)); }
false
false
false
false
false
0
ED4_mark_matching_species(AW_window */*aww*/, AW_CL cl_pattern) { ED4_SearchPositionType pattern = ED4_SearchPositionType(cl_pattern); ED4_terminal *terminal = ED4_ROOT->root_group_man->get_first_terminal(); GB_ERROR error = 0; GB_transaction ta(GLOBAL_gb_main); ...
false
false
false
false
false
0
unify_rules() { if (!GO_ON()) return; /* combines several rules of the same left hand side */ list<Rule *>::iterator r, rx; restart: for (r=rules.begin(); r!=rules.end(); r++) if (*r) { rx=r; rx++; while (rx!=rules.end()) if (*rx) { if ((*r)->get_left()==(...
false
false
false
false
false
0
afr_get_source_lock_recovery (xlator_t *this, fd_t *fd) { afr_fd_ctx_t *fdctx = NULL; afr_private_t *priv = NULL; uint64_t tmp = 0; int i = 0; int source_child = -1; int ret = 0; ...
false
false
false
false
false
0
buf_pointer_is_block_field( /*=======================*/ const void* ptr) /*!< in: pointer not dereferenced */ { ulint i; for (i = 0; i < srv_buf_pool_instances; i++) { ibool found; found = buf_pointer_is_block_field_instance( buf_pool_from_array(i), ptr); if (found) { return(TRUE); } } return(FALS...
false
false
false
false
false
0
spif_array_show(spif_array_t self, spif_charptr_t name, spif_str_t buff, size_t indent) { spif_char_t tmp[4096]; spif_listidx_t i; if (SPIF_LIST_ISNULL(self)) { SPIF_OBJ_SHOW_NULL(array, name, buff, indent, tmp); return buff; } memset(tmp, ' ', indent); snprintf(SPIF_CAST_C(cha...
false
false
false
false
false
0