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
GMT_iwinkel (double *lon, double *lat, double x, double y) { /* Convert Winkel Tripel x/y to lon/lat */ /* Based on iterative solution published by: * Ipbuker, 2002, Cartography & Geographical Information Science, 20, 1, 37-42. */ GMT_LONG n_iter = 0; double phi0, lambda0, sp, cp, s2p, sl, cl, sl2, cl2, C, D, ...
false
false
false
false
false
0
iwl_enable_rx_ampdu(const struct iwl_cfg *cfg) { if (iwlwifi_mod_params.disable_11n & IWL_DISABLE_HT_RXAGG) return false; return true; }
false
false
false
false
false
0
halbtc_legacy(struct rtl_priv *adapter) { struct rtl_priv *rtlpriv = adapter; struct rtl_mac *mac = rtl_mac(rtlpriv); bool is_legacy = false; if ((mac->mode == WIRELESS_MODE_B) || (mac->mode == WIRELESS_MODE_G)) is_legacy = true; return is_legacy; }
false
false
false
false
false
0
uart1GetDataWithTimout(uint8_t *c) { if (xQueueReceive(uart1queue, c, UART1_DATA_TIMEOUT_TICKS) == pdTRUE) { return true; } *c = 0; return false; }
false
false
false
false
false
0
EDImmediateOperandValue(uint64_t *value, EDOperandRef operand) { if (!((EDOperand*)operand)->isImmediate()) return -1; *value = ((EDOperand*)operand)->immediateVal(); return 0; }
false
false
false
false
false
0
ClampSpline(int idx, int size) { return ( idx<0 ? size+idx : ( idx>=size ? idx-size : idx ) ); }
false
false
false
false
false
0
validWikiPageName(Renderer *p, const char *zTarget){ if( strncmp(zTarget, "wiki:", 5)==0 && wiki_name_is_wellformed((const unsigned char*)zTarget) ){ return zTarget+5; } if( strcmp(zTarget, "Sandbox")==0 ) return zTarget; if( wiki_name_is_wellformed((const unsigned char *)zTarget) && ((p->state & W...
false
false
false
false
false
0
CommandDown(GRPENT *pGE, CONSCLIENT *pCLServing, CONSENT *pCEServing, long tyme) #else CommandDown(pGE, pCLServing, pCEServing, tyme) GRPENT *pGE; CONSCLIENT *pCLServing; CONSENT *pCEServing; long tyme; #endif { CONSCLIENT *pCL; if (!pCLServing->fwr) { FileWrite(pCLServing->fd, FLAGFALSE,...
false
false
false
false
false
0
update() { const uint8_t *src1 = reinterpret_cast<const uint8_t*>(in1); const uint8_t *src2 = reinterpret_cast<const uint8_t*>(in2); uint8_t *dst = reinterpret_cast<uint8_t*>(out); uint32_t sizeCounter = size; uint32_t b, tmp; while (sizeCounter--) { for (b = 0; b...
false
false
false
false
false
0
lib_file_open_search_with_no_combine(gs_file_path_ptr lib_path, const gs_memory_t *mem, i_ctx_t *i_ctx_p, const char *fname, uint flen, char *buffer, int blen, uint *pclen, ref *pfile, gx_io_device *iodev, bool starting_arg_file, char *fmode) { ...
false
false
false
false
false
0
ls_dir(const char *dir, int options) { DIR *dp; struct dirent *d; RC_STRINGLIST *list = NULL; struct stat buf; size_t l; char file[PATH_MAX]; int r; list = rc_stringlist_new(); if ((dp = opendir(dir)) == NULL) return list; while (((d = readdir(dp)) != NULL)) { if (d->d_name[0] != '.') { if (options & ...
false
false
false
false
false
0
RegisterForReverseHB(int handle, unsigned long reserved) { struct spnode *node = get_spnode_from_handle(handle); unsigned char c = 0; int ret; if (node == NULL || !node->opened) return RC_INVALID_HANDLE; ret = read(node->heartbeat_fd, &c, 1); if (ret == 1) return RC_REVERSE_HEARTBEAT_HAS_FAILED; switch(er...
false
false
false
false
false
0
GameStatus(const TanBoard anBoard, const bgvariation bgv) { SSE_ALIGN(float ar[NUM_OUTPUTS]) = { 0, 0, 0, 0, 0}; /* NUM_OUTPUTS are 5 */ if (ClassifyPosition(anBoard, bgv) != CLASS_OVER) return 0; EvalOver(anBoard, ar, bgv, NULL); if (ar[OUTPUT_WINBACKGAMMON] || ar[OUTPUT_LOS...
false
false
false
false
false
0
challenge_check (SoupMessage *msg, gpointer user_data) { NTLMState *state = user_data; const char *header; header = soup_message_headers_get_list (msg->response_headers, "WWW-Authenticate"); if (header && !strncmp (header, "NTLM ", 5)) state->got_ntlm_challenge = TRUE; }
false
false
false
false
false
0
language_init(void) { const char *lib; #if HAVE_SETLOCALE && HAVE_GETTEXT static const char package[] = "aegis"; #endif // // Protect against multiple invokation. // #ifdef DEBUG if (state != state_uninitialized) fatal_raw("language_init() called more than once (bug)"); state = state_...
false
false
false
false
false
0
clear_userlist(struct userrec *bu) { struct userrec *u, *v; int i; for (u = bu; u; u = v) { v = u->next; freeuser(u); } if (userlist == bu) { struct chanset_t *cst; for (i = 0; i < dcc_total; i++) dcc[i].user = NULL; clear_chanlist(); lastuser = NULL; while (global_ign) ...
true
true
false
false
false
1
inside(double x, double y, double z) { int ilist; Region **regions = domain->regions; for (ilist = 0; ilist < nregion; ilist++) if (!regions[list[ilist]]->match(x,y,z)) break; if (ilist == nregion) return 1; return 0; }
false
false
false
false
false
0
display_reset(struct display *display) { RELEASE(display->image); if (display->is_xterm) { if (display->get_initial_cursor_position == NEEDED) { display->get_initial_cursor_position = SOUGHT; outs(display, CTL_CURSORPOS); } outs(display, XTERM_ALTSCREEN); } else outs(display, CTL_RESET); outs(display,...
false
false
false
false
false
0
GPS_D151_Get(GPS_PWay* way, UC* s) { UC* p; int32 i; p=s; (*way)->prot = 151; for (i=0; i<6; ++i) { (*way)->ident[i] = *p++; } (*way)->lat = GPS_Math_Semi_To_Deg(GPS_Util_Get_Int(p)); p+=sizeof(int32); (*way)->lon = GPS_Math_Semi_To_Deg(GPS_Util_Get_Int(p)); p+=sizeof(int32); p+=sizeof(in...
false
false
false
false
false
0
zUsolve(matrix,b,out,diag) ZMAT *matrix; ZVEC *b, *out; double diag; { u_int dim /* , j */; int i, i_lim; complex **mat_ent, *mat_row, *b_ent, *out_ent, *out_col, sum; if ( matrix==ZMNULL || b==ZVNULL ) error(E_NULL,"zUsolve"); dim = min(matrix->m,matrix->n); if ( b->dim < dim ) error(E_S...
false
false
false
true
false
1
xmlrpc_struct_get_key_and_value(xmlrpc_env * const envP, xmlrpc_value * const structP, int const xmIndex, xmlrpc_value ** const keyvalP, xmlrpc_value ** const valueP) { /*-----...
false
false
false
true
false
1
isl_qpolynomial_infty_on_domain( __isl_take isl_space *dim) { if (!dim) return NULL; return isl_qpolynomial_alloc(dim, 0, isl_upoly_infty(dim->ctx)); }
false
false
false
false
false
0
as3722_configure_pullups(struct as3722 *as3722) { int ret; u32 val = 0; if (as3722->en_intern_int_pullup) val |= AS3722_INT_PULL_UP; if (as3722->en_intern_i2c_pullup) val |= AS3722_I2C_PULL_UP; ret = as3722_update_bits(as3722, AS3722_IOVOLTAGE_REG, AS3722_INT_PULL_UP | AS3722_I2C_PULL_UP, val); if (ret <...
false
false
false
false
false
0
render (PyObject *self, PyObject *args) { const guint width, height; const gfloat opacity, saturation; if (!PyArg_ParseTuple (args, "iiff", &width, &height, &opacity, &saturation)) return NULL; render_to_image (GTK_IMAGE (TIMAGE (self)->obj), TIMAGE (self)->pbuf, width, height, opacity,...
false
false
false
false
false
0
brcms_c_bsscfg_malloc(uint unit) { struct brcms_bss_cfg *cfg; cfg = kzalloc(sizeof(struct brcms_bss_cfg), GFP_ATOMIC); if (cfg == NULL) goto fail; cfg->current_bss = kzalloc(sizeof(struct brcms_bss_info), GFP_ATOMIC); if (cfg->current_bss == NULL) goto fail; return cfg; fail: brcms_c_bsscfg_mfree(cfg); ...
false
false
false
false
false
0
spifmem_calloc(const spif_charptr_t filename, unsigned long line, size_t count, size_t size) { void *temp; #if MALLOC_CALL_DEBUG ++calloc_count; if (!(calloc_count % CALLOC_MOD)) { fprintf(LIBAST_DEBUG_FD, "Calls to calloc(): %d\n", calloc_count); } #endif D_MEM(("%lu units of %lu bytes ea...
false
false
false
false
false
0
tile_clear_unsupported_infrastructure(struct tile *ptile) { int i; bool city_present = tile_city(ptile) != NULL; struct terrain *pterr = tile_terrain(ptile); bool ocean = is_ocean(pterr); for (i = 0; infrastructure_specials[i] != S_LAST; i++) { switch (infrastructure_specials[i]) { case S_ROAD: c...
false
false
false
false
false
0
SkipWhiteSpace( const char* p ) { while ( p && *p && ( isspace( *p ) || *p == '\n' || *p == '\r' ) ) p++; return p; }
false
false
false
false
false
0
f2fs_ioc_get_encryption_pwsalt(struct file *filp, unsigned long arg) { struct inode *inode = file_inode(filp); struct f2fs_sb_info *sbi = F2FS_I_SB(inode); int err; if (!f2fs_sb_has_crypto(inode->i_sb)) return -EOPNOTSUPP; if (uuid_is_nonzero(sbi->raw_super->encrypt_pw_salt)) goto got_it; err = mnt_want_wr...
false
false
false
false
false
0
SetAttributeFilter( const char *pszNewQuery ) { if (!bHasFullInitialized) FullInitialize(); if (!poSrcLayer || poDS->GetRecursionDetected()) return OGRERR_FAILURE; if( bAttrFilterPassThrough ) { CPLFree( pszAttrFilter ); if( pszNewQuery == NULL || strlen(pszNewQuery) == 0 ) ...
false
false
false
false
false
0
get(const char* tableKey, const char* subTableKey, const char* itemKey, UnicodeString &result) const { UErrorCode status = U_ZERO_ERROR; int32_t len = 0; const UChar *s = uloc_getTableStringWithFallback(path, locale.getName(), tableKey, subTabl...
false
false
false
false
false
0
snd_hdsp_trigger(struct snd_pcm_substream *substream, int cmd) { struct hdsp *hdsp = snd_pcm_substream_chip(substream); struct snd_pcm_substream *other; int running; if (hdsp_check_for_iobox (hdsp)) return -EIO; if (hdsp_check_for_firmware(hdsp, 0)) /* no auto-loading in trigger */ return -EIO; spin_lock(&...
false
false
false
false
false
0
P_TouchWhirlwind(mobj_t * target) { int randVal; target->angle += (P_Random() - P_Random()) << 20; target->momx += (P_Random() - P_Random()) << 10; target->momy += (P_Random() - P_Random()) << 10; if (leveltime & 16 && !(target->flags2 & MF2_BOSS)) { randVal = P_Random(); if (ra...
false
false
false
false
false
0
msg_match_recv(orte_rml_posted_recv_t *rcv, bool get_all) { opal_list_item_t *item, *next; orte_rml_recv_t *msg; orte_ns_cmp_bitmask_t mask = ORTE_NS_CMP_ALL | ORTE_NS_CMP_WILD; /* scan thru the list of unmatched recvd messages and * see if any matches this spec - if so, push the first * into...
false
false
false
false
false
0
ec_GFp_nistp521_div(const mp_int *a, const mp_int *b, mp_int *r, const GFMethod *meth) { mp_err res = MP_OKAY; mp_int t; /* If a is NULL, then return the inverse of b, otherwise return a/b. */ if (a == NULL) { return mp_invmod(b, &meth->irr, r); } else { /* MPI doesn't support divmod, so we implement it ...
false
false
false
false
false
0
ewmh_WMState(EWMH_CMD_ARGS) { unsigned long maximize = 0; if (ev != NULL) { ewmh_atom *a1,*a2; a1 = ewmh_GetEwmhAtomByAtom( ev->xclient.data.l[1], EWMH_ATOM_LIST_WM_STATE); a2 = ewmh_GetEwmhAtomByAtom( ev->xclient.data.l[2], EWMH_ATOM_LIST_WM_STATE); if (a1 != NULL) { maximize |= a1->action(fw,...
true
true
false
false
false
1
checkInlineListReferences( Definition *prod, InlineBlock *inlineBlock ) { for ( InlineList::Iter ili = *inlineBlock->inlineList; ili.lte(); ili++ ) { if ( ili->type == InlineItem::Reference ) { if ( ili->data[1] != '$' && ili->data[1] != '@' ) { int refPos = atoi( ili->data+1 ) - 1; if ( refPos < 0 || ref...
false
false
false
false
false
0
check_and_close (int in_errno) { bool ok = true; if (in_stream != NULL) { if (ferror (in_stream)) { error (0, in_errno, _("%s: read error"), input_filename); if (! STREQ (file_list[-1], "-")) fclose (in_stream); ok = false; } else if (! STRE...
false
false
false
false
false
0
__channel_forward(struct channel *chn, unsigned long long bytes) { unsigned int new_forward; unsigned int forwarded; forwarded = chn->buf->i; b_adv(chn->buf, chn->buf->i); /* Note: the case below is the only case where we may return * a byte count that does not fit into a 32-bit number. */ if (likely(chn->t...
false
false
false
false
false
0
faxGetBitrate( struct sProfile *psProfile ) { int anRates[ 4 ] = { 2400, 4800, 9600, 14400 }; int nBitrate = faxGetBitrateIndex( psProfile ); if ( nBitrate < 0 || nBitrate > 3 ) { return 14400; } return anRates[ nBitrate ]; }
false
false
false
false
false
0
b43legacy_default_baseband_attenuation(struct b43legacy_wldev *dev) { struct b43legacy_phy *phy = &dev->phy; if (phy->radio_ver == 0x2050 && phy->radio_rev < 6) return 0; return 2; }
false
false
false
false
false
0
symbol (int sym, double symwidth, double symheight) { if (sym <= 0) return; if (sym == SB_CROSS) { m_pSGP->markerRel (0, 0); // m_pSGP->moveRel (-0.5 * symwidth, -0.5 * symheight); // m_pSGP->lineRel (symwidth, symheight); // m_pSGP->moveRel (-symwidth, 0.0); // m_pSGP->lineRel (symwidth, -symh...
false
false
false
false
false
0
fdevent_event_add(fdevents *ev, int *fde_ndx, int fd, int events) { int fde = fde_ndx ? *fde_ndx : -1; if (ev->event_add) fde = ev->event_add(ev, fde, fd, events); if (fde_ndx) *fde_ndx = fde; return 0; }
false
false
false
false
false
0
dvcman_receive_channel_data(IWTSVirtualChannelManager* pChannelMgr, uint32 ChannelId, uint8* data, uint32 data_size) { DVCMAN_CHANNEL* channel; int error = 0; channel = dvcman_find_channel_by_id(pChannelMgr, ChannelId); if (channel == NULL) { DEBUG_WARN("ChannelId %d not found!", ChannelId); return 1; } if...
false
false
false
false
false
0
_swsetup_Translate( struct gl_context *ctx, const void *vertex, SWvertex *dest ) { const GLfloat *m = ctx->ViewportArray[0]._WindowMap.m; GLfloat tmp[4]; GLuint i; _tnl_get_attr( ctx, vertex, _TNL_ATTRIB_POS, tmp ); dest->attrib[VARYING_SLOT_POS][0] = m[0] * tmp[0] + m[12]; dest->attrib[VARYING_SLO...
false
false
false
false
false
0
elf_max_addr(const struct mem_ehdr *ehdr) { unsigned long max_addr = 0; if (ehdr->ei_class == ELFCLASS32) { max_addr = ELF32_MAX; } else if (ehdr->ei_class == ELFCLASS64) { max_addr = ELF64_MAX; } return max_addr; }
false
false
false
false
false
0
gmtsub(const struct timeval *timep, const long offset, struct ast_tm *tmp) { struct ast_tm * result; struct state *sp; AST_LIST_LOCK(&zonelist); AST_LIST_TRAVERSE(&zonelist, sp, list) { if (!strcmp(sp->name, "UTC")) break; } if (!sp) { if (!(sp = (struct state *) ast_calloc(1, sizeof *sp))) return NUL...
false
false
false
false
false
0
tp_base_media_call_stream_add_candidates (TpSvcCallStreamInterfaceMedia *iface, const GPtrArray *candidates, DBusGMethodInvocation *context) { TpBaseMediaCallStream *self = TP_BASE_MEDIA_CALL_STREAM (iface); TpBaseMediaCallStreamClass *klass = TP_BASE_MEDIA_CALL_STREAM_GET_CLASS (self); GPtrArray *a...
false
false
false
false
false
0
json_read_tree(json_pull *p) { json_object *j; while ((j = json_read(p)) != NULL) { if (j->parent == NULL) { return j; } } return NULL; }
false
false
false
false
false
0
__core_scsi3_write_aptpl_to_file( struct se_device *dev, unsigned char *buf) { struct t10_wwn *wwn = &dev->t10_wwn; struct file *file; int flags = O_RDWR | O_CREAT | O_TRUNC; char path[512]; u32 pr_aptpl_buf_len; int ret; memset(path, 0, 512); if (strlen(&wwn->unit_serial[0]) >= 512) { pr_err("WWN value f...
false
false
false
false
false
0
cu_relax(void *mark) { struct culist *ptr; for (ptr=cuhead.next;ptr!=NULL && ptr!=mark;ptr=ptr->next) { if (ptr->flags&CU_CANRELAX) ptr->flags|=CU_RELAXED; } }
false
false
false
false
false
0
a68g_mkstemp (char *fn, int flags, mode_t permissions) { /* "tmpnam" is not safe, "mkstemp" is Unix, so a68g brings its own tmpnam */ #define TMP_SIZE 32 #define TRIALS 32 char tfilename[BUFFER_SIZE]; char *letters = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; int i, k, len = (int) strlen (...
false
false
false
false
false
0
set_polar() { c_token++; if (polar) return; else polar = TRUE; if (!parametric) { if (interactive) (void) fprintf(stderr,"\n\tdummy variable is t for curves\n"); strcpy (set_dummy_var[0], "t"); } if (axis_array[T_AXIS].set_autoscale) { /* only if user has not set a range manually */ ...
false
false
false
false
false
0
_g_launch_command (GtkWidget *parent, const char *command, const char *name, GList *files) { GError *error = NULL; GAppInfo *app_info; GdkAppLaunchContext *launch_context; app_info = g_app_info_create_from_commandline (command, name, G_APP_INFO_CREATE_SUPPORTS_URIS, &er...
false
false
false
false
false
0
notify_listener_list(GConfListeners* listeners, GList* list, const gchar* key, GConfListenersCallback callback, gpointer user_data) { GList* tmp; tmp = list; while (tmp != NULL) { Listener* l = tmp->data; /* don'...
false
false
false
false
false
0
OpenIndex(const string& indexFilename) { // attempt create new index of type based on filename BamIndex* index = BamIndexFactory::CreateIndexFromFilename(indexFilename); if ( index == 0 ) { cerr << "BamRandomAccessController ERROR: could not create index for file: " << indexFilename << endl; ...
false
false
false
false
false
0
validate_type_utf8 (const struct Opt *opt, const char * value, const guint32 len) { guint32 check_len; g_return_val_if_fail (opt != NULL, FALSE); g_return_val_if_fail (value != NULL, FALSE); check_len = opt->int_high ? opt->int_high : 255; /* Note that we deliberately don'...
false
false
false
false
false
0
Itcl_DestructObject(interp, contextObj, flags) Tcl_Interp *interp; /* interpreter mananging new object */ ItclObject *contextObj; /* object to be destructed */ int flags; /* flags: ITCL_IGNORE_ERRS */ { int result; /* * If there is a "destructed" table, then this object is...
false
false
false
false
false
0
blk_add_trace_bio(struct request_queue *q, struct bio *bio, u32 what, int error) { struct blk_trace *bt = q->blk_trace; if (likely(!bt)) return; __blk_add_trace(bt, bio->bi_iter.bi_sector, bio->bi_iter.bi_size, bio->bi_rw, what, error, 0, NULL); }
false
false
false
false
false
0
get_resource(const std::string &res_id, bool resolve_alias, int level) { CL_Resource &res = impl->get_resource(res_id); if (resolve_alias && res.get_type() == "alias" && level < 20) return get_resource(res.get_element().get_attribute("link"), true, level+1); else return res; }
false
false
false
false
false
0
GameEventUnspawn(int16 event_id) { int32 internal_event_id = mGameEvent.size() + event_id - 1; if (internal_event_id < 0 || (size_t)internal_event_id >= mGameEventCreatureGuids.size()) { sLog.outError("GameEventMgr::GameEventUnspawn attempt access to out of range mGameEventCreatureGuids element %i ...
false
false
false
false
false
0
cleanup_default_namespace(rados_ioctx_t ioctx) { // remove all objects from the default namespace to avoid polluting // other tests rados_ioctx_set_namespace(ioctx, ""); rados_list_ctx_t list_ctx; ASSERT_EQ(0, rados_objects_list_open(ioctx, &list_ctx)); int r; const char *entry = NULL; const char *key =...
false
false
false
false
false
0
read_handler(Element *e, void *user_data) { EtherVlanEncap *eve = static_cast<EtherVlanEncap *>(e); switch (reinterpret_cast<uintptr_t>(user_data)) { case h_vlan: if (eve->_use_anno) return String::make_stable("ANNO", 4); else return String(ntohs(eve->_ethh.ether_vlan_tci) & 0x0FFF); case h_...
false
false
false
false
false
0
gw_notebook_catalog_ctree_button_press_event ( GtkWidget *w, GdkEventButton *event) { GtkCList *clist; GtkCTreeNode *node; gint row, col; GdkEventButton *bev = event; GtkCTree *ctree = NULL; GtkWindow *window = NULL; #ifdef GW_DEBUG_GUI_CALLBACK_COMPONENT g_print ( "*** GW - %s (%d) :: %s()\n", __FILE__, __LIN...
false
false
false
false
false
0
trace_fsetattr (call_frame_t *frame, xlator_t *this, fd_t *fd, struct iatt *stbuf, int32_t valid, dict_t *xdata) { uint64_t ia_time = 0; char actime_str[256] = {0,}; char modtime_str[256] = {0,}; trace_conf_t *conf = NULL; ...
true
true
false
false
false
1
zuiFind(zsetopsrc *op, zsetopval *val, double *score) { if (op->subject == NULL) return 0; if (op->type == REDIS_SET) { if (op->encoding == REDIS_ENCODING_INTSET) { if (zuiLongLongFromValue(val) && intsetFind(op->subject->ptr,val->ell)) { ...
false
false
false
false
false
0
readVerts(Clip *clip, vertex_list *pv, Geom *g, int isnd) { int i; vertex *point = (vertex *)malloc(pv->numvtx * sizeof(vertex)); ColorA *colors; int colored = clip->polyhedron.has & HAS_VC; memset(point, 0, pv->numvtx * sizeof(vertex)); pv->head = point; #define pl ((PolyList *)g) #def...
false
true
false
false
false
1
valleyview_pipestat_irq_ack(struct drm_device *dev, u32 iir, u32 pipe_stats[I915_MAX_PIPES]) { struct drm_i915_private *dev_priv = dev->dev_private; int pipe; spin_lock(&dev_priv->irq_lock); if (!dev_priv->display_irqs_enabled) { spin_unlock(&dev_priv->irq_lock); return; } for_each_pipe(dev_priv, pipe...
false
false
false
false
false
0
computeSplitEdges(vector<Edge*> *edgelist) { #if GEOS_DEBUG cerr<<"["<<this<<"] GeometryGraph::computeSplitEdges() scanning "<<edges->size()<<" local and "<<edgelist->size()<<" provided edges"<<endl; #endif for (vector<Edge*>::iterator i=edges->begin(), endIt=edges->end(); i!=endIt; ++i) { Edge *e=*i; #if GEOS_D...
false
false
false
false
false
0
_dxfHowManyTics(int islogx, int islogy, float lsx, float lsy, float scalex, float scaley, int n, int *nx, int *ny) { float ax, ay, sum; /* I've put in the scalings for log because of the difference in * treatment of log and lin axes */ if (islogx) ax = ABS(scalex/lsx); else ...
false
false
false
false
false
0
Ns_WaitForProcess(int pid, int *exitcodePtr) { #ifdef _WIN32 HANDLE process = (HANDLE) pid; int status = NS_OK; int exitcode; if ((WaitForSingleObject(process, INFINITE) == WAIT_FAILED) || (GetExitCodeProcess(process, &exitcode) != TRUE)) { Ns_Log(Error, "exec: failed to get process exi...
false
false
false
false
false
0
xfpregs_set(struct task_struct *target, const struct user_regset *regset, unsigned int pos, unsigned int count, const void *kbuf, const void __user *ubuf) { struct fpu *fpu = &target->thread.fpu; int ret; if (!cpu_has_fxsr) return -ENODEV; fpu__activate_fpstate_write(fpu); fpstate_sanitize_xstate(fpu); r...
false
false
false
false
false
0
nc_get_vara_long(int ncid, int varid, const size_t *start, const size_t *edges, long *value) { NC* ncp; int stat = NC_check_id(ncid, &ncp); if(stat != NC_NOERR) return stat; return NC_get_vara(ncid,varid,start,edges,(void*)value,T_long); }
false
false
false
false
false
0
initFont(int font) { if ( font >= 0 && font < Num_fonts) { font_num = font; } }
false
false
false
false
false
0
string_natural_compare_function_ex(zval *result, zval *op1, zval *op2, zend_bool case_insensitive TSRMLS_DC) /* {{{ */ { zval op1_copy, op2_copy; int use_copy1 = 0, use_copy2 = 0; if (Z_TYPE_P(op1) != IS_STRING) { zend_make_printable_zval(op1, &op1_copy, &use_copy1); } if (Z_TYPE_P(op2) != IS_STRING) { zend_m...
false
false
false
false
false
0
step(const RouterT *r, int eindex) { int n = (r ? r->nelements() : -1); while (eindex < n && (_e = r->element(eindex), _e->type() != _t)) eindex++; if (eindex >= n) _e = 0; }
false
false
false
true
false
1
polyRects(int ng, boxf* gs, pack_info * pinfo) { int stepSize; ginfo *info; ginfo **sinfo; point *places; Dict_t *ps; int i; point center; /* calculate grid size */ stepSize = computeStep(ng, gs, pinfo->margin); if (Verbose) fprintf(stderr, "step size = %d\n", stepSize); if...
false
false
false
false
false
0
set_ipv6_method(const char *method) { gboolean privacy_enabled = FALSE; if (g_strcmp0(method, "auto") == 0) { toggle_button("ipv6_auto"); enable_ipv6_config(FALSE); privacy_enabled = TRUE; } else if (g_strcmp0(method, "manual") == 0) { toggle_button("ipv6_manual"); enable_ipv6_config(TRUE); } else { t...
false
false
false
false
false
0
statusCmd(void) { lreply(211, "%s HylaFAX server status:", (const char*) hostname); printf(" %s\r\n", version); printf(" Connected to %s", (const char*) remotehost); if (!isdigit(remotehost[0])) printf(" (%s)", (const char*) remoteaddr); printf("\r\n"); if (IS(LOGGEDIN)) { printf(" Lo...
false
false
false
false
false
0
inf_text_gtk_view_user_cursor_blink_timeout_func(gpointer user_data) { InfTextGtkViewUser* view_user; InfTextGtkViewPrivate* priv; GtkSettings* settings; gboolean cursor_blink; gint cursor_blink_time; view_user = (InfTextGtkViewUser*)user_data; priv = INF_TEXT_GTK_VIEW_PRIVATE(view_user->view); view_u...
false
false
false
false
false
0
sk_new(SockAddr addr, int port, int privport, int oobinline, int nodelay, int keepalive, Plug plug) { Actual_Socket ret; int err; /* * Create Socket structure. */ ret = snew(struct Socket_tag); ret->fn = &tcp_fn_table; ret->error = NULL; ret->plug = plug; bufchain_init(...
false
false
false
false
false
0
si476x_codec_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt) { struct si476x_core *core = i2c_mfd_cell_to_core(codec_dai->dev); int err; u16 format = 0; if ((fmt & SND_SOC_DAIFMT_MASTER_MASK) != SND_SOC_DAIFMT_CBS_CFS) return -EINVAL; switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) { case SND_S...
false
false
false
false
false
0
verbose(const int level, const char*fmt,...) const { char buf[MAXPDSTRING]; va_list ap; va_start(ap, fmt); vsnprintf(buf, MAXPDSTRING-1, fmt, ap); va_end(ap); /* only pd>=0.39(?) supports ::verbose() */ #if defined PD_MINOR_VERSION && (PD_MAJOR_VERSION > 1 || PD_MINOR_VERSION > 38) if(NULL!=m_objectname &...
false
false
false
false
false
0
cuddInitInteract( DdManager * table) { int i,j; unsigned long words; long *interact; char *support; DdNode *f; DdNode *sentinel = &(table->sentinel); DdNodePtr *nodelist; int slots; unsigned long n = (unsigned long) table->size; words = ((n * (n-1)) >> (1 + LOGBPL)) + 1; t...
false
false
false
false
false
0
MouseUp( const SDL_MouseButtonEvent &button ) { if ( Clicked() && (button.button == SDL_BUTTON_LEFT) ) { Release(); if ( Contains( button.x - surface->LeftEdge(), button.y - surface->TopEdge() ) ) return Activate(); } return GUI_OK; }
false
false
false
false
false
0
_dxfPostObject(Object obj, int dir, Array comp) { Class class; class = DXGetObjectClass(obj); if (class == CLASS_GROUP) class = DXGetGroupClass((Group)obj); switch(class) { case CLASS_FIELD: if (! _dxfPostField((Field)obj, dir, comp)) goto error; break; case CLASS_GROUP: cas...
false
false
false
false
false
0
makeNewAST(){ struct astNode* ast = (struct astNode*)gcMalloc(sizeof(struct astNode)); if(ast == NULL){ Log("New ast not allocated", ERROR, AST); global.errno = intern; return NULL; } ast->data.str = NULL; ast->data.integer = 0; ast->data.real = 0; ast->data.boolean = False; ast->left = NULL; ast->righ...
false
false
false
false
false
0
Oct6100ApiClearInterrupts( IN tPOCT6100_INSTANCE_API f_pApiInstance ) { tPOCT6100_SHARED_INFO pSharedInfo; tOCT6100_WRITE_PARAMS WriteParams; UINT32 ulResult; /* Get local pointer to shared portion of instance. */ pSharedInfo = f_pApiInstance->pSharedInfo; /* Set the process context and user chip ID parame...
false
false
false
false
false
0
is_already_appended_dtp(List *head, Dtp *dst_dt, Module_table *mpt) { List *l; for (l = head; l != NULL; l = l->next) { Dtp *data = l->data; switch (data->dt_info->kind) { case DTU_SEND: if (data->src_mt == dst_dt->src...
false
false
false
false
false
0
lpuart_remove(struct platform_device *pdev) { struct lpuart_port *sport = platform_get_drvdata(pdev); uart_remove_one_port(&lpuart_reg, &sport->port); clk_disable_unprepare(sport->clk); if (sport->dma_tx_chan) dma_release_channel(sport->dma_tx_chan); if (sport->dma_rx_chan) dma_release_channel(sport->dma_r...
false
false
false
false
false
0
xcgroup_lock(xcgroup_t* cg) { int fstatus = XCGROUP_ERROR; if ((cg->fd = open(cg->path, O_RDONLY)) < 0) { debug2("xcgroup_lock: error from open of cgroup '%s' : %m", cg->path); return fstatus; } if (flock(cg->fd, LOCK_EX) < 0) { debug2("xcgroup_lock: error locking cgroup '%s' : %m", cg->p...
false
false
false
false
false
0
ar9287_eeprom_get_tx_gain_index(struct ath_hw *ah, struct ath9k_channel *chan, struct cal_data_op_loop_ar9287 *pRawDatasetOpLoop, u8 *pCalChans, u16 availPiers, int8_t *pPwr) { u16 idxL = 0, idxR = 0, numPiers; bool match; struct chan_centers centers; ath9k_hw_get_channel_centers(ah, chan, &c...
false
false
false
false
false
0
isBetween(VertInf *i, VertInf *j) { if ( ((i == _v1) && (j == _v2)) || ((i == _v2) && (j == _v1)) ) { return true; } return false; }
false
false
false
false
false
0
luaD_gcIM (TObject *o) { TObject *im = luaT_getimbyObj(o, IM_GC); if (ttype(im) != LUA_T_NIL) { *L->stack.top = *o; incr_top; luaD_callTM(im, 1, 0); } }
false
false
false
false
false
0
eio_mtouch (void *addr, size_t length, int flags, int pri, eio_cb cb, void *data) { REQ (EIO_MTOUCH); req->ptr2 = addr; req->size = length; req->int1 = flags; SEND; }
false
false
false
false
false
0
myfunc_argument_name_init(UDF_INIT *initid, UDF_ARGS *args, char *message) { if (args->arg_count != 1) { strmov(message,"myfunc_argument_name_init accepts only one argument"); return 1; } initid->max_length= args->attribute_lengths[0]; initid->maybe_null= 1; initid->const_item= 1; return 0; ...
false
true
false
false
false
1
sysTimeout(int fd, long timeout) { #ifndef USE_SELECT struct pollfd pfd; #ifdef __linux__ jlong end_time = sysTimeMillis() + (jlong) timeout; volatile jlong to = (jlong) timeout; #endif pfd.fd = fd; pfd.events = POLLIN; #ifdef __linux__ INTERRUPT_IO(__extension__ ({ int __result; ...
false
false
false
false
false
0
group(int32_t groupNum, UErrorCode &status) const { int32_t s = start(groupNum, status); int32_t e = end(groupNum, status); // Note: calling start() and end() above will do all necessary checking that // the group number is OK and that a match exists. status will be set. if (U_FAILURE(st...
false
false
false
false
false
0
pop3_apop(struct mailbox *mp, char *xuser, const char *pass, const char *ts) { char *user, *catp, *xp; unsigned char digest[16]; MD5_CTX ctx; retry: if (xuser == NULL) { if ((user = getuser()) == NULL) return STOP; } else user = xuser; if (pass == NULL) { if ((pass = getpassword(&otio, &reset_tio, NULL))...
false
false
false
false
false
0
margin_preview_page_create (PrinterSetupState *state) { double x1, y1, x2, y2; double width, height; MarginPreviewInfo *pi = &state->preview; GOStyle *style; MarginPreviewPageAvailableSize margin_available_size; margin_preview_page_available_size (state, &margin_available_size); gtk_widget_set_size_request (sta...
false
false
false
false
false
0