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
slotSpellReady( K3Spell *spell ) { kDebug(0) << "KDictSpellingHighlighter::slotSpellReady( " << spell << " )"; if ( d->globalConfig ) { connect( d->sDictionaryMonitor, SIGNAL(destroyed()), this, SLOT(slotDictionaryChanged())); } if ( spell != d->spell ) { delete d->s...
false
false
false
false
false
0
pointer_int_sum (enum tree_code resultcode, tree ptrop, tree intop) { tree size_exp; tree result; tree folded; /* The result is a pointer of the same type that is being added. */ tree result_type = TREE_TYPE (ptrop); if (TREE_CODE (TREE_TYPE (result_type)) == VOID_TYPE) { if (pedantic || warn...
false
false
false
false
true
1
e_tree_table_canvas_scrolled_cb (GtkAdjustment *vadjustment, GParamSpec *param, ETree *tree) { g_return_if_fail (E_IS_TREE (tree)); if (tree->priv->item) e_table_item_cursor_scrolled (E_TABLE_ITEM (tree->priv->item)); }
false
false
false
false
false
0
defineSet ( const std::string &magick_, const std::string &key_, bool flag_ ) { modifyImage(); if (flag_) { ExceptionInfo exceptionInfo; GetExceptionInfo( &exceptionInfo ); std::string options = magick_ + ":" + key_ + "="; A...
false
false
false
false
false
0
be_cmd_get_hsw_config(struct be_adapter *adapter, u16 *pvid, u32 domain, u16 intf_id, u8 *mode, bool *spoofchk) { struct be_mcc_wrb *wrb; struct be_cmd_req_get_hsw_config *req; void *ctxt; int status; u16 vid; spin_lock_bh(&adapter->mcc_lock); wrb = wrb_from_mccq(adapter); if (!wrb) { status = -EBUSY; ...
false
false
false
false
false
0
get_thermal_instance(struct thermal_zone_device *tz, struct thermal_cooling_device *cdev, int trip) { struct thermal_instance *pos = NULL; struct thermal_instance *target_instance = NULL; mutex_lock(&tz->lock); mutex_lock(&cdev->lock); list_for_each_entry(pos, &tz->thermal_instances, tz_node) { if (pos->tz ...
false
false
false
false
false
0
classbrowser_function_add (gpointer data, gpointer user_data) { gphpedit_debug(DEBUG_CLASSBROWSER); ClassBrowserFunction *function= (ClassBrowserFunction *) data; GtkTreeIter iter; GtkTreeIter class_iter; GString *function_decl; guint type; GtkTreeStore *store= GTK_TREE_STORE(user_data); if (function->...
false
false
false
false
false
0
table_config_new(const char *table_name) { struct ldap_table_config *p; if (!(p = ast_calloc(1, sizeof(*p)))) return NULL; if (table_name) { if (!(p->table_name = ast_strdup(table_name))) { free(p); return NULL; } } return p; }
false
false
false
false
false
0
Finalize(SuffixTree* tree) { if(tree == 0) return 0; ST_DeleteSubTree(tree->root,tree->allocator); tree->allocator->free(tree); return 1; }
false
false
false
false
false
0
dump_to_file(const char *buffer, int size, void *data) { FILE *dest = (FILE *)data; if(fwrite(buffer, size, 1, dest) != 1) return -1; return 0; }
false
false
false
false
false
0
add_standard(struct firmware* f, char* firmware_file, char* standard_file) { unsigned char* standard_data; unsigned int len; struct firmware_description desc; create_standard_data(standard_file, &standard_data, &len); if(!standard_data) { fprintf(stderr, "Couldn't create the firmware standard data.\n"); retur...
false
false
false
false
false
0
window_set_node_of_window (WINDOW *window, NODE *node) { window->node = node; window->pagetop = 0; window->point = 0; recalculate_line_starts (window); window->flags |= W_UpdateWindow; /* The display_pos member is nonzero if we're displaying an anchor. */ window->point = node ? node->display_pos : 0; w...
false
false
false
false
false
0
gr_permuteInPlace(int32 *row, int32 n_row, int32 *col, int32 n_col, int32 *perm, int32 n_perm, int32 *permI, int32 n_permI) { int32 ret = 0; int32 ir, ic, iold, iord; int32 tmpcol, neword, auxint; int32 nNod = n_perm, nEdge = n_col; int32 *order = 0; /* Order vector for col array. */ order...
false
false
false
false
false
0
v_safe_ratio( const double numerator, const double denominator ) { double return_value; const double filter_n = VERDICT_DBL_MAX; const double filter_d = VERDICT_DBL_MIN; if ( fabs( numerator ) <= filter_n && fabs( denominator ) >= filter_d ) { return_value = numerator / denominator; } else ...
false
false
false
false
false
0
get_yesno(UAContext *ua, const char *prompt) { int len; int ret; ua->pint32_val = 0; for (;;) { if (ua->api) ua->UA_sock->signal(BNET_YESNO); if (!get_cmd(ua, prompt)) { return false; } len = strlen(ua->cmd); if (len < 1 || len > 3) { continue; } i...
false
false
false
false
false
0
qat_uclo_init_memory(struct icp_qat_fw_loader_handle *handle) { int i, ae; struct icp_qat_uclo_objhandle *obj_handle = handle->obj_handle; struct icp_qat_uof_initmem *initmem = obj_handle->init_mem_tab.init_mem; for (i = 0; i < obj_handle->init_mem_tab.entry_num; i++) { if (initmem->num_in_bytes) { if (qat_uc...
false
false
false
false
false
0
gf_filter_puts(register char *s) { GF_INIT(gf_master, gf_master); /* * set up for any errors a filter may encounter */ if(setjmp(gf_error_state)){ dprint((4, "ERROR: gf_filter_puts: %s\n", gf_error_string ? gf_error_string : "NULL")); return(gf_error_string); } while(*s) GF_...
false
false
false
true
false
1
send_ack(struct neighbour *neigh, unsigned short nonce, unsigned short interval) { int rc; debugf("Sending ack (%04x) to %s on %s.\n", nonce, format_address(neigh->address), neigh->ifp->name); rc = start_unicast_message(neigh, MESSAGE_ACK, 2); if(rc < 0) return; accumulate_unicast_short(neigh...
false
false
false
false
false
0
ssl_parse_change_cipher_spec( ssl_context *ssl ) { int ret; SSL_DEBUG_MSG( 2, ( "=> parse change cipher spec" ) ); if( ( ret = ssl_read_record( ssl ) ) != 0 ) { SSL_DEBUG_RET( 1, "ssl_read_record", ret ); return( ret ); } if( ssl->in_msgtype != SSL_MSG_CHANGE_CIPHER_SPEC ) ...
false
false
false
false
false
0
formTextAlignment(::FormWidget *fm) { Qt::Alignment qtalign = Qt::AlignLeft; switch (fm->getField()->getTextQuadding()) { case quaddingCentered: qtalign = Qt::AlignHCenter; break; case quaddingRightJustified: qtalign = Qt::AlignRight; break; case quaddingLeftJustified: qt...
false
false
false
false
false
0
F_mpz_set_si(F_mpz_t f, const long val) { if (FLINT_ABS(val) > COEFF_MAX) // val is large { __mpz_struct * mpz_coeff = _F_mpz_promote(f); mpz_set_si(mpz_coeff, val); } else { _F_mpz_demote(f); *f = val; // val is small } }
false
false
false
false
false
0
createEncodings(string &encoded_points, const vector <LatLng> &points, const vector <double> &dists) { encoded_points = "";; int plat = 0; int plng = 0; for(unsigned int i = 0; i < points.size(); i++) { if(dists[i] >= 0.0 || i == 0 || i == points.size()-1) { int late5 = roundToInt(...
false
false
false
false
false
0
checklinearInitialize(checklinear_ *r, double ic) { ReturnErrIf(r == NULL); r->state = 'a'; r->lastV = ic; return 0; }
false
false
false
false
false
0
env_array_for_step(char ***dest, const job_step_create_response_msg_t *step, uint16_t launcher_port, bool preserve_env) { char *tmp, *tpn; uint32_t node_cnt = step->step_layout->node_cnt; uint32_t cluster_flags = slurmdb_setup_cluster_flags(); tpn = _uint16_array_to_str(step->step_layout->node_cnt, ...
false
false
false
false
false
0
os_shell_execute(char *p_cmd, char *ip, char *hostname, char *iface) { RC_TYPE rc = RC_OK; int child; child = vfork(); switch (child) { case 0: /* child */ setenv("INADYN_IP", ip, 1); setenv("INADYN_HOSTNAME", hostname, 1); if (iface) setenv("INADYN_IFACE", iface, 1); execl("/bin/sh", "sh", "-c"...
false
false
false
false
true
1
set_read_state(ReadState value) { ReadState old_value = read_state_; read_state_ = value; if (value != old_value) { LOG_J(LS_VERBOSE, this) << "set_read_state"; SignalStateChange(this); CheckTimeout(); } }
false
false
false
false
false
0
odm_InitHybridAntDiv(struct odm_dm_struct *pDM_Odm) { if (!(pDM_Odm->SupportAbility & ODM_BB_ANT_DIV)) { ODM_RT_TRACE(pDM_Odm, ODM_COMP_ANT_DIV, ODM_DBG_LOUD, ("Return: Not Support HW AntDiv\n")); return; } rtl88eu_dm_antenna_div_init(pDM_Odm); }
false
false
false
false
false
0
ifp_write_close(struct ifp_device * dev) { int i = 0; int e = 0; int remainder = dev->current_offset % IFP_BULK_BUFF_SIZE; if (remainder != 0) { i = ifp_file_upload(dev, dev->iobuff, remainder); if (i != remainder) { ifp_err_i(i, "problem uploading last %d bytes. " "Attempting to close file anyways.", re...
false
false
false
false
false
0
plugin_load_standard_plugins (void) { static const char *names[] = { #ifdef G_OS_WIN32 "pgpmime", "pgpinline", #else /* post-2.5 maybe "bogofilter", */ #endif NULL }; int i; gchar *error, *filename; for (i=0; names[i]; i++) { /* Simple hack to check whether the plugin has already * been loaded b...
false
false
false
false
false
0
circ_buf_full(struct circ_buf_t *cb) { void *next_pos; if ((next_pos = (void *) ((char *) cb->wpos + cb->size)) >= cb->end) next_pos = cb->start; if (next_pos == cb->rpos) return 1; else return 0; }
false
false
false
false
false
0
usb_intf_start(struct adapter *padapter) { RT_TRACE(_module_hci_intfs_c_, _drv_err_, ("+usb_intf_start\n")); rtw_hal_inirp_init(padapter); RT_TRACE(_module_hci_intfs_c_, _drv_err_, ("-usb_intf_start\n")); }
false
false
false
false
false
0
IPrcParse(const pfPrcTag* tag, plResManager* mgr) { if (tag->getName() == "MultiStageParams") { fStage = tag->getParam("Stage", "0").toInt(); fEvent = tag->getParam("Event", "0").toInt(); } else if (tag->getName() == "Avatar") { if (tag->hasChildren()) fAvatar = mgr->prcParse...
false
false
false
false
false
0
mca_base_pvar_find_by_name (const char *full_name, int *index) { void *tmp; int rc; rc = opal_hash_table_get_value_ptr (&mca_base_pvar_index_hash, full_name, strlen (full_name), &tmp); if (OPAL_SUCCESS != rc) { return rc; } *index = (int)(uintptr...
false
false
false
false
false
0
_tpl_log_store_factory_add (const gchar *logstore_type, TplLogStoreConstructor constructor) { gchar *key; g_return_if_fail (!TPL_STR_EMPTY (logstore_type)); g_return_if_fail (constructor != NULL); g_return_if_fail (logstores_table != NULL); key = g_strdup (logstore_type); if (g_hash_table_lookup (log...
false
false
false
false
false
0
vsl_hdr(enum VSL_tag_e tag, uint32_t *p, unsigned len, unsigned id) { assert(((uintptr_t)p & 0x3) == 0); p[1] = id; VMB(); p[0] = vsl_w0(tag, len); }
false
false
false
false
false
0
cbrtf(float x) { float r,s,t; int32_t hx; u_int32_t sign; u_int32_t high; GET_FLOAT_WORD(hx,x); sign=hx&0x80000000; /* sign= sign(x) */ hx ^=sign; if(hx>=0x7f800000) return(x+x); /* cbrt(NaN,INF) is itself */ if(hx==0) return(x); /* cbrt(0) is itself */ SET_FLOAT_WORD(x,hx); /* x <- |x| */ /*...
false
false
false
false
false
0
ares__timeadd(struct timeval *now, int millisecs) { now->tv_sec += millisecs/1000; now->tv_usec += (millisecs%1000)*1000; if(now->tv_usec >= 1000000) { ++(now->tv_sec); now->tv_usec -= 1000000; } return 0; }
false
false
false
false
false
0
selection_changed_cb (GtkTreeSelection *selection, GladeInspector *inspector) { GList *sel = NULL, *l; gtk_tree_selection_selected_foreach (selection, (GtkTreeSelectionForeachFunc) selection_foreach_func, &sel); /* We dont modify the ...
false
false
false
false
false
0
symtable_enter_block(struct symtable *st, identifier name, _Py_block_ty block, void *ast, int lineno, int col_offset) { PySTEntryObject *prev = NULL, *ste; ste = ste_new(st, name, block, ast, lineno, col_offset); if (ste == NULL) return 0; if (PyList_Append(st->st_stack, (P...
false
false
false
false
false
0
normalize_time(int tnum) /* Convert hhmm so mm<60 */ { int min,hr; min=tnum % 100; /* The minutes */ hr=tnum / 100; /* The hours */ hr+=min/60; min=min%60; while(hr<0) hr+=24; hr=hr%24; return hr*100+min; }
false
false
false
false
false
0
amdmsWriteElementDouble(amdmsFITS *file, int iCol, long iRow, double value, long offset) { int status = 0; if (fits_write_col(file->fits, TDOUBLE, iCol, iRow, offset + 1, 1L, &value, &status) != 0) { amdmsReportFitsError(file, status, __LINE__, NULL); return amdmsFAILURE; } return amdmsSUCCESS; ...
false
false
false
false
false
0
get_square(struct lens *lens, struct state *state) { ensure0(lens->tag == L_SQUARE, state->info); struct lens *concat = lens->child; struct tree *tree = NULL; struct re_registers *old_regs = state->regs; uint old_nreg = state->nreg; uint end = REG_END(state); uint start = REG_START(state); ...
false
false
false
false
false
0
torch_Tensor___mul__(lua_State *L) { THTensor *tensor1 = luaT_toudata(L, 1, torch_Tensor_id); THTensor *tensor2 = luaT_toudata(L, 2, torch_Tensor_id); THTensor *r; if(!tensor1 && !tensor2) luaL_error(L, "expecting two Tensors or one Tensor and one number"); else { r = THTensor_new(); luaT_pushu...
false
false
false
false
false
0
httpPutForService(HttpQueue *q, HttpPacket *packet, bool serviceQ) { mprAssert(packet); q->count += httpGetPacketLength(packet); packet->next = 0; if (q->first) { q->last->next = packet; q->last = packet; } else { q->first = packet; q->last = packet; } ...
false
false
false
false
false
0
vDestroyListInfoList(void) { list_desc_type *pCurr, *pNext; list_value_type *pValueCurr, *pValueNext; DBG_MSG("vDestroyListInfoList"); /* Free the LFO list */ usLfoLen = 0; aulLfoList = xfree(aulLfoList); /* Free the List Information List */ pCurr = pAnchor; while (pCurr != NULL) { pNext = pCurr->pNext; ...
false
false
false
false
false
0
ResetSampleFrequency(replaygain_t * rgData, long samplefreq) { /* zero out initial values, only first MAX_ORDER values */ memset(rgData->linprebuf, 0, MAX_ORDER * sizeof(*rgData->linprebuf)); memset(rgData->rinprebuf, 0, MAX_ORDER * sizeof(*rgData->rinprebuf)); memset(rgData->lstepbuf, 0, MAX_ORDER * s...
false
false
false
false
false
0
read_long_string (LexState *ls, SemInfo *seminfo, int sep) { int line = ls->linenumber; /* initial line (for error message) */ save_and_next(ls); /* skip 2nd '[' */ if (currIsNewline(ls)) /* string starts with a newline? */ inclinenumber(ls); /* skip it */ for (;;) { switch (ls->current) { cas...
false
false
false
false
false
0
perf_sample_event_took(u64 sample_len_ns) { u64 allowed_ns = ACCESS_ONCE(perf_sample_allowed_ns); u64 avg_local_sample_len; u64 local_samples_len; if (allowed_ns == 0) return; /* decay the counter by 1 average sample */ local_samples_len = __this_cpu_read(running_sample_length); local_samples_len -= local_sa...
false
false
false
false
false
0
ganv_canvas_base_paint_rect(GanvCanvasBase* canvas, gint x0, gint y0, gint x1, gint y1) { gint draw_x1, draw_y1; gint draw_x2, draw_y2; gint draw_width, draw_height; g_return_if_fail(!canvas->need_update); draw_x1 = MAX(x0, canvas->layout.hadjustment->value - canvas->zoom_xofs); draw_y1 = MAX(y0, canvas->layout...
false
false
false
false
false
0
bpf_map_put_uref(struct bpf_map *map) { if (atomic_dec_and_test(&map->usercnt)) { if (map->map_type == BPF_MAP_TYPE_PROG_ARRAY) bpf_fd_array_map_clear(map); } }
false
false
false
false
false
0
init ( void ) { /* We must call the api here since we call this from other * things other than the slurmctld. */ uint16_t select_type_param = slurm_get_select_type_param(); if (select_type_param & CR_OTHER_CONS_RES) plugin_id = 108; debug_flags = slurm_get_debug_flags(); verbose("%s loaded", plugin_name); r...
false
false
false
false
false
0
CleanObjPosObjCopy ( Obj obj ) { UInt i; /* loop variable */ /* remove the forwarding pointer */ ADDR_OBJ(obj)[0] = ELM_PLIST( ADDR_OBJ(obj)[0], 1 ); CHANGED_BAG(obj); /* now it is cleaned ...
false
false
false
false
false
0
ktest_equal_authenticator(krb5_authenticator *ref, krb5_authenticator *var) { int p = TRUE; if (ref == var) return TRUE; else if (ref == NULL || var == NULL) return FALSE; p = p && ptr_equal(client,ktest_equal_principal_data); p = p && ptr_equal(checksum,ktest_equal_checksum); p = p && scalar_e...
false
false
false
false
false
0
pm_ctrl_init(struct pci_dev *dev, int offset) { int err; u16 value; err = pci_read_config_word(dev, offset, &value); if (err) goto out; if (value & PCI_PM_CTRL_PME_ENABLE) { value &= ~PCI_PM_CTRL_PME_ENABLE; err = pci_write_config_word(dev, offset, value); } out: return ERR_PTR(err); }
false
false
false
false
false
0
tc_calc_rtable(struct tc_ratespec *r, __u32 *rtab, int cell_log, unsigned mtu, enum link_layer linklayer) { int i; unsigned sz; unsigned bps = r->rate; unsigned mpu = r->mpu; if (mtu == 0) mtu = 2047; if (cell_log < 0) { cell_log = 0; while ((mtu >> cell_log) > 255) cell_log++; } for (i=0;...
false
false
false
false
false
0
filter_create(fspec_t *fs) { int i; filter_t *fi; if ((fi = (filter_t *) malloc(sizeof(*fi) + sizeof(float)*(fs->np + 1)))) { fi->fs = fs; fi->sum = 0.0; /* Moving average filters only */ fi->ptr = 0; for (i = 0; i <= fi->fs->np; i++) fi->v[i] = 0.0...
false
true
false
false
false
1
gck_builder_add_date (GckBuilder *builder, gulong attr_type, const GDate *value) { CK_DATE date; g_return_if_fail (value != NULL); convert_gdate_to_ckdate (value, &date); gck_builder_add_data (builder, attr_type, (const guchar *)&date, sizeof (CK_...
false
false
false
false
false
0
mxs_auart_get_mctrl(struct uart_port *u) { struct mxs_auart_port *s = to_auart_port(u); u32 stat = readl(u->membase + AUART_STAT); u32 mctrl = 0; if (stat & AUART_STAT_CTS) mctrl |= TIOCM_CTS; return mctrl_gpio_get(s->gpios, &mctrl); }
false
false
false
false
false
0
tcd_mct_encode ( opj_tcd_t *p_tcd ) { opj_tcd_tile_t * l_tile = p_tcd->tcd_image->tiles; opj_tcd_tilecomp_t * l_tile_comp = p_tcd->tcd_image->tiles->comps; OPJ_UINT32 samples = (l_tile_comp->x1 - l_tile_comp->x0) * (l_tile_comp->y1 - l_tile_comp->y0); OPJ_UINT32 i; OPJ_BYTE ** l_data = 0...
false
true
false
false
true
1
set_Wextra (int setting) { extra_warnings = setting; warn_unused_value = setting; warn_unused_parameter = (setting && maybe_warn_unused_parameter); /* We save the value of warn_uninitialized, since if they put -Wuninitialized on the command line, we need to generate a warning about not using it witho...
false
false
false
false
false
0
gtk_xtext_adjustment_changed (GtkAdjustment * adj, GtkXText * xtext) { #ifdef SMOOTH_SCROLL if (xtext->buffer->old_value != xtext->adj->value) #else if ((int) xtext->buffer->old_value != (int) xtext->adj->value) #endif { if (xtext->adj->value >= xtext->adj->upper - xtext->adj->page_size) xtext->buffer->scrollba...
false
false
false
false
false
0
sixpack_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg) { struct sixpack *sp = sp_get(tty); struct net_device *dev; unsigned int tmp, err; if (!sp) return -ENXIO; dev = sp->dev; switch(cmd) { case SIOCGIFNAME: err = copy_to_user((void __user *) arg, dev->name, ...
false
false
false
false
false
0
message (GtkMessageType type, char *string) { /* If the dialog is already up, kill it. */ if (message_dialog != NULL) gtk_widget_destroy ((GtkWidget *) message_dialog); message_dialog = gtk_message_dialog_new ((GtkWindow *) main_window, GTK_DIALOG_DESTROY...
false
false
false
false
false
0
copper_cant_read (int hpos, int alloc) { int cant = copper_cant_read2 (hpos, alloc); if (cant && debug_dma) record_dma_event (DMA_EVENT_COPPERWANTED, hpos, vpos); return cant; }
false
false
false
false
false
0
AlterForeignServer(AlterForeignServerStmt *stmt) { Relation rel; HeapTuple tp; Datum repl_val[Natts_pg_foreign_server]; bool repl_null[Natts_pg_foreign_server]; bool repl_repl[Natts_pg_foreign_server]; Oid srvId; Form_pg_foreign_server srvForm; rel = heap_open(ForeignServerRelationId, RowExclusiveLock); ...
false
false
false
true
false
1
vmw_user_dmabuf_synccpu_release(uint32_t handle, struct ttm_object_file *tfile, uint32_t flags) { if (!(flags & drm_vmw_synccpu_allow_cs)) return ttm_ref_object_base_unref(tfile, handle, TTM_REF_SYNCCPU_WRITE); return 0; }
false
false
false
false
false
0
holeDone() { for (PlayerList::Iterator it = players->begin(); it != players->end(); ++it) (*it).ball()->setVisible(false); startNextHole(); sayWhosGoing(); }
false
false
false
false
false
0
_item_sub_items_clear(Elm_Gen_Item *it) { Eina_List *tl = NULL, *l; Elm_Object_Item *it2; ELM_GENLIST_ITEM_CHECK_OR_RETURN(it); EINA_LIST_FOREACH (it->item->items, l, it2) tl = eina_list_append(tl, it2); EINA_LIST_FREE (tl, it2) elm_object_item_del(it2); }
false
false
false
false
false
0
commit_uc(struct uc_dict *dict, int x, int y) { struct use_case *uc; if (x < 0 || y < 0) { return ; } uc = malloc(sizeof(struct use_case)); uc->id[0] = x; uc->id[1] = y; /**/ uc->next = dict->uc_head.next; dict->uc_head.next = uc; dict->nr_ucs ++; }
false
false
false
false
false
0
dochdir(char *word) { /* report to /dev/wdir if it exists and we're interactive */ static int wdirfd = -2; if(chdir(word)<0) return -1; if(flag['i']!=0){ if(wdirfd==-2) /* try only once */ wdirfd = open("/dev/wdir", OWRITE|OCEXEC); if(wdirfd>=0) write(wdirfd, word, strlen(word)); } return 1; }
false
false
false
false
false
0
afr_sh_entry_impunge_symlink (call_frame_t *impunge_frame, xlator_t *this, int child_index, const char *linkname) { afr_private_t *priv = NULL; afr_local_t *impunge_local = NULL; dict_t *dict = NULL; struct iatt *buf ...
false
false
false
false
false
0
vbo_exec_EvalCoord2f( GLfloat u, GLfloat v ) { GET_CURRENT_CONTEXT( ctx ); struct vbo_exec_context *exec = &vbo_context(ctx)->exec; { GLint i; if (exec->eval.recalculate_maps) vbo_exec_eval_update( exec ); for (i = 0; i <= VBO_ATTRIB_TEX7; i++) { if (exec->eval.map2[i].map) if (e...
false
false
false
false
false
0
PySymtable_Free(struct symtable *st) { Py_XDECREF(st->st_symbols); Py_XDECREF(st->st_stack); PyMem_Free((void *)st); }
false
false
false
false
false
0
toolTipXY(int &x,int &y) { MSToolTip *toolTipWidget=server()->toolTip(); int w=toolTipWidget->width(); int h=toolTipWidget->height(); int tailPosition=0; int rootx,rooty; rootXY(rootx,rooty); x=rootx+(width()/2); y=rooty+height(); if (x+w>server()->width()) { x=rootx+width()/2-w; tailPosi...
false
false
false
false
false
0
Mono_Posix_Stdlib_fseek (void* stream, gint64 offset, int origin) { mph_return_if_long_overflow (offset); return fseek (stream, offset, origin); }
false
false
false
false
false
0
Offset (TextDisplay* display, int index) { if (display->painter != nil) { const Font* f = display->painter->GetFont(); index = Math::max(0, Math::min(index, lastchar + 1)); int w = 0; int i = 0; int cw; while (i < index) { if (text[i] == '\t') { ...
false
false
false
false
false
0
write_double_term(const std::string& token) { char* boundary; const auto value = std::strtod(token.c_str(), &boundary); if (boundary != token.c_str() + token.size()) throw std::runtime_error (join("Invalid floating-point literal: \"", token, "\"")); return Term::write(value); }
false
false
false
false
false
0
acid_dam(int dam, cptr kb_str) { int n; int inv; if (dam <= 0) return; /* Resist the damage */ if (p_ptr->state.immune_acid) n = 3; else if (p_ptr->state.resist_acid) n = 1; else n = 0; if (p_ptr->state.vuln_acid) n--; if (p_ptr->timed[TMD_OPP_ACID]) n++; /* Notice flags */ wieldeds_notice_flag(OF_IM_ACI...
false
false
false
false
false
0
P_Read_String (int argc, Object *argv) { Object port; register FILE *f; register int c, str; port = argc == 1 ? argv[0] : Curr_Input_Port; Check_Input_Port (port); f = PORT(port)->file; str = PORT(port)->flags & P_STRING; Read_Reset (); while (1) { Reader_Getc; if (c...
false
false
false
false
false
0
ssl_sock_load_cert_file(const char *path, struct bind_conf *bind_conf, struct proxy *curproxy, char **sni_filter, int fcount, char **err) { int ret; SSL_CTX *ctx; ctx = SSL_CTX_new(SSLv23_server_method()); if (!ctx) { memprintf(err, "%sunable to allocate SSL context for cert '%s'.\n", err && *err ? *...
false
false
false
false
false
0
key() const { return p_->key_.get() == 0 ? "" : p_->key_->key(); }
false
false
false
false
false
0
onKeyDown(KeyEventArgs& e) { // NB: We are not calling the base class handler here because it propogates // inputs back up the window hierarchy, whereas, as a consumer of key // events, we want such propogation to cease with us regardless of whether // we actually handle the event. // fire event. ...
false
false
false
false
false
0
_log_printf(log_t *log, cbuf_t cb, FILE *stream, const char *fmt, ...) { va_list ap; int fd = fileno(stream); /* If the fd is less than 0 just return sense we can't do anything here. This can happen if a calling program is the one that set up the io. */ if (fd < 0) return; /* If the socket has gone a...
false
false
false
false
false
0
soup_server_get_handler (SoupServer *server, const char *path) { SoupServerPrivate *priv; SoupServerHandler *hand; g_return_val_if_fail (SOUP_IS_SERVER (server), NULL); priv = SOUP_SERVER_GET_PRIVATE (server); if (path) { hand = soup_path_map_lookup (priv->handlers, path); if (hand) return hand; if (!st...
false
false
false
false
false
0
tstchg_(integer *ibmth) { /* Local variables */ static integer ip; /* THIS FUNCTION PERFORMS A TEST TO DETERMINE IF PARAMETERS */ /* SHOULD BE CHANGED FOR SEMI-ITERATION ACCELERATED METHODS. */ /* ... PARAMETER LIST: */ /* IBMTH INDICATOR OF BASIC METHOD BEING ACCELERATED BY SI */ /* ...
false
false
false
false
false
0
restore_search_patterns() { if (--save_level == 0) { vim_free(spats[0].pat); spats[0] = saved_spats[0]; #if defined(FEAT_EVAL) set_vv_searchforward(); #endif vim_free(spats[1].pat); spats[1] = saved_spats[1]; last_idx = saved_last_idx; # ifdef FEAT_SEARCH_EXTRA no_hlsearch = saved_no_hlsearch; # endif ...
false
false
false
false
false
0
gnm_cell_fetch_rendered_value (GnmCell const *cell, gboolean allow_variable_width) { GnmRenderedValue *rv; g_return_val_if_fail (cell != NULL, NULL); rv = gnm_cell_get_rendered_value (cell); if (rv) return rv; return gnm_cell_render_value (cell, allow_variable_width); }
false
false
false
false
false
0
main(int argc, char *argv[]) { struct event recv_ev; char *dev; int c, debug; FILE *fp; dev = NULL; debug = 0; while ((c = getopt(argc, argv, "di:h?")) != -1) { switch (c) { case 'd': debug = 1; break; case 'i': dev = optarg; break; default: usage(); break; } } argc -= optind; a...
false
false
false
false
false
0
FBLD_PACKED_BCD(bxInstruction_c *i) { #if BX_SUPPORT_FPU BX_CPU_THIS_PTR prepareFPU(i); RMAddr(i) = BX_CPU_CALL_METHODR(i->ResolveModrm, (i)); Bit16u hi2 = read_virtual_word (i->seg(), RMAddr(i) + 8); Bit64u lo8 = read_virtual_qword(i->seg(), RMAddr(i)); FPU_update_last_instruction(i); clear_C1(); if ...
false
false
false
false
false
0
ajMartAssociate(AjPSeqin seqin) { AjPMartquery mq = NULL; AjPMartAttribute att = NULL; AjPMartFilter filt = NULL; AjPTable t = NULL; ajuint na = 0; ajuint i = 0; mq = ajMartGetMartqueryPtr(seqin); if(!mq) return ajFalse; att = mq->Atts; filt = mq->...
false
false
false
false
false
0
getBorderDistHint( const QFont &font, int &start, int &end ) const { start = 0; end = 0; if ( !hasComponent( QwtAbstractScaleDraw::Labels ) ) return; const QList<double> &ticks = scaleDiv().ticks( QwtScaleDiv::MajorTick ); if ( ticks.count() == 0 ) ...
false
false
false
false
false
0
process(int focus) { int OnMe, OnSlider; int op; moved = 0; if (disabled_flag) { return; } if (my_wnd->selected_gadget == this) focus = 1; up_button.process(focus); down_button.process(focus); if (start == stop) { position = 0; bar_position = 0; return; } op = position; if (up_button.pressed...
false
false
false
false
false
0
update_cell_stats(CELL ** cell, int ncols, double area) { register int i; register int hash; register struct Node *q, *p = NULL; register int dir = 0; while (ncols-- > 0) { /* copy this cell to an array, compute hash */ hash = values[0] = cell[0][ncols]; for (i = 1; i < nfiles; i++) hash ...
false
false
false
false
false
0
intpoly6(k,u,v) int k; /* polynomial number */ REAL u,v; /* evaluation point */ { switch ( k ) { case 0: return (1 - (u + v))*(2 - (u + v))/2.0; case 1: return u*(2 - (u + v)); case 2: return u*(u - 1)/2.0; case 3: return u*v; case 4: return v*(v - 1)/2.0; case 5: retu...
false
false
false
false
false
0
pkg_get_special_func (fnpkg *pkg, int role) { int i; for (i=0; i<n_ufuns; i++) { if (ufuns[i]->pkg == pkg && ufuns[i]->pkg_role == role) { return g_strdup(ufuns[i]->name); } } return NULL; }
false
false
false
false
false
0
functionCall(const Token *tok, VarInfo *varInfo, const int dealloc) { std::map<unsigned int, int> &alloctype = varInfo->alloctype; std::map<unsigned int, std::string> &possibleUsage = varInfo->possibleUsage; // Ignore function call? const bool ignore = bool(_settings->library.leakignore.find(tok->str()...
false
false
false
false
false
0
main(int argc, const char *argv[]) { track_t i_first_track; track_t i_tracks; CdIo_t *p_cdio = cdio_open ("../test/cdda.cue", DRIVER_BINCUE); if (NULL == p_cdio) { printf("Couldn't open ../test/cdda.cue with BIN/CUE driver.\n"); } else { i_first_track = cdio_get_first_track_num(p_cdio); i_...
false
false
false
false
false
0
main( int /*argc*/, char **argv) { // Initialize ImageMagick install location for Windows InitializeMagick(*argv); int failures=0; try { string srcdir(""); if(getenv("SRCDIR") != 0) srcdir = getenv("SRCDIR"); // // Test morphImages // list<Image> imageList; readImages( &i...
false
false
false
false
true
1
load_diphs(CONFIG *config) { int i,j; if (dico == 0) dico = walloc(FRAME,NFRAMES); if((config->dfd=fopen(config->diphone_file,"rb")) == NULL) { fprintf(stderr,"Can't open file %s\n",config->diphone_file); return -1; } /* zero the first one... */ for(i=0;i<FR_DATA;i++) dico[0].frame[i] = 0; ...
false
false
false
false
false
0
create_new_component_with_va_args() { icalcomponent* calendar; struct icaltimetype atime = icaltime_from_timet( time(0),0); struct icaldatetimeperiodtype rtime; rtime.period.start = icaltime_from_timet( time(0),0); rtime.period.end = icaltime_from_timet( time(0),0); rtime.period.end.hour++...
false
false
false
false
false
0