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
return_replies_thread(void *arg) { Octstr *body; struct request_data *p; int status; Octstr *final_url; List *headers; while (run_status == running) { p = http_receive_result(caller, &status, &final_url, &headers, &body); if (p == NULL) break; return_reply(...
false
false
false
false
false
0
pcnet32_nway_reset(struct net_device *dev) { struct pcnet32_private *lp = netdev_priv(dev); unsigned long flags; int r = -EOPNOTSUPP; if (lp->mii) { spin_lock_irqsave(&lp->lock, flags); r = mii_nway_restart(&lp->mii_if); spin_unlock_irqrestore(&lp->lock, flags); } return r; }
false
false
false
false
false
0
forward(double mult) { if(active) { if(expl) { explosiontime+=mult; if(explosiontime>(timeToGo-0.001)) explosiontime=timeToGo-0.01; setFrame((int)explosiontime); } } else { activateTime-=(double)mult; if(activateTime<0.0) { ...
false
false
false
false
false
0
AVCBinWriteArc(AVCBinFile *psFile, AVCArc *psArc) { if (psFile->eFileType != AVCFileARC) return -1; return _AVCBinWriteArc(psFile->psRawBinFile, psArc, psFile->nPrecision, psFile->psIndexFile); }
false
false
false
false
false
0
gf_sk_accept(GF_Socket *sock, GF_Socket **newConnection) { u32 client_address_size; SOCKET sk; #ifndef __SYMBIAN32__ s32 ready; struct timeval timeout; fd_set Group; #endif *newConnection = NULL; if (!sock || !(sock->flags & GF_SOCK_IS_LISTENING) ) return GF_BAD_PARAM; #ifndef __SYMBIAN32__ //can we read? FD_...
false
false
false
false
false
0
build_x_compound_expr_from_vec (vec<tree, va_gc> *vec, const char *msg, tsubst_flags_t complain) { if (vec_safe_is_empty (vec)) return NULL_TREE; else if (vec->length () == 1) return (*vec)[0]; else { tree expr; unsigned int ix; tree t; if (msg != NULL) { if (complain ...
false
false
false
false
false
0
scsi_alloc_sdev(struct scsi_target *starget, u64 lun, void *hostdata) { struct scsi_device *sdev; int display_failure_msg = 1, ret; struct Scsi_Host *shost = dev_to_shost(starget->dev.parent); extern void scsi_evt_thread(struct work_struct *work); extern void scsi_requeue_run_queue(struct work_struct *work...
false
false
false
false
false
0
RequestData( vtkInformation *vtkNotUsed(request), vtkInformationVector **inputVector, vtkInformationVector *outputVector) { vtkInformation* inInfo = inputVector[0]->GetInformationObject(0); vtkHierarchicalBoxDataSet *input = vtkHierarchicalBoxDataSet::SafeDownCast( inInfo->Get(vtkDataObject::DATA_OBJECT()...
false
false
false
false
false
0
mct_decode_real( float* restrict c0, float* restrict c1, float* restrict c2, int n) { int i; #ifdef __SSE__ __m128 vrv, vgu, vgv, vbu; vrv = _mm_set1_ps(1.402f); vgu = _mm_set1_ps(0.34413f); vgv = _mm_set1_ps(0.71414f); vbu = _mm_set1_ps(1.772f); for (i = 0; i < (n >> 3); ++i) { __m128 vy, vu, vv; __...
false
false
false
false
false
0
_PyLong_FromBytes(const char *s, Py_ssize_t len, int base) { PyObject *result, *strobj; char *end = NULL; result = PyLong_FromString((char*)s, &end, base); if (end == NULL || (result != NULL && end == s + len)) return result; Py_XDECREF(result); strobj = PyBytes_FromStringAndSize(s, Py_...
false
false
false
false
false
0
igb_link_test(struct igb_adapter *adapter, u64 *data) { struct e1000_hw *hw = &adapter->hw; *data = 0; if (hw->phy.media_type == e1000_media_type_internal_serdes) { int i = 0; hw->mac.serdes_has_link = false; /* On some blade server designs, link establishment * could take as long as 2-3 minutes */ d...
false
false
false
false
false
0
unit_betray(int unitRecno, int betrayToNationRecno) { Unit* unitPtr = unit_array[unitRecno]; err_when( unitPtr->nation_recno != nation_array.player_recno && betrayToNationRecno != nation_array.player_recno ); News* newsPtr = add_news( NEWS_UNIT_BETRAY, NEWS_NORMAL, unitPtr->nation_recno, betrayToNationRecno )...
false
false
false
false
false
0
tls_get_addr_tail (GET_ADDR_ARGS, dtv_t *dtv, struct link_map *the_map) { /* The allocation was deferred. Do it now. */ if (the_map == NULL) { /* Find the link map for this module. */ size_t idx = GET_ADDR_MODULE; struct dtv_slotinfo_list *listp = GL(dl_tls_dtv_slotinfo_list); while ...
false
false
false
false
false
0
tree_view_restore_widths(GtkTreeView *treeview, property_t prop) { gint i; g_return_if_fail(treeview); for (i = 0; i < INT_MAX; i++) { GtkTreeViewColumn *c; guint32 width; c = gtk_tree_view_get_column(treeview, i); if (!c) break; gui_prop_get_guint32(prop, &width, i, 1); g_object_set(G_OBJECT(c), ...
false
false
false
false
false
0
_gtk_window_resize_to_fit_screen_height (GtkWidget *window, int default_width) { GdkScreen *screen; screen = gtk_widget_get_screen (window); if ((screen != NULL) && (gdk_screen_get_height (screen) < 768)) /* maximize on netbooks */ gtk_window_maximize (GTK_WINDOW (window)); else /* This should f...
false
false
false
false
false
0
cx231xx_write_i2c_data(struct cx231xx *dev, u8 dev_addr, u16 saddr, u8 saddr_len, u32 data, u8 data_len) { int status = 0; u8 value[4] = { 0, 0, 0, 0 }; struct cx231xx_i2c_xfer_data req_data; value[0] = (u8) data; value[1] = (u8) (data >> 8); value[2] = (u8) (data >> 16); value[3] = (u8) (data >> 24); i...
false
false
false
false
false
0
isPipe(FILE *p) { int i; for (i = 0; i < numPipes && Pipe[i] != p; i++); if (i == numPipes) return FALSE; Pipe[i] = Pipe[--numPipes]; return TRUE; }
false
false
false
false
true
1
enic_unset_port_profile(struct enic *enic, int vf) { int err; ENIC_DEVCMD_PROXY_BY_INDEX(vf, err, enic, vnic_dev_deinit); if (err) return enic_dev_status_to_errno(err); if (vf == PORT_SELF_VF) enic_reset_addr_lists(enic); return 0; }
false
false
false
false
false
0
ecolor(ECOLOR color) { FILE *f = stdout; /* Try and guess a valid tty */ if (!isatty(fileno(f))) { f = stderr; if (!isatty(fileno(f))) { f = stdin; if (!isatty(fileno(f))) f = NULL; } } return _ecolor(f, color); }
false
false
false
false
false
0
adjust_panel_help(int y, int x, bool help) { bool changed = FALSE; int j; int screen_hgt_main = help ? (Term->hgt - ROW_MAP - 3) : (Term->hgt - ROW_MAP - 1); /* Scan windows */ for (j = 0; j < ANGBAND_TERM_MAX; j++) { int wx, wy; int screen_hgt, screen_wid; term *t = angband_term[j]; /* No windo...
false
false
false
false
false
0
sortDecrIndex() { // Should replace with std sort double * elements = new double [nElements_]; CoinZeroN (elements,nElements_); CoinSort_2(indices_, indices_ + nElements_, elements, CoinFirstGreater_2<int, double>()); delete [] elements; }
false
false
false
false
false
0
ms_biff_put_len_next (BiffPut *bp, guint16 opcode, guint32 len) { g_return_val_if_fail (bp, NULL); g_return_val_if_fail (bp->output, NULL); g_return_val_if_fail (bp->data == NULL, NULL); g_return_val_if_fail (bp->len_fixed == -1, NULL); if (bp->version >= MS_BIFF_V8) XL_CHECK_CONDITION_VAL (len < MAX_BIFF8_RECO...
false
false
false
false
false
0
e_map_do_tween_cb (gpointer data) { EMap *map = data; GSList *walk; map->priv->timer_current_ms = g_timer_elapsed (map->priv->timer, NULL) * 1000; gtk_widget_queue_draw (GTK_WIDGET (map)); /* Can't use for loop here, because we need to advance * the list before deleting. */ walk = map->priv->tweens; whi...
false
false
false
false
false
0
FindNode_TxtorPos( s ) char *s; { long x, y; tptr t; if( sscanf( &s[3], "%ld,%ld", &x, &y ) != 2 ) return( NULL ); if( (t = FindTxtorPos( x, y )) == NULL ) return( NULL ); switch( s[2] ) { case 'g': return( t->gate ); case 'd': return( t->drain ); case 's': return( t->source ); ...
false
false
false
false
false
0
RemoveFromWorld() { ///- Remove the gameobject from the accessor if (IsInWorld()) { // Notify the outdoor pvp script if (OutdoorPvP* outdoorPvP = sOutdoorPvPMgr.GetScript(GetZoneId())) outdoorPvP->HandleGameObjectRemove(this); // Remove GO from owner if (ObjectGu...
false
false
false
false
false
0
ST_drawNumFontY(int x, int y, int num) { if(!num) V_DrawPatch(x, y, invfonty[0]); while(num) { V_DrawPatch(x, y, invfonty[num % 10]); x -= SHORT(invfonty[0]->width) + 1; num /= 10; } }
false
false
false
false
false
0
nonce_nonceg_create() { private_nonce_nonceg_t *this; INIT(this, .public = { .nonce_gen = { .get_nonce = _get_nonce, .allocate_nonce = _allocate_nonce, .destroy = _destroy, }, }, ); this->rng = lib->crypto->create_rng(lib->crypto, RNG_WEAK); if (!this->rng) { DBG1(DBG_LIB, "no RNG found ...
false
false
false
false
false
0
ReportRegExpErrorHelper(CompilerState *state, uintN flags, uintN errorNumber, const jschar *arg) { if (state->tokenStream) { return js_ReportCompileErrorNumber(state->context, state->tokenStream, NULL, JSREPORT_UC | flags, ...
false
false
false
false
false
0
info_exists_command( Th_Interp *interp, void *ctx, int argc, const char **argv, int *argl ){ int rc; if( argc!=3 ){ return Th_WrongNumArgs(interp, "info exists var"); } rc = Th_ExistsVar(interp, argv[2], argl[2]); Th_SetResultInt(interp, rc); return TH_OK; }
false
false
false
false
false
0
snmpTargetAddr_addTagList(struct targetAddrTable_struct *entry, char *cptr) { if (cptr == NULL) { DEBUGMSGTL(("snmpTargetAddrEntry", "ERROR snmpTargetAddrEntry: no tag list in config string\n")); return (0); } else { size_t len = strlen(cptr); /* * sp...
false
false
false
false
false
0
AddCompositionOffset(GF_CompositionOffsetBox *ctts, u32 offset) { if (!ctts) return GF_BAD_PARAM; if (ctts->nb_entries && (ctts->entries[ctts->nb_entries-1].decodingOffset==offset)) { ctts->entries[ctts->nb_entries-1].sampleCount++; } else { if (ctts->alloc_size==ctts->nb_entries) { ALLOC_INC(ctts->alloc_siz...
false
false
false
true
false
1
getCurrentDateTime(OFString &dicomDateTime, const OFBool seconds, const OFBool fraction, const OFBool timeZone) { OFCondition l_error = EC_IllegalCall; OFDateTime dateTimeValue; ...
false
false
false
false
false
0
cpl_table_copy_structure(cpl_table *table, const cpl_table *mtable) { const char *unit = NULL; const char *form = NULL; cpl_column **column; cpl_type type; cpl_size width = cpl_table_get_ncol(mtable); cpl_size i = 0; if (table == 0...
false
false
false
false
false
0
alps_command_mode_read_reg(struct psmouse *psmouse, int addr) { if (alps_command_mode_set_addr(psmouse, addr)) return -1; return __alps_command_mode_read_reg(psmouse, addr); }
false
false
false
false
false
0
skipspace(scheme *sc) { int c; while (isspace(c=inchar(sc))) ; if(c!=EOF) { backchar(sc,c); } }
false
false
false
false
false
0
amitk_objects_unref(GList * objects) { AmitkObject * object; if (objects == NULL) return NULL; objects->next = amitk_objects_unref(objects->next); /* recurse */ g_return_val_if_fail(AMITK_IS_OBJECT(objects->data), NULL); object = objects->data; objects = g_list_remove(objects, object); /* should return...
false
false
false
false
false
0
_pick_idle_node_cnt(bitstr_t *avail_bitmap, resv_desc_msg_t *resv_desc_ptr, uint32_t node_cnt, bitstr_t **core_bitmap) { ListIterator job_iterator; struct job_record *job_ptr; bitstr_t *save_bitmap, *ret_bitmap, *tmp_bitmap; if (bit_set_count(avail_bitmap) < node_cnt) { verbose("reservation req...
false
false
false
false
false
0
new_performance_monitor(struct gl_context *ctx, GLuint index) { unsigned i; struct gl_perf_monitor_object *m = ctx->Driver.NewPerfMonitor(ctx); if (m == NULL) return NULL; m->Name = index; m->Active = false; m->ActiveGroups = rzalloc_array(NULL, unsigned, ctx->PerfMonitor.NumGroups); ...
false
false
false
false
false
0
brcmf_fweh_event_worker(struct work_struct *work) { struct brcmf_pub *drvr; struct brcmf_if *ifp; struct brcmf_fweh_info *fweh; struct brcmf_fweh_queue_item *event; int err = 0; struct brcmf_event_msg_be *emsg_be; struct brcmf_event_msg emsg; fweh = container_of(work, struct brcmf_fweh_info, event_work); drvr...
false
false
false
false
false
0
dump_data_dependence_relation (FILE *outf, struct data_dependence_relation *ddr) { struct data_reference *dra, *drb; fprintf (outf, "(Data Dep: \n"); if (!ddr || DDR_ARE_DEPENDENT (ddr) == chrec_dont_know) { if (ddr) { dra = DDR_A (ddr); drb = DDR_B (ddr); if (dra) dump_data_r...
false
false
false
false
false
0
process_events(void){ Arc::Time now; event_lock.lock(); for (std::list<DTR_ptr>::iterator event = events.begin(); event != events.end();) { DTR_ptr tmp = *event; event_lock.unlock(); if (tmp->get_process_time() <= now) { map_state_and_process(tmp); // If final state,...
false
false
false
false
false
0
brasero_file_node_move_to (BraseroFileNode *node, BraseroFileNode *parent, GCompareFunc sort_func) { BraseroFileTreeStats *stats; guint depth = 0; /* NOTE: for the time being no backend supports moving imported files */ if (node->is_imported) return; /* reinsert it now at the new location */ paren...
false
false
false
false
false
0
cloog_loop_components_tarjan(struct cloog_loop_sort *s, CloogLoop **loop_array, int i, int level, int scalar, int *scaldims, int nb_scattdims, int (*follows)(CloogLoop *loop1, CloogLoop *loop2, int level, int scalar, int *scaldims, int nb_scattdims, int def)) { int j; s->node[i].index = s->index; s...
false
false
false
false
false
0
GetProcParamExpressions( void *theEnv) { register int i; if ((ProceduralPrimitiveData(theEnv)->ProcParamArray == NULL) || (ProceduralPrimitiveData(theEnv)->ProcParamExpressions != NULL)) return(ProceduralPrimitiveData(theEnv)->ProcParamExpressions); ProceduralPrimitiveData(theEnv)->ProcParamExpressio...
false
false
false
false
false
0
gamgi_chem_atom_color (gamgi_atom_class *atom_class) { float *red = atom_class->red; float *green = atom_class->green; float *blue = atom_class->blue; int element, offset; /******************************************* * set default color for Dummy atoms (Z=0) * * * * set de...
false
false
false
false
false
0
read(byte* buf, long rcount) { long avail = p_->size_ - p_->idx_; long allow = EXV_MIN(rcount, avail); std::memcpy(buf, &p_->data_[p_->idx_], allow); p_->idx_ += allow; if (rcount > avail) p_->eof_ = true; return allow; }
false
false
false
false
false
0
set_define_list_for_heap(Block *loop, Statement *spt, Define_table *define_heap_list, Define_table *modified_heap_list) { Def_use_table *def_heap; Define_table *temp; Boolean find_heap = FALSE; for(def_heap = spt->def_heap_list; def_heap != NULL; def_heap = def_heap->next){ if (def_hea...
false
false
false
false
false
0
AboutConfig( Gtk::Window* parent ) : SKELETON::PrefDiag( parent, "", true ) { CONFIG::bkup_conf(); pack_widgets(); }
false
false
false
false
false
0
lmc_led_off(lmc_softc_t * const sc, u32 led) /*fold00*/ { lmc_trace(sc->lmc_device, "lmc_led_off in"); if(sc->lmc_miireg16 & led){ /* Already set don't do anything */ lmc_trace(sc->lmc_device, "lmc_led_off aoff out"); return; } sc->lmc_miireg16 |= led; lmc_mii_writereg(sc, 0, 16...
false
false
false
false
false
0
itemDeclaration(const CfgEntry *e, const CfgConfig &cfg) { if (cfg.itemAccessors) return QString(); QString fCap = e->name(); fCap[0] = fCap[0].toUpper(); return " "+cfg.inherits+"::Item"+itemType( e->type() ) + " *item" + fCap + ( (!e->param().isEmpty())?(QString("[%1]").arg(e->paramM...
false
false
false
false
false
0
flat_texgen (double x, double y, double z, int jcnt, int which_end) { if (FRONT == which_end) { T2F_D (x, accum_seg_len); } if (BACK == which_end) { T2F_D (x, accum_seg_len + segment_length); } }
false
false
false
false
false
0
krb5_is_enctype_weak(krb5_context context, krb5_enctype enctype) { struct _krb5_encryption_type *et = _krb5_find_enctype(enctype); if(et == NULL || (et->flags & F_WEAK)) return TRUE; return FALSE; }
false
false
false
false
false
0
insertChild(MSWidget *widget_) { MSLayoutEntry *entry=getEntry(widget_); if (entry==0&&widget_!=0) { entry=new MSLayoutEntry(widget_); entry->at().constraints(widget_->resizeConstraints()); MSNodeItem *np=new MSNodeItem((void *)entry); np->insert(childListHead()); // fifo _childCount...
false
false
false
false
false
0
clk_recalc_rate(struct ccu_data *ccu, struct bcm_clk_div *div, struct bcm_clk_div *pre_div, unsigned long parent_rate) { u64 scaled_parent_rate; u64 scaled_div; u64 result; if (!divider_exists(div)) return parent_rate; if (parent_rate > (unsigned long)LONG_MAX) return 0; /* actually this would be a cal...
false
false
false
false
false
0
calib_area_finish (CalibArea *area, XYinfo *new_axis, gboolean *swap_xy) { g_return_val_if_fail (area != NULL, FALSE); *new_axis = area->axis; *swap_xy = area->swap; if (area->success) g_debug ("Final calibration: %d, %d, %d, %d\n", new_axis->x_min, new_axis->y_min, new_axis->x_max, ...
false
false
false
false
false
0
on_proposal_changed (GtkSourceCompletionProposal *proposal, GList *proposal_node) { ProposalInfo *proposal_info = proposal_node->data; ProviderInfo *provider_info = proposal_info->provider_node->data; if (provider_info->visible) { GtkTreeIter iter; GtkTreePath *path; iter.user_d...
false
false
false
false
false
0
maxima(MaximaStream & os) const { os << "diff("; for (idx_type idx = 0; idx < nargs(); ++idx) { if (idx != 0) os << ','; os << cell(idx); if (idx != 0) os << ",1"; } os << ')'; }
false
false
false
false
false
0
cd_sensor_client_remove (CdSensorClient *sensor_client, GUdevDevice *device) { CdSensor *sensor; const gchar *device_file; const gchar *device_path; const gchar *tmp; guint i; /* interesting device? */ tmp = g_udev_device_get_property (device, "COLORD_SENSOR_KIND"); if (tmp == NULL) goto out; /* actual...
false
false
false
false
false
0
icon_list_modify_with_splash(icon_list_t *icons, char *dirname, char *newdirname) { g_assert(icons != NULL); splash_show(icons->iconsel->apwal->splash); icon_list_modify(icons, dirname, newdirname); splash_hide(icons->iconsel->apwal->splash); }
false
false
false
false
false
0
resetError() { m_error = NO_ERROR; m_error_string = std::string(""); }
false
false
false
false
false
0
ves_icall_System_Environment_InternalSetEnvironmentVariable (MonoString *name, MonoString *value) { #ifdef HOST_WIN32 gunichar2 *utf16_name, *utf16_value; #else gchar *utf8_name, *utf8_value; MonoError error; #endif #ifdef HOST_WIN32 utf16_name = mono_string_to_utf16 (name); if ((value == NULL) || (mono_string_le...
false
false
false
false
false
0
pagecache_get_page(struct address_space *mapping, pgoff_t offset, int fgp_flags, gfp_t gfp_mask) { struct page *page; repeat: page = find_get_entry(mapping, offset); if (radix_tree_exceptional_entry(page)) page = NULL; if (!page) goto no_page; if (fgp_flags & FGP_LOCK) { if (fgp_flags & FGP_NOWAIT) { i...
false
false
false
false
false
0
initialize_width_data (a_paragraph *p, const a_width *line_widths) { unsigned int nwidths = 0; p->max_widths = line_widths; /* compute the muber of line widths given */ for (; *line_widths; ++line_widths) ++nwidths; p->nmax_widths = nwidths; /* allocate the break buffers */ XMALLOC_ARRAY (p->break_d...
false
false
false
false
false
0
mpfr_rand_raw (mpfr_limb_ptr mp, gmp_randstate_t rstate, mpfr_prec_t nbits) { mpz_t z; MPFR_ASSERTN (nbits >= 1); /* To be sure to avoid the potential allocation of mpz_urandomb */ ALLOC(z) = SIZ(z) = MPFR_PREC2LIMBS (nbits); PTR(z) = mp; #if __MPFR_GMP(5,0,0) /* Check for integer overflow...
false
false
false
false
false
0
parse(const UnicodeString& text, ParsePosition& pos) const { UDate d = 0; // Error return UDate is 0 (the epoch) if (fCalendar != NULL) { int32_t start = pos.getIndex(); // Parse may update TimeZone used by the calendar. TimeZone *tzsav = (TimeZone*)fCalendar->getTimeZ...
false
false
false
false
false
0
ckh_evict_reloc_insert(ckh_t *ckh, size_t argbucket, void const **argkey, void const **argdata) { const void *key, *data, *tkey, *tdata; ckhc_t *cell; size_t hash1, hash2, bucket, tbucket; unsigned i; bucket = argbucket; key = *argkey; data = *argdata; while (true) { /* * Choose a random item within t...
false
false
false
false
false
0
get_new_message_count(MAILSTREAM *stream, int imapstatus, long *new, long *unseen) { if(new) *new = 0L; if(unseen) *unseen = 0L; if(imapstatus){ if(new) *new = count_flagged(stream, F_RECENT | F_UNSEEN | F_UNDEL); if(!IS_NEWS(stream)){ if(unseen) *unseen = count_flagg...
false
false
false
false
false
0
interp_T(const double * restrict geop, const double * restrict gt, double *pt, const double * restrict fullp, const double * restrict halfp, const int *nx, const double * restrict plev, long nplev, long ngp, long nhlev, double missval) { long lp, i; long nl, nh; const int *nxl; double *ptl; doub...
false
false
false
false
false
0
xmlXPathGetElementsByIds (xmlDocPtr doc, const xmlChar *ids) { xmlNodeSetPtr ret; const xmlChar *cur = ids; xmlChar *ID; xmlAttrPtr attr; xmlNodePtr elem = NULL; if (ids == NULL) return(NULL); ret = xmlXPathNodeSetCreate(NULL); while (IS_BLANK_CH(*cur)) cur++; while (*cur != 0) { ...
false
false
false
false
false
0
resume_proxies(void) { int err; struct proxy *p; struct peers *prs; err = 0; p = proxy; tv_update_date(0,1); /* else, the old time before select will be used */ while (p) { err |= !resume_proxy(p); p = p->next; } prs = peers; while (prs) { p = prs->peers_fe; err |= !resume_proxy(p); prs = prs->nex...
false
false
false
false
false
0
_plug_iovec_to_buf(const sasl_utils_t *utils, const struct iovec *vec, unsigned numiov, buffer_info_t **output) { unsigned i; int ret; buffer_info_t *out; char *pos; if(!utils || !vec || !output) { if(utils) PARAMERROR( utils ); return SASL_BADPARAM; } if(!(*output)) { *ou...
false
true
false
false
false
1
maybe_add_info_score (struct COMPARE *cmp, const MODEL *pmodA, const MODEL *pmodB) { if (pmodA != NULL && pmodB != NULL) { int i; cmp->score = 0; for (i=0; i<C_MAX; i++) { if (na(pmodB->criterion[i]) || na(pmodA->criterion[i])) { cmp->score = -1; break; } else if (pmodB->criterion[i] ...
false
false
false
false
false
0
output_name_type( fields *info, FILE *outptr, int level, char *map[], int nmap, char *tag ) { newstr ntag; int i, j, n=0, code; newstr_init( &ntag ); for ( j=0; j<nmap; ++j ) { for ( i=0; i<info->nfields; ++i ) { code = extract_name_and_info( &ntag, &(info->tag[i]) ); if ( strcasecmp( ntag.data, map[j] ...
false
false
false
false
false
0
get_to_local(VMG0_) const { /* if there's no mapper, throw an exception */ if (get_ext_ptr()->to_local == 0) { /* throw an UnknownCharacterSetException */ G_interpreter->throw_new_class(vmg_ G_predef->charset_unknown_exc, 0, "unknown character se...
false
false
false
false
false
0
string_from_fortran(char *c, long int *pn) { char *p, *t; string *out; int n = *pn; if(n < 0) { n = strlen(c); } p = (char *) malloc(sizeof(char) * (n + 1)); p[0] = '\0'; p = strncpy(p, c, n); p[n] = '\0'; t = strchr_reverse_isnot(p, n, ' '); t[1] = '\0'; out = string_new(p); free(p); ...
false
true
false
false
false
1
Luse_package() { # line 1036 "package.d" object l; int narg; register object *DPPbase=vs_base; #define pack DPPbase[0] #define pa DPPbase[1+0] narg = vs_top - vs_base; if (narg < 1) too_few_arguments(); if (narg <= 1 + 0) { vs_push(current_package()); narg++; } if (narg > 1 + 1) too_many_arguments(); ...
false
false
false
false
false
0
attempt_atomic_deletion() { ndeletion_attempts += 1.0; if (ngas == 0) return; int i = pick_random_gas_atom(); int success = 0; if (i >= 0) { double deletion_energy = energy(i,ngcmc_type,-1,atom->x[i]); if (random_unequal->uniform() < ngas*exp(beta*deletion_energy)/(zz*volume)) { atom->avec-...
false
false
false
false
false
0
lodepng_inspect(unsigned* w, unsigned* h, LodePNGState* state, const unsigned char* in, size_t insize) { LodePNGInfo* info = &state->info_png; if(insize == 0 || in == 0) { CERROR_RETURN_ERROR(state->error, 48); /*error: the given data is empty*/ } if(insize < 33) { CERROR_RE...
false
false
false
false
false
0
_PHY_SetBWMode23a92C(struct rtw_adapter *Adapter) { struct hal_data_8723a *pHalData = GET_HAL_DATA(Adapter); u8 regBwOpMode; u8 regRRSR_RSC; if (Adapter->bDriverStopped) return; /* 3 */ /* 3<1>Set MAC register */ /* 3 */ regBwOpMode = rtl8723au_read8(Adapter, REG_BWOPMODE); regRRSR_RSC = rtl8723au_read8(A...
false
false
false
false
false
0
my_fgets(char *s, char *w, int max, FILE *file, int wide) { int i = 0; char prev = 1; char c = 1; while (c != '\n' && !feof(file) && max) { c = (char)fgetc(file); /* printf("char = %c\n",c); */ if (!c && (!prev && !wide) ) break; /* Stop on 1 (or 2 if wide) null */ prev = c; if (c != '...
false
false
false
false
false
0
prepare_uprobe(struct uprobe *uprobe, struct file *file, struct mm_struct *mm, unsigned long vaddr) { int ret = 0; if (test_bit(UPROBE_COPY_INSN, &uprobe->flags)) return ret; /* TODO: move this into _register, until then we abuse this sem. */ down_write(&uprobe->consumer_rwsem); if (test_bit(UPROBE_COPY_IN...
false
false
false
false
false
0
templates_load (AutoFormatState *state) { GSList *l; gint n_templates; g_return_val_if_fail (state != NULL, FALSE); if (state->category_groups == NULL) return FALSE; state->templates = category_group_get_templates_list ( state->current_category_group, GO_CMD_CONTEXT (state->wbcg)); for (l = state->template...
false
false
false
false
false
0
evas_common_font_query_char_at_coords(RGBA_Font *fn, const Evas_Text_Props *text_props, int x, int y, int *cx, int *cy, int *cw, int *ch) { int asc, desc; int ret_val = -1; EVAS_FONT_WALK_TEXT_INIT(); asc = evas_common_font_max_ascent_get(fn); desc = evas_common_font_max_descent_get(fn); Evas_Coord c...
false
false
false
false
false
0
rtl_hw_start_8169(struct net_device *dev) { struct rtl8169_private *tp = netdev_priv(dev); void *ioaddr = tp->mmio_addr; struct pci_device *pdev = tp->pci_dev; DBGP ( "rtl_hw_start_8169\n" ); if (tp->mac_version == RTL_GIGA_MAC_VER_05) { RTL_W16(CPlusCmd, RTL_R16(CPlusCmd) | PCIMulRW); pci_write_config_byte(...
false
false
false
false
false
0
saa7164_dl_wait_ack(struct saa7164_dev *dev, u32 reg) { u32 timeout = SAA_DEVICE_TIMEOUT; while ((saa7164_readl(reg) & 0x01) == 0) { timeout -= 10; if (timeout == 0) { printk(KERN_ERR "%s() timeout (no d/l ack)\n", __func__); return -EBUSY; } msleep(100); } return 0; }
false
false
false
false
false
0
build_row_from_vars(PLpgSQL_variable **vars, int numvars) { PLpgSQL_row *row; int i; row = palloc0(sizeof(PLpgSQL_row)); row->dtype = PLPGSQL_DTYPE_ROW; row->rowtupdesc = CreateTemplateTupleDesc(numvars, false); row->nfields = numvars; row->fieldnames = palloc(numvars * sizeof(char *)); row->varnos = palloc(...
false
false
false
false
false
0
searchInBM(char *x, int m, char *y, int n, int * addr) { int i, j, bmGs[m], bmBc[CACHESIZE]; /* Preprocessing */ preBmGs(x, m, bmGs); preBmBc(x, m, bmBc); /* Searching */ j = 0; while (j <= n - m) { for (i = m - 1; i >= 0 && x[i] == y[i + j]; --i); if (i < 0) { // binary representation of ...
false
false
false
false
false
0
list(int op, int n, char *names[]) { struct gfarm_user_info *users; gfarm_error_t e, *errs; GFARM_MALLOC_ARRAY(users, n); GFARM_MALLOC_ARRAY(errs, n); if (users == NULL || errs == NULL) { e = GFARM_ERR_NO_MEMORY; goto free_users; } e = gfm_client_user_info_get_by_names( gfm_server, n, (const char **)name...
false
false
false
false
false
0
PrintSelf(ostream& os, vtkIndent indent) { int idx; this->Superclass::PrintSelf(os,indent); // this->File, this->Colors need not be printed os << indent << "FileName: " << (this->FileName ? this->FileName : "(none)") << "\n"; os << indent << "FileNames: " << this->FileNames << "\n"; os << indent <...
false
false
false
false
false
0
toXml(QDomDocument& doc) const { QDomElement item = doc.createElement("item"); if (type_ == JidType) item.setAttribute("type","jid"); else if (type_ == GroupType) item.setAttribute("type","group"); else if (type_ == SubscriptionType) item.setAttribute("type","subscription"); if (type_ != FallthroughType...
false
false
false
false
false
0
HMARK_ip4_print(const void *ip, const struct xt_entry_target *target, int numeric) { const struct xt_hmark_info *info = (const struct xt_hmark_info *)target->data; printf(" HMARK "); if (info->flags & XT_HMARK_FLAG(XT_HMARK_MODULUS)) printf("mod %u ", info->hmodulus); if (info->flags & XT_HMARK_FLAG(XT_...
false
false
false
false
false
0
runadd(runcxdef *ctx, runsdef *val, runsdef *val2, uint below) { if (val->runstyp == DAT_LIST) { int len1 = osrp2(val->runsv.runsvstr); int len2 = runsiz(val2); int newlen; /* if concatenating a list, take out length + datatype from 2nd */ if (val2->...
false
false
false
false
false
0
parse_int(apr_pool_t *p, const char *arg, int *val) { char *endptr; *val = strtol(arg, &endptr, 10); if (arg == endptr) { return apr_psprintf(p, "Value '%s' not numerical", endptr); } if (*endptr != '\0') { return apr_psprintf(p, "Cannot parse '%s'", endptr); } if (*val < 0)...
false
false
false
false
false
0
mnearto( struct monst *mtmp, xchar x, xchar y, bool move_other) /* make sure mtmp gets to x, y! so move m_at(x, y) */ { struct monst *othermon = (struct monst *)0; xchar newx, newy; coord mm; if ((mtmp->mx == x) && (mtmp->my == y)) return false; if (move_other && (othermon = m_at(x...
false
false
false
false
false
0
brcmf_update_ht_cap(struct ieee80211_supported_band *band, u32 bw_cap[2], u32 nchain) { band->ht_cap.ht_supported = true; if (bw_cap[band->band] & WLC_BW_40MHZ_BIT) { band->ht_cap.cap |= IEEE80211_HT_CAP_SGI_40; band->ht_cap.cap |= IEEE80211_HT_CAP_SUP_WIDTH_20_40; } band->ht_cap.cap |= IEEE80211_HT_CAP_SGI...
false
false
false
false
false
0
aic3x_i2c_remove(struct i2c_client *client) { struct aic3x_priv *aic3x = i2c_get_clientdata(client); snd_soc_unregister_codec(&client->dev); if (gpio_is_valid(aic3x->gpio_reset) && !aic3x_is_shared_reset(aic3x)) { gpio_set_value(aic3x->gpio_reset, 0); gpio_free(aic3x->gpio_reset); } return 0; }
false
false
false
false
false
0
profileAlignMenu(void) { while (true) { lin1 = ""; cout<<"\n\n\n"; cout<<"****** PROFILE AND STRUCTURE ALIGNMENT MENU ******\n\n\n"; cout<<" 1. Input 1st. profile "; if (!userParameters->getProfile1Empty()) { cout<<"(loaded)"; ...
false
false
false
false
false
0
editor(int flag) { const char *pgm = git_editor(); if (!pgm && flag & IDENT_ERROR_ON_NO_NAME) die("Terminal is dumb, but EDITOR unset"); return pgm; }
false
false
false
false
false
0
rb_reg_regcomp(VALUE str) { volatile VALUE save_str = str; if (reg_cache && RREGEXP_SRC_LEN(reg_cache) == RSTRING_LEN(str) && ENCODING_GET(reg_cache) == ENCODING_GET(str) && memcmp(RREGEXP_SRC_PTR(reg_cache), RSTRING_PTR(str), RSTRING_LEN(str)) == 0) return reg_cache; return reg_cache = rb_reg_new_str(s...
false
false
false
false
false
0
sizeCallback(void *data, t_floatarg m_CellSize) { int size=static_cast<int>(m_CellSize); if(size<1){ GetMyClass(data)->error("size must not be < 0"); size=1; } if(size>nMaxCellSize){ GetMyClass(data)->error("size must not be > %d", nMaxCellSize); size=nMaxCellSize; } GetMyClass(data)->m_Cell...
false
false
false
false
false
0