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
H5D_create_chunk_map_single(H5D_chunk_map_t *fm, const H5D_io_info_t #ifndef H5_HAVE_PARALLEL UNUSED #endif /* H5_HAVE_PARALLEL */ *io_info) { H5D_chunk_info_t *chunk_info; /* Chunk information to insert into skip list */ hsize_t sel_start[H5O_LAYOUT_NDIMS]; /* Offset of low bound of file ...
false
false
false
false
false
0
__bts_event_stop(struct perf_event *event) { /* * No extra synchronization is mandated by the documentation to have * BTS data stores globally visible. */ intel_pmu_disable_bts(); if (event->hw.state & PERF_HES_STOPPED) return; ACCESS_ONCE(event->hw.state) |= PERF_HES_STOPPED; }
false
false
false
false
false
0
pcan_usb_decode_ts(struct pcan_usb_msg_context *mc, u8 first_packet) { /* only 1st packet supplies a word timestamp */ if (first_packet) { __le16 tmp16; if ((mc->ptr + 2) > mc->end) return -EINVAL; memcpy(&tmp16, mc->ptr, 2); mc->ptr += 2; mc->ts16 = le16_to_cpu(tmp16); mc->prev_ts8 = mc->ts16 & 0x0...
false
true
false
false
false
1
brcms_b_clkctl_clk(struct brcms_hardware *wlc_hw, enum bcma_clkmode mode) { if (ai_get_cccaps(wlc_hw->sih) & CC_CAP_PMU) { /* new chips with PMU, CCS_FORCEHT will distribute the HT clock * on backplane, but mac core will still run on ALP(not HT) when * it enters powersave mode, which means the FCA bit may not ...
false
false
false
false
false
0
WriteEquationAsLatex(int true_code, int inline_equation, const char *pre, const char *eq, const char *post) { if (inline_equation) { fprintRTF("$"); putRtfStrEscaped(eq); fprintRTF("$"); } else { char *eq1 = strdup(eq); str_delete(eq1,"\\nonumber"); str_delete(eq1,"\\notag"); fprintRTF("\\\\["); if (t...
false
false
false
false
false
0
Xacc_blend_dstalpha( GenefxState *gfxs ) { int w = gfxs->length; GenefxAccumulator *X = gfxs->Xacc; GenefxAccumulator *D = gfxs->Dacc; while (w--) { if (!(X->RGB.a & 0xF000)) { register u16 Da = D->RGB.a + 1; X->RGB.r = (Da * X->RGB.r) >> 8; ...
false
false
false
false
false
0
Write8bitTables(cmsContext ContextID, cmsIOHANDLER* io, cmsUInt32Number n, _cmsStageToneCurvesData* Tables) { int j; cmsUInt32Number i; cmsUInt8Number val; for (i=0; i < n; i++) { if (Tables) { if (Tables ->TheCurves[i]->nEntries != 256) { cmsSignalError(ContextID,...
false
false
false
false
false
0
add_xldl_vtx(struct itree_t *itp, struct net_t *np, int32 bi, int32 ix_insert) { register int32 ki; int32 osize, nsize; struct xldlvtx_t *xldlvp; if (++__num_xldlvtxs > __siz_xldlvtxtab) { /* first grow table because few new keywords, fibronaci growth */ if (__siz_xldlvtxtab == 0) { nsize = 100*s...
false
false
false
false
false
0
free_EncAPRepPart(EncAPRepPart *data) { free_KerberosTime(&(data)->ctime); free_krb5int32(&(data)->cusec); if((data)->subkey) { free_EncryptionKey((data)->subkey); free((data)->subkey); (data)->subkey = NULL; } if((data)->seq_number) { free_krb5uint32((data)->seq_number); free((data)->seq_number); (data)->seq_number = ...
false
false
false
false
false
0
arrowhead(unit x, unit y, unit xx, unit yy, double angle, colour filled) { uschar fill[12]; double s = sin(angle); double c = cos(angle); unit x1 = (unit)((double)yy*s*0.5); unit y1 = (unit)((double)yy*c*0.5); unit x2 = (unit)((double)xx*c); unit y2 = (unit)((double)xx*s); fprintf(out_file, "<path d=\"M %s %s\n", fix...
false
true
false
false
false
1
lnx_mem() { uint64_t m; if((m = lnx_mem_proc()) == 0) { DBG("proc failed, falling back to rlimit"); if((m = lnx_mem_rlimit()) == 0) { DBG("rlimit failed, falling back to sysinfo"); if((m = lnx_mem_sysinfo()) == 0) { DBG("all memory lookups failed; pretending you have 1Gb of memory."); ...
false
false
false
false
false
0
e_soap_response_new_from_xmldoc (xmlDoc *xmldoc) { ESoapResponse *response; g_return_val_if_fail (xmldoc != NULL, NULL); response = g_object_new (E_TYPE_SOAP_RESPONSE, NULL); if (!e_soap_response_from_xmldoc (response, xmldoc)) { g_object_unref (response); return NULL; } return response; }
false
false
false
false
false
0
ocfs2_rotate_subtree_right(handle_t *handle, struct ocfs2_extent_tree *et, struct ocfs2_path *left_path, struct ocfs2_path *right_path, int subtree_index) { int ret, i; struct buffer_head *right_leaf_bh; struct buffer_head *left_leaf_bh = NULL; struct buffer_head *root_bh; s...
false
false
false
false
false
0
ocfs2_global_disk2memdqb(struct dquot *dquot, void *dp) { struct ocfs2_global_disk_dqblk *d = dp; struct mem_dqblk *m = &dquot->dq_dqb; /* Update from disk only entries not set by the admin */ if (!test_bit(DQ_LASTSET_B + QIF_ILIMITS_B, &dquot->dq_flags)) { m->dqb_ihardlimit = le64_to_cpu(d->dqb_ihardlimit); m...
false
false
false
false
false
0
print_traverse_htable(value_t self) { htable_t *h = (htable_t*)cv_data((cvalue_t*)ptr(self)); size_t i; for(i=0; i < h->size; i+=2) { if (h->table[i+1] != HT_NOTFOUND) { print_traverse((value_t)h->table[i]); print_traverse((value_t)h->table[i+1]); } } }
false
false
false
false
false
0
lame_encode_frame_init(lame_global_flags const *const gfp, const sample_t * inbuf[2]) { lame_internal_flags *const gfc = gfp->internal_flags; int ch, gr; if (gfc->lame_encode_frame_init == 0) { /* prime the MDCT/polyphase filterbank with a short block */ int i, j; sample_t ...
false
false
false
false
true
1
xfs_qm_dquot_logitem_pin( struct xfs_log_item *lip) { struct xfs_dquot *dqp = DQUOT_ITEM(lip)->qli_dquot; ASSERT(XFS_DQ_IS_LOCKED(dqp)); atomic_inc(&dqp->q_pincount); }
false
false
false
false
false
0
_notifyAnimationStateEnabled(AnimationState* target, bool enabled) { OGRE_LOCK_AUTO_MUTEX; // Remove from enabled animation state list first mEnabledAnimationStates.remove(target); // Add to enabled animation state list if need if (enabled) { mEnabledAnim...
false
false
false
false
false
0
ASC_dumpPresentationContext(T_ASC_PresentationContext * p) /* * Write presentation context structure in textual form to stdout. * (debugging aid) */ { int i = 0; OFOStringStream outstream; outstream << " Context ID: " << (int)p->presentationContextID << " "; switch (p->resultReason) { ...
false
false
false
false
false
0
Perl_lex_grow_linestr(pTHX_ STRLEN len) { SV *linestr; char *buf; STRLEN bufend_pos, bufptr_pos, oldbufptr_pos, oldoldbufptr_pos; STRLEN linestart_pos, last_uni_pos, last_lop_pos, re_eval_start_pos; linestr = PL_parser->linestr; buf = SvPVX(linestr); if (len <= SvLEN(linestr)) return buf; ...
false
false
false
false
false
0
get_bunrui_id(U_CHAR *x, int hinsi) { int i; if ( !x ) error(OtherError,"NULL string for bunrui.", EOA); if ( strcmp(x, "*") == 0 ) return 0; if ( !Class[hinsi][1].id ) error(OtherError, (char *)Class[hinsi][0].id, " has no bunrui in ", GRAMMARFILE, ".", EOA); ...
false
false
false
false
false
0
isDataDescriptor() const { if (!m_value && !(writableSet())) return false; return true; }
false
false
false
false
false
0
fprint_get_drivers (void) { GPtrArray *array; unsigned int i; array = g_ptr_array_new (); for (i = 0; i < G_N_ELEMENTS(primitive_drivers); i++) g_ptr_array_add (array, primitive_drivers[i]); for (i = 0; i < G_N_ELEMENTS(img_drivers); i++) g_ptr_array_add (array, &(img_drivers[i]->driver)); /* Add a null it...
false
false
false
false
false
0
of_iio_channel_get(struct device_node *np, int index) { struct iio_channel *channel; int err; if (index < 0) return ERR_PTR(-EINVAL); channel = kzalloc(sizeof(*channel), GFP_KERNEL); if (channel == NULL) return ERR_PTR(-ENOMEM); err = __of_iio_channel_get(channel, np, index); if (err) goto err_free_chan...
false
false
false
false
false
0
atl1e_clean_rx_ring(struct atl1e_adapter *adapter) { struct atl1e_rx_ring *rx_ring = &adapter->rx_ring; struct atl1e_rx_page_desc *rx_page_desc = rx_ring->rx_page_desc; u16 i, j; if (adapter->ring_vir_addr == NULL) return; /* Zero out the descriptor ring */ for (i = 0; i < adapter->num_rx_queues; i++) { f...
false
false
false
false
false
0
note_write(git_oid *out, git_repository *repo, const git_signature *author, const git_signature *committer, const char *notes_ref, const char *note, git_tree *commit_tree, const char *target, git_commit **parents, int allow_note_overwrite) { int error; git_oid oid; git_tree *tree = NULL; // TODO: should w...
false
false
false
false
false
0
qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a) { if (_c == QMetaObject::InvokeMetaMethod) { Q_ASSERT(staticMetaObject.cast(_o)); ViewCurve *_t = static_cast<ViewCurve *>(_o); switch (_id) { case 0: _t->exec_sidemenu((*reinterpret_cast< int(*)>(_a[1]))); bre...
false
false
false
false
false
0
xpr_has_is_param(struct expr_t *ndp) { struct sy_t *syp; struct net_t *np; struct expr_t *fandp; switch ((byte) ndp->optyp) { case NUMBER: case REALNUM: case ISNUMBER: case ISREALNUM: return(FALSE); case ID: syp = ndp->lu.sy; if (!syp->sydecl || syp->sytyp != SYM_N) return(FALSE); np = syp->el.enp; ...
false
false
false
false
false
0
Extend_Table_If_Needed(char **hash_tbl) { int size = Hash_Table_Size(*hash_tbl); if (Hash_Nb_Elements(*hash_tbl) >= size) *hash_tbl = Hash_Realloc_Table(*hash_tbl, size * 2); }
false
false
false
false
false
0
gst_h264_parser_more_data (NalReader * nr) { guint remaining; remaining = nal_reader_get_remaining (nr); if (remaining == 0) return FALSE; if (remaining <= 8) { guint8 rbsp_stop_one_bit; if (!nal_reader_peek_bits_uint8 (nr, &rbsp_stop_one_bit, 1)) return FALSE; if (rbsp_stop_one_bit ==...
false
false
false
false
false
0
set_qr_eq_for_if_block(Block *target, Block *base, Statement *nspt, Loop_info_type type) { Quadruple *qpt1, *qpt2, *nqpt; Operand *opt1, *opt2, *op[3]; qpt1 = get_do_qr(target); qpt2 = get_do_qr(base); switch(type) { case Lit_End: ...
false
false
false
false
false
0
pageprog(struct mtd_info *mtd) { /* * Final step in writing a page. Writes the contents of its * internal buffer out to the flash array, or some such. */ struct nand_chip *nand = mtd->priv; struct docg4_priv *doc = nand->priv; void __iomem *docptr = doc->virtadr; int retval = 0; dev_dbg(doc->dev, "docg4:...
false
false
false
false
false
0
AllAxesOn() { if ( this->RightAxisVisibility && this->TopAxisVisibility && this->LeftAxisVisibility && this->BottomAxisVisibility ) { return; } // If here, we are modified and something gets turned on this->RightAxisVisibility = 1; this->TopAxisVisibility = 1; this->LeftAxisVisibility = 1;...
false
false
false
false
false
0
gt_disc_distri_show(const GtDiscDistri *d, GtFile *outfp) { GtShowValueInfo showvalueinfo; GT_UNUSED int rval; gt_assert(d); if (d->hashdist != NULL) { showvalueinfo.cumulative_probability = 0.0; showvalueinfo.num_of_occurrences = d->num_of_occurrences; showvalueinfo.outfp = outfp; rval = ul_u...
false
false
false
false
false
0
graph_make_order(WordGraph *root, RecogProcess *r) { int count; WordGraph *wg, *right; int i; /* make sure total num and id are valid */ count = 0; for(wg=root;wg;wg=wg->next) count++; if (count == 0) { r->order_matrix = NULL; return; } if (count != r->graph_totalwordnum) { jlog("Error:...
false
false
false
false
false
0
__ecereInstMeth___ecereNameSpace__ecere__gui__Window_OnRedraw__00000023(struct __ecereNameSpace__ecere__com__Instance * this, struct __ecereNameSpace__ecere__com__Instance * surface) { if(__ecereProp___ecereNameSpace__ecere__gui__Window_Get_id(this)) { struct __ecereNameSpace__ecere__sys__Size __simpleStruct0; ((struc...
false
false
false
false
false
0
parseParameters(char* s){ char* tmp; tmp = (char *) malloc (5); int i, last_char, par, var; int len = strlen(s); last_char = var = 0; par = 1; int j = 0; for (i = 0; i < len; i++){ if (s[i] == '#'){ break; } else if (s[i] != ' '){ if (!last_char) last_char = 1; t...
false
false
false
false
false
0
ShowModal() { if (CanDoLayoutAdaptation()) DoLayoutAdaptation(); return wxDialog::ShowModal(); }
false
false
false
false
false
0
curl_share_setopt(CURLSH *sh, CURLSHoption option, ...) { struct Curl_share *share = (struct Curl_share *)sh; va_list param; int type; curl_lock_function lockfunc; curl_unlock_function unlockfunc; void *ptr; if (share->dirty) /* don't allow setting options while one or more handles are already ...
false
false
false
false
false
0
fiji_program_display_gap(struct pp_hwmgr *hwmgr) { struct fiji_hwmgr *data = (struct fiji_hwmgr *)(hwmgr->backend); uint32_t num_active_displays = 0; uint32_t display_gap = cgs_read_ind_register(hwmgr->device, CGS_IND_REG__SMC, ixCG_DISPLAY_GAP_CNTL); uint32_t display_gap2; uint32_t pre_vbi_time_in_us; uint32_...
false
false
false
false
false
0
lzexe_read_uint16(FILE *f, int *value) { int data; if ((*value = fgetc(f)) == EOF) return 0; if ((data = fgetc(f)) == EOF) return 0; *value |= data << 8; return 1; }
false
false
false
false
false
0
uri_parse_hier_part(Uri *uri, char *str, int has_authority) { char *p, *q, *s; s = p = strdup(str); if (has_authority) { /* * Parse the authority component and advance to the following character, * which may be a slash ("/"), question mark ("?"), number * sign ("#"), or the end of the URI (""). */ if ...
false
false
false
false
false
0
mlx4_dispatch_event(struct mlx4_dev *dev, enum mlx4_dev_event type, unsigned long param) { struct mlx4_priv *priv = mlx4_priv(dev); struct mlx4_device_context *dev_ctx; unsigned long flags; spin_lock_irqsave(&priv->ctx_lock, flags); list_for_each_entry(dev_ctx, &priv->ctx_list, list) if (dev_ctx->intf->eve...
false
false
false
false
false
0
PrelinOpt16alloc(cmsContext ContextID, const cmsInterpParams* ColorMap, int nInputs, cmsToneCurve** In, int nOutputs, cmsToneCurve** Out ) { int i; Prelin16Data* p16 = (Prelin16Data*)_cmsMallocZero(ContextID, sizeof(Pre...
false
false
false
false
false
0
dwc2_restore_global_registers(struct dwc2_hsotg *hsotg) { struct dwc2_gregs_backup *gr; int i; dev_dbg(hsotg->dev, "%s\n", __func__); /* Restore global regs */ gr = &hsotg->gr_backup; if (!gr->valid) { dev_err(hsotg->dev, "%s: no global registers to restore\n", __func__); return -EINVAL; } gr->valid =...
false
false
false
false
false
0
Perl_sv_2pvutf8(pTHX_ SV *sv, STRLEN *const lp) { PERL_ARGS_ASSERT_SV_2PVUTF8; if (((SvREADONLY(sv) || SvFAKE(sv)) && !SvIsCOW(sv)) || isGV_with_GP(sv) || SvROK(sv)) sv = sv_mortalcopy(sv); else SvGETMAGIC(sv); sv_utf8_upgrade_nomg(sv); return lp ? SvPV_nomg(sv,*lp) : SvPV_nomg_nolen(...
false
false
false
false
false
0
gnumeric_getpivotdata (GnmFuncEvalInfo *ei, GnmValue const * const *argv) { int col, row; GnmCell *cell; col = find_column_of_field (ei->pos, argv[0], argv[1]); if (col == -1) return value_new_error_REF (ei->pos); row = argv[0]->v_range.cell.b.row; cell = sheet_cell_get (ei->pos->sheet, col, row); /* FIXME...
false
false
false
true
false
1
mayNeedRelaxation(const MCInst &Inst) const { // Branches can always be relaxed. if (getRelaxedOpcodeBranch(Inst.getOpcode()) != Inst.getOpcode()) return true; // Check if this instruction is ever relaxable. if (getRelaxedOpcodeArith(Inst.getOpcode()) == Inst.getOpcode()) return false; // Check if ...
false
false
false
false
false
0
move_local_varlist(DLLIST * destlist, DLLIST * varlist, ULONG mci) { if (MCI_ERROR != mci) { DLNODE *nd = varlist->first; while (NULL != nd) { if((((HSCATTR*)(nd->data))->macro_id) == mci) { move_dlnode(destlist,varlist,nd); } nd = dln_next(nd); } }...
false
false
false
false
false
0
snd_usb_pcm_check_knot(struct snd_pcm_runtime *runtime, struct snd_usb_substream *subs) { struct audioformat *fp; int *rate_list; int count = 0, needs_knot = 0; int err; kfree(subs->rate_list.list); subs->rate_list.list = NULL; list_for_each_entry(fp, &subs->fmt_list, list) { if (fp->rates & SNDRV_PCM_...
false
false
false
false
false
0
e1000e_set_d3_lplu_state(struct e1000_hw *hw, bool active) { struct e1000_phy_info *phy = &hw->phy; s32 ret_val; u16 data; ret_val = e1e_rphy(hw, IGP02E1000_PHY_POWER_MGMT, &data); if (ret_val) return ret_val; if (!active) { data &= ~IGP02E1000_PM_D3_LPLU; ret_val = e1e_wphy(hw, IGP02E1000_PHY_POWER_MGMT,...
false
false
false
false
false
0
butt_down_mapcanvas(GtkWidget *w, GdkEventButton *ev, gpointer data) { struct city *pcity = NULL; struct tile *ptile = NULL; if (editor_is_active()) { return handle_edit_mouse_button_press(ev); } if (!can_client_change_view()) { return TRUE; } gtk_widget_grab_focus(map_canvas); ptile = canvas...
false
false
false
false
false
0
convert_nonlocal_reference_stmt (gimple_stmt_iterator *gsi, bool *handled_ops_p, struct walk_stmt_info *wi) { struct nesting_info *info = (struct nesting_info *) wi->info; tree save_local_var_chain; bitmap save_suppress; gimple stmt = gsi_stmt (*gsi); switch (gimple_code (stmt)) { case GIMPLE_GO...
false
false
false
false
false
0
ConsumeString(string* output, const char* error) { if (LookingAtType(io::Tokenizer::TYPE_STRING)) { io::Tokenizer::ParseString(input_->current().text, output); input_->Next(); // Allow C++ like concatenation of adjacent string tokens. while (LookingAtType(io::Tokenizer::TYPE_STRING)) { io::Token...
false
false
false
false
false
0
open_as_root (NemoView *view, NemoFile *target) { gchar *argv[4]; g_assert (NEMO_IS_VIEW (view)); g_assert (NEMO_IS_FILE (target)); argv[0] = "gksu"; argv[1] = "nemo"; argv[2] = g_file_get_path(nemo_file_get_location (target)); argv[3] = NULL; g_spawn_async(NULL, argv, NULL, G_SPAWN_SEAR...
false
false
false
false
false
0
undo_allowed() { /* Don't allow changes when 'modifiable' is off. */ if (!curbuf->b_p_ma) { EMSG(_(e_modifiable)); return FALSE; } #ifdef HAVE_SANDBOX /* In the sandbox it's not allowed to change the text. */ if (sandbox != 0) { EMSG(_(e_sandbox)); return FALSE; } #endif /* Do...
false
true
false
false
true
1
app_list_xy_empty(app_list_t *apps, gint x, gint y) { app_t *app; g_assert(apps != NULL); if (!apps->apps) return TRUE; app = app_list_at_xy(apps, x, y); if (app) return FALSE; return TRUE; }
false
false
false
false
false
0
set_date(DATE_SERIAL *date, int which, int value) { if (which == LO_YEAR) { if (value >= 0 && value <= 99) { if (value > 30) value += 1900; else value += 2000; } date->year = value; } else if (which == LO_MONTH) date->month = value; else if (which == LO_DAY) date->day = value; }
false
false
false
false
false
0
analyze() { if (Inventory::itemAtKey(_engrave_test_wand_key) == Inventory::NO_ITEM) return; if (!action::Engrave::canEngrave()) return; World::setAction(new action::Engrave(this, ELBERETH "\n", _engrave_test_wand_key, PRIORITY_WAND_ENGRAVE_TEST)); }
false
false
false
false
false
0
photo_data_ref_bytes (PhotoData *photo_data) { GBytes *bytes = NULL; g_mutex_lock (&photo_data->lock); if (photo_data->bytes != NULL) bytes = g_bytes_ref (photo_data->bytes); g_mutex_unlock (&photo_data->lock); return bytes; }
false
false
false
false
false
0
charconv(const char * tocode, const char * fromcode, const char * str, size_t length, char ** result) { #ifdef HAVE_ICONV iconv_t conv; size_t r; char * pout; size_t out_size; size_t old_out_size; size_t count; #endif char * out; int res; if (extended_charconv != NULL) { size_t result_length; res...
false
false
false
false
false
0
Done() { return done && output->Done(); }
false
false
false
false
false
0
ECPGnoticeReceiver(void *arg, const PGresult *result) { char *sqlstate = PQresultErrorField(result, PG_DIAG_SQLSTATE); char *message = PQresultErrorField(result, PG_DIAG_MESSAGE_PRIMARY); struct sqlca_t *sqlca = ECPGget_sqlca(); int sqlcode; (void) arg; /* keep the compiler quiet */ if (sqlstate == NULL)...
false
true
false
false
false
1
igb_loopback_cleanup(struct igb_adapter *adapter) { struct e1000_hw *hw = &adapter->hw; u32 rctl; u16 phy_reg; if ((hw->device_id == E1000_DEV_ID_DH89XXCC_SGMII) || (hw->device_id == E1000_DEV_ID_DH89XXCC_SERDES) || (hw->device_id == E1000_DEV_ID_DH89XXCC_BACKPLANE) || (hw->device_id == E1000_DEV_ID_DH89XXCC_SF...
false
false
false
false
false
0
f_hnrmod(NUMBER *val1, NUMBER *val2, NUMBER *val3, NUMBER *val4) { ZVALUE answer; /* v mod h*2^n+r */ NUMBER *res; /* v mod h*2^n+r */ /* * firewall */ if (qisfrac(val1)) { math_error("1st arg of hnrmod (v) must be an integer"); /*NOTREACHED*/ } if (qisfrac(val2) || qisneg(val2) || qiszero(val2)) { ...
false
false
false
false
false
0
mailbox_repack_setup(struct mailbox *mailbox, struct mailbox_repack **repackptr) { struct mailbox_repack *repack = xzmalloc(sizeof(struct mailbox_repack)); const char *fname; indexbuffer_t ibuf; unsigned char *buf = ibuf.buf; int n; /* init */ repack->mailbox = mailbox; repack->i = ...
false
false
false
false
true
1
closedlines (xfieldP xf, helperFunc helper, int firstConnection, int lastConnection,int face, enum approxE approx, int skip) { static int translation[8]; static float fscratch[3]; static int iscratch; int c; ENTRY(("closedlines(0x%x, 0x%x, %d, %d, %d, %d, %d", xf, helper, firstConnection, lastCo...
false
false
false
false
false
0
mca_pml_ob1_component_close(void) { int rc; if (OMPI_SUCCESS != (rc = mca_base_framework_close(&ompi_bml_base_framework))) { return rc; } opal_output_close(mca_pml_ob1_output); return OMPI_SUCCESS; }
false
false
false
false
false
0
_elm_smart_scroller_wanted_region_set(Evas_Object *obj) { INTERNAL_ENTRY; Evas_Coord ww, wh, wx = sd->wx; if (sd->down.now || sd->down.momentum_animator || sd->down.bounce_x_animator || sd->down.bounce_y_animator || sd->down.hold_animator || sd->down.onhold_animator || sd->scrollto.x.anim...
false
false
false
false
false
0
close_connection(aClient *cptr) { aConfItem *aconf; if (IsServer(cptr)) { ircstp->is_sv++; ircstp->is_sbs += cptr->sendB; ircstp->is_sbr += cptr->receiveB; ircstp->is_sti += timeofday - cptr->firsttime; } else if (IsClient(cptr)) { ircstp->is_cl++; ircstp->is_cbs += cptr->sendB; ircstp->is_cbr += c...
false
false
false
false
false
0
Import (const char* filename) { GraphicComp* comp = nil; const char* creator = ReadCreator(filename); if (creator == nil || strcmp(creator, "idraw") == 0) { Catalog* catalog = unidraw->GetCatalog(); if (catalog->Valid(filename, (Component*&) comp)) { comp = (GraphicComp*) comp-...
false
false
false
false
false
0
dns_label(const char * ip) { static const char hex[] = "0123456789ABCDEF"; char *c, *n = NULL, *m = g_label, *cc = g_label; const char *p, *q; int r, cs = 0; int has_ipv4 = strchr(ip, '.')?1:0; strcpy(g_label, "0000000000000000" "0000000000000000"); if (strchr(ip, ':'))...
false
false
false
false
false
0
db9_detach(struct parport *port) { int i; struct db9 *db9; for (i = 0; i < DB9_MAX_PORTS; i++) { if (db9_base[i] && db9_base[i]->parportno == port->number) break; } if (i == DB9_MAX_PORTS) return; db9 = db9_base[i]; db9_base[i] = NULL; for (i = 0; i < min(db9_modes[db9->mode].n_pads, DB9_MAX_DEVICES)...
false
false
false
false
false
0
CodeWhileEndBody ( UInt nr ) { Stat stat; /* while-statement, result */ Expr cond; /* condition */ Stat stat1; /* single statement of body */ UInt i; ...
false
false
false
false
false
0
gdi_log_flush_func(cl_raw_list_t* list_p) { int ret_val; cl_log_list_elem_t* elem = NULL; DENTER(COMMD_LAYER, "gdi_log_flush_func"); if (list_p == NULL) { DRETURN(CL_RETVAL_LOG_NO_LOGLIST); } if ( ( ret_val = cl_raw_list_lock(list_p)) != CL_RETVAL_OK) { DRETURN(ret_val); } while ...
false
false
false
false
false
0
check_free_hole(u64 start, u64 end, u64 size, unsigned alignment) { if (end - start < size) return 0; if (alignment) { u64 tmp = start; unsigned rem; rem = do_div(tmp, alignment); if (rem) start += alignment - rem; } return end >= start + size; }
false
false
false
false
false
0
conv_rgb8_linear_rgbaF_linear (unsigned char *src, unsigned char *dst, long samples) { float *d = (float *) dst; long n = samples; while (n--) { *d++ = lut_linear[*src++]; *d++ = lut_linear[*src++]; *d++ = lut_linear[...
false
false
false
false
false
0
__nfs3_fdcache_remove_entry (struct nfs3_state *nfs3, struct nfs3_fd_entry *fde) { if ((!fde) || (!nfs3)) return 0; gf_log (GF_NFS3, GF_LOG_TRACE, "Removing fd: 0x%lx: %d", (long int)fde->cachedfd, fde->cachedfd->refcount); list_del (&fde->list); fd_ctx_d...
false
false
false
false
false
0
seek(size_t frame_no) { if (!this->good) return false; if (frame_no >= this->data_length) return false; if (!this->in->seek(this->data_offset + this->frame_size() * frame_no, SEEK_SET)) { ERR("[WavStream::seek] Seek failed\n"); this->good = false; return false; } ...
false
false
false
false
false
0
ves_icall_System_Reflection_Assembly_GetExecutingAssembly (void) { MonoMethod *dest = NULL; mono_stack_walk_no_il (get_executing, &dest); g_assert (dest); return mono_assembly_get_object (mono_domain_get (), dest->klass->image->assembly); }
false
false
false
false
false
0
HIcheckfileversion(int32 file_id) { CONSTR(FUNC, "HIcheckfileversion"); filerec_t *file_rec; uint32 lmajorv, lminorv, lrelease; uint32 fmajorv, fminorv, frelease; char string[LIBVSTR_LEN + 1]; /* len 80+1 */ intn newver = 0; intn ret_value = SUCCEED; HEclear(); file_...
false
false
false
false
false
0
cw1200_spi_irq_unsubscribe(struct hwbus_priv *self) { int ret = 0; pr_debug("SW IRQ unsubscribe\n"); disable_irq_wake(self->func->irq); free_irq(self->func->irq, self); return ret; }
false
false
false
false
false
0
fetch_size(mailmessage * msg_info, size_t * result) { char * msg; int r; r = fetch(msg_info, &msg, result); if (r != MAIL_NO_ERROR) { return r; } fetch_result_free(msg_info, msg); return MAIL_NO_ERROR; }
false
false
false
false
true
1
CreateDefaultFieldInstance( DDFField *poField, int iIndexWithinField ) { int nRawSize, nSuccess; char *pachRawData; pachRawData = poField->GetFieldDefn()->GetDefaultValue( &nRawSize ); if( pachRawData == NULL ) return FALSE; nSuccess = SetFieldR...
false
false
false
false
false
0
SIO_SizeOfSector(UBYTE unit, int sector, int *sz, ULONG *ofs) { int size; ULONG offset; int header_size = (image_type[unit] == IMAGE_TYPE_ATR ? 16 : 0); if (BINLOAD_start_binloading) { if (sz) *sz = 128; if (ofs) *ofs = 0; return; } if (image_type[unit] == IMAGE_TYPE_PRO) { size = 128; offset = ...
false
false
false
false
false
0
example_helloworld() { // create device IrrlichtDevice *device = startup(); if (device == 0) return 1; // could not create selected driver. IVideoDriver* driver = device->getVideoDriver(); ISceneManager* smgr = device->getSceneManager(); IGUIEnvironment* guienv = device->getGUIEnvironment(); IAnim...
false
false
false
false
false
0
cz_initialize_dpm_defaults(struct pp_hwmgr *hwmgr) { struct cz_hwmgr *cz_hwmgr = (struct cz_hwmgr *)(hwmgr->backend); uint32_t i; struct cgs_system_info sys_info = {0}; int result; cz_hwmgr->gfx_ramp_step = 256*25/100; cz_hwmgr->gfx_ramp_delay = 1; /* by default, we delay 1us */ for (i = 0; i < CZ_MAX_HARDWAR...
false
false
false
false
false
0
add_inner( mapInfoProcessT **current, uint32_t process ) { if( NULL != *current ) { return add_inner( &((mapInfoProcessT*)(*current))->next, process ); } else { *current = (mapInfoProcessT*)calloc( 1, sizeof(mapInfoProcessT) ); (*current)->process = process; return *current; } }
false
false
false
false
false
0
on_openfiles_expand_collapse(GtkMenuItem *menuitem, gpointer user_data) { gboolean expand = GPOINTER_TO_INT(user_data); if (expand) gtk_tree_view_expand_all(GTK_TREE_VIEW(tv.tree_openfiles)); else gtk_tree_view_collapse_all(GTK_TREE_VIEW(tv.tree_openfiles)); }
false
false
false
false
false
0
gfs2_rindex_print(struct gfs2_rindex *ri) { pv(ri, ri_addr, "%llu", "0x%llx"); pv(ri, ri_length, "%u", "0x%x"); pv(ri, ri_data0, "%llu", "0x%llx"); pv(ri, ri_data, "%u", "0x%x"); pv(ri, ri_bitbytes, "%u", "0x%x"); }
false
false
false
false
false
0
gf_ismo_locate_box(GF_List *list, u32 boxType, bin128 UUID) { u32 i; GF_Box *box; i=0; while ((box = (GF_Box *)gf_list_enum(list, &i))) { if (box->type == boxType) { GF_UUIDBox* box2 = (GF_UUIDBox* )box; if (boxType != GF_ISOM_BOX_TYPE_UUID) return (GF_ItemListBox *)box; if (!memcmp(box2->uuid, UUID, 16)...
false
false
false
false
false
0
update_selectors(Topform c, BOOL insert) { BOOL matched = FALSE; Plist p; for (p = High.selectors; p; p = p->next) { Giv_select gs = p->v; if (eval_clause_in_rule(c, gs->property)) { matched = TRUE; if (insert) { gs->idx = avl_insert(gs->idx, c, gs->compare); High.occurrences++; } ...
false
false
false
false
false
0
selectedChanged(QItemSelection const & qis, QItemSelection const &) { QModelIndexList il = qis.indexes(); if (il.empty()) return; selectedChanged(il.front(), QModelIndex()); }
false
false
false
false
false
0
qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a) { if (_c == QMetaObject::InvokeMetaMethod) { Q_ASSERT(staticMetaObject.cast(_o)); WizardController *_t = static_cast<WizardController *>(_o); switch (_id) { case 0: _t->wizardStepChanged((*reinterpret_cast< int...
false
false
false
false
false
0
evaluate_local(char *cmdline) { char *word, *local; long port; struct in_addr in4; struct in6_addr in6; word = nsu_strsep(&cmdline, " \t\r\n"); if (word == NULL || *word == 0) { fprintf(stderr, "could not read server name\n"); return (STATUS_SYNTAX); } local = word; word = nsu_strsep(&cmdline, " \t\r\n")...
false
false
false
false
false
0
isdotdir(s) CONST char *s; { if (s[0] != '.') /*EMPTY*/; else if (!s[1]) return(2); else if (s[1] != '.') /*EMPTY*/; else if (!s[2]) return(1); return(0); }
false
false
false
false
false
0
xfs_inobt_init_cursor( struct xfs_mount *mp, /* file system mount point */ struct xfs_trans *tp, /* transaction pointer */ struct xfs_buf *agbp, /* buffer for agi structure */ xfs_agnumber_t agno, /* allocation group number */ xfs_btnum_t btnum) /* ialloc or free ino btree */ { struct xfs_agi *agi = XFS_...
false
false
false
false
false
0
gnc_table_layout_destroy (TableLayout *layout) { GList *node; if (!layout) return; for (node = layout->cells; node; node = node->next) { BasicCell *cell = node->data; gnc_basic_cell_destroy (cell); } g_list_free (layout->cells); layout->cells = NULL; for (node...
false
false
false
false
false
0
symmetric_dot(int n, cmplx *x, cmplx *y) { cmplxl dot = 0; int i; for (i = 0; i < n; ++i) dot += x[i] * y[i]; return dot; }
false
false
false
true
false
1
iGIFBufferedInput(imBinFile* handle, unsigned char *Buf, unsigned char *NextByte) { if (Buf[0] == 0) { /* Needs to read the next buffer - this one is empty: */ imBinFileRead(handle, Buf, 1, 1); imBinFileRead(handle, &Buf[1], Buf[0], 1); if (imBinFileError(handle)) return IM_ERR_ACCESS; ...
false
false
false
false
false
0