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
populateAddrMgr(SPtr<TClntCfgIface> iface) { // create IAs in AddrMgr corresponding to those specified in CfgMgr. SPtr<TClntCfgIA> ia; iface->firstIA(); while(ia = iface->getIA()) { if (ClntAddrMgr().getIA(ia->getIAID())) continue; // there is such IA already - read from disk cache (...
false
false
false
false
false
0
gopengzip (char *name, char *mode) #else static GIO gopengzip(name, mode) char *name; char *mode; #endif { GIO gio; char *s; /* allocate a new struct */ if( (gio = gnew()) == NULL ) return(NULL); /* skip past prefix */ s = name; if( !strncasecmp(s, "gzip:", 5) ) s += 5; while( isspace((i...
false
false
false
false
false
0
remove(StoreInst *SI) { const DataLayout &DL = SI->getModule()->getDataLayout(); uint64_t Size = DL.getTypeStoreSize(SI->getOperand(0)->getType()); AAMDNodes AAInfo; SI->getAAMetadata(AAInfo); AliasSet *AS = findAliasSetForPointer(SI->getOperand(1), Size, AAInfo); if (!AS) return false; remove(*AS); r...
false
false
false
false
false
0
leftRightLimits(node *pToSubNode, double *pLeftLimit, double *pRightLimit) /* As usual, pToSubNode->back is the angle leftLimit is the max angle you can rotate on the left and rightLimit vice versa. *pLeftLimit and *pRightLimit must be initialized to 0; without initialization, it would in...
false
false
false
false
false
0
preorder_visit (SExpr& sexpr) { log_visit (sexpr); for_contents (list<SExpr>, sexpr.child, c) preorder_visit (*c); }
false
false
false
false
false
0
lwpb_transport_socket_server_close(lwpb_transport_t transport) { struct lwpb_transport_socket_server *socket_server = (struct lwpb_transport_socket_server *) transport; int i; if (socket_server->socket == -1) return; // Close active connections for (i = 0; i < LWPB_TRANSPOR...
false
false
false
false
false
0
mdio_bus_match(struct device *dev, struct device_driver *drv) { struct phy_device *phydev = to_phy_device(dev); struct phy_driver *phydrv = to_phy_driver(drv); const int num_ids = ARRAY_SIZE(phydev->c45_ids.device_ids); int i; if (of_driver_match_device(dev, drv)) return 1; if (phydrv->match_phy_device) ret...
false
false
false
false
false
0
addrcache_group_add_email( AddressCache *cache, ItemGroup *group, ItemEMail *email ) { cm_return_val_if_fail( cache != NULL, FALSE ); cm_return_val_if_fail( group != NULL, FALSE ); cm_return_val_if_fail( email != NULL, FALSE ); addritem_group_add_email( group, email ); cache->dirtyFlag = TRUE; return TRUE; }
false
false
false
false
false
0
OnObjectCreate(GameObject* pGo) { if (pGo->GetEntry() == GO_WHITEMANE_DOOR) { m_mGoEntryGuidStore[GO_WHITEMANE_DOOR] = pGo->GetObjectGuid(); } }
false
false
false
false
false
0
unpack_RGB332(const void *src, GLfloat dst[][4], GLuint n) { const GLubyte *s = ((const GLubyte *) src); GLuint i; for (i = 0; i < n; i++) { dst[i][RCOMP] = ((s[i] >> 5) & 0x7) * (1.0F / 7.0F); dst[i][GCOMP] = ((s[i] >> 2) & 0x7) * (1.0F / 7.0F); dst[i][BCOMP] = ((s[i] ) & 0x3) * (1.0F / ...
false
false
false
false
false
0
qla4_82xx_disable_intrs(struct scsi_qla_host *ha) { if (test_and_clear_bit(AF_INTERRUPTS_ON, &ha->flags)) qla4_8xxx_intr_disable(ha); spin_lock_irq(&ha->hardware_lock); /* BIT 10 - set */ qla4_82xx_wr_32(ha, ha->nx_legacy_intr.tgt_mask_reg, 0x0400); spin_unlock_irq(&ha->hardware_lock); }
false
false
false
false
false
0
update_onboard_backlight(struct backlight_device *bd) { struct fbtft_par *par = bl_get_data(bd); bool on; fbtft_par_dbg(DEBUG_BACKLIGHT, par, "%s: power=%d, fb_blank=%d\n", __func__, bd->props.power, bd->props.fb_blank); on = (bd->props.power == FB_BLANK_UNBLANK) && (bd->props.fb_blank == FB_BLANK_UNBLANK);...
false
false
false
false
false
0
vmlfb_mmap(struct fb_info *info, struct vm_area_struct *vma) { struct vml_info *vinfo = container_of(info, struct vml_info, info); unsigned long offset = vma->vm_pgoff << PAGE_SHIFT; int ret; unsigned long prot; ret = vmlfb_vram_offset(vinfo, offset); if (ret) return -EINVAL; prot = pgprot_val(vma->vm_page_p...
false
false
false
false
false
0
endRadical() { Owner<SaveFOTBuilder> tem(save_.get()); startRadicalDegree(); tem->emit(*this); endRadicalDegree(); endRadicalSerial(); }
false
false
false
false
false
0
gfi_array_from_string(const char *s) { gfi_array*t; int n = (int)strlen(s); t = gfi_array_create_1(n,GFI_CHAR, GFI_REAL); if (t) memcpy(gfi_char_get_data(t), s, n); return t; }
false
false
false
false
false
0
parallelized_function_p (tree fn) { if (!parallelized_functions || !DECL_ARTIFICIAL (fn)) return false; return bitmap_bit_p (parallelized_functions, DECL_UID (fn)); }
false
false
false
false
false
0
bcm_kona_gpio_unlock_gpio(struct bcm_kona_gpio *kona_gpio, unsigned gpio) { u32 val; unsigned long flags; int bank_id = GPIO_BANK(gpio); spin_lock_irqsave(&kona_gpio->lock, flags); val = readl(kona_gpio->reg_base + GPIO_PWD_STATUS(bank_id)); val &= ~BIT(gpio); bcm_kona_gpio_write_lock_regs(kona_gpio->reg_...
false
false
false
false
false
0
genphy_read_status(struct phy_device *phydev) { int adv; int err; int lpa; int lpagb = 0; int common_adv; int common_adv_gb = 0; /* Update the link, but return if there was an error */ err = genphy_update_link(phydev); if (err) return err; phydev->lp_advertising = 0; if (AUTONEG_ENABLE == phydev->autone...
false
false
false
false
false
0
sarrayMakeInnerLoopDWACode(SEL *sel, l_int32 index) { char *tstr, *string; char logicalor[] = "|"; char logicaland[] = "&"; char bigbuf[BUFFER_SIZE]; l_int32 i, j, optype, count, nfound, delx, dely; SARRAY *sa; PROCNAME("sarrayMakeInnerLoopDWACode"); if (!sel) ...
false
false
false
false
false
0
addItem(TreeItem* item) { if (item != 0) { Tree* parentWindow = (Tree*)getOwnerWindow(); // establish ownership item->setOwnerWindow(parentWindow); // if sorting is enabled, re-sort the tree if (parentWindow->isSortEnabled()) { d_list...
false
false
false
false
false
0
_cx_tree_black_count(cx_tnode *node, cx_tnode *root) { cxsize sum = 0; if (node == NULL) return 0; do { if (_cx_tnode_color(node) == CX_TNODE_BLACK) ++sum; if (node == root) break; node = _cx_tnode_parent(node); } while (1); return sum; }
false
false
false
false
false
0
f2fs_ioc_commit_atomic_write(struct file *filp) { struct inode *inode = file_inode(filp); int ret; if (!inode_owner_or_capable(inode)) return -EACCES; if (f2fs_is_volatile_file(inode)) return 0; ret = mnt_want_write_file(filp); if (ret) return ret; if (f2fs_is_atomic_file(inode)) { clear_inode_flag(F...
false
false
false
false
false
0
get_escaped_name( ctmbstr name ) { tmbstr escpName; char aux[2]; uint len = 0; ctmbstr c; for(c=name; *c!='\0'; ++c) switch(*c) { case '<': case '>': len += 4; break; case '"': len += 6; break; default: ...
false
false
false
false
false
0
rotate() { Display *dpy = FbTk::App::instance()->display(); // make an image copy XImage *src_image = XGetImage(dpy, drawable(), 0, 0, // pos width(), height(), // size ~0, // plane mask ...
false
false
false
false
false
0
SetFastElement(uint32_t index, Object* value, StrictModeFlag strict_mode, bool check_prototype) { ASSERT(HasFastElements() || HasFastArgumentsElements()); FixedArray* backing_store = FixedArray::cast(e...
false
false
false
false
false
0
clone () const { Coord rx = _x[0] - _x[4]; Coord ry = _y[4] - _x[0]; Coord x = _x[4]; Coord y = _y[0]; return new Ellipse31(_brush, _stroke, _fill, x, y, rx, ry, _t); }
false
false
false
false
false
0
iemgui_compatible_col(int i) { int j; if(i >= 0) { j = iemgui_modulo_color(i); return(iemgui_color_hex[(j)]); } else return((-1 -i)&0xffffff); }
false
false
false
false
false
0
FillItem(mdo::Item* item) { bool ok = true; std::stringstream query; query << "INSERT INTO metadatavalue (item_id,metadata_field_id,text_value) " << "VALUES ('" << item->GetId() << "','27','" << item->GetAbstract() << "')"; ok &= this->Database->ExecuteQuery(query.str().c_str()); query.str(std::string...
false
false
false
false
false
0
resFind(gint32 handle) { static int dummy=0; /* initializer element must be a constant */ MyRes *p; if (dummy==0) { resInit(); dummy=1; } /* call once in a program */ if (handle<=0) { return NULL; } else if (handle<MYRES_CACHE_SIZE) { return myres_cache[handle].type<T_NORMAL_MIN ? NULL : myres_cache+h...
false
false
false
false
false
0
qacct_usage(sge_gdi_ctx_class_t **ctx, FILE *fp) { dstring ds; char buffer[256]; DENTER(TOP_LAYER, "qacct_usage"); sge_dstring_init(&ds, buffer, sizeof(buffer)); fprintf(fp, "%s\n", feature_get_product_name(FS_SHORT_VERSION, &ds)); fprintf(fp, "%s qacct [options]\n", MSG_HISTORY_USAGE); ...
false
false
false
false
false
0
misc_init(void) { int err; struct proc_dir_entry *ret; ret = proc_create("misc", 0, NULL, &misc_proc_fops); misc_class = class_create(THIS_MODULE, "misc"); err = PTR_ERR(misc_class); if (IS_ERR(misc_class)) goto fail_remove; err = -EIO; if (register_chrdev(MISC_MAJOR,"misc",&misc_fops)) goto fail_printk; ...
false
false
false
false
false
0
tda998x_encoder_set_polling(struct tda998x_priv *priv, struct drm_connector *connector) { if (priv->hdmi->irq) connector->polled = DRM_CONNECTOR_POLL_HPD; else connector->polled = DRM_CONNECTOR_POLL_CONNECT | DRM_CONNECTOR_POLL_DISCONNECT; }
false
false
false
false
false
0
ajListIterRewind(AjIList iter) { const AjPList list = NULL; AjPListNode node = NULL; AjPListNode tmp = NULL; if(!iter) return; if(iter->Modify) list = iter->Head; else list = iter->ReadHead; if(iter->Back) { for(node=list->First; node->Next; node = no...
false
false
false
true
false
1
PyCodec_RegisterError(const char *name, PyObject *error) { PyInterpreterState *interp = PyThreadState_GET()->interp; if (interp->codec_search_path == NULL && _PyCodecRegistry_Init()) return -1; if (!PyCallable_Check(error)) { PyErr_SetString(PyExc_TypeError, "handler must be callable"); ...
false
false
false
false
false
0
keyword_model_get_iter (GtkTreeModel *tree_model, GtkTreeIter *iter, GtkTreePath *path) { DhKeywordModel *model; DhKeywordModelPriv *priv; GList *node; const gint *indices; model = DH_KEYWORD_MODEL (tree_...
false
false
false
false
false
0
mca_coll_ml_initialize_block(mca_bcol_base_memory_block_desc_t *ml_memblock, uint32_t num_buffers, uint32_t num_banks, uint32_t buffer_size, int32_t data_offset, ...
false
false
false
false
true
1
replace_plugins() { GList *new_monitor_list, *list; GkrellmMonitor *mon; extern GtkWidget *gkrellm_monitor_vbox(); new_monitor_list = NULL; for (list = gkrellm_monitor_list; list; list = list->next) { mon = (GkrellmMonitor *) list->data; if (mon->privat->main_vbox && mon != gkrellm_mon_host()) { gt...
false
false
false
false
false
0
fill_profile_treeview (GtrPreferencesDialog *dlg, GtkTreeModel *model) { GtrProfileManager *prof_manager; GtkTreeIter iter; GtrProfile *active_profile; GSList *l, *profiles; gtk_list_store_clear (GTK_LIST_STORE (model)); prof_manager = gtr_profile_manager_get_default (); profiles = gtr_profile_manager_g...
false
false
false
false
false
0
mono_gc_alloc_string (MonoVTable *vtable, size_t size, gint32 len) { MonoString *str; #ifndef DISABLE_CRITICAL_REGION TLAB_ACCESS_INIT; ENTER_CRITICAL_REGION; str = mono_gc_try_alloc_obj_nolock (vtable, size); if (str) { /*This doesn't require fencing since EXIT_CRITICAL_REGION already does it for us*/ str->le...
false
false
false
false
false
0
getScrollMode( const QPoint &p, QwtAbstractSlider::ScrollMode &scrollMode, int &direction ) const { if ( wheelRect().contains( p ) ) scrollMode = QwtAbstractSlider::ScrMouse; else scrollMode = QwtAbstractSlider::ScrNone; direction = 0; }
false
false
false
false
false
0
ServerLoop(void) { fd_set readmask; int nSockets; time_t now, last_touch_time; last_touch_time = time(NULL); nSockets = initMasks(&readmask); for (;;) { fd_set rmask; int selres; /* * Wait for a connection request to arrive. * * We wait at most one minute, to ensure that the other b...
false
false
false
false
false
0
createPadDocument() { // Create PadDocument for the editor _padForEditor = new PadDocument(); ui->dropTextEditor->setPadDocument(_padForEditor); _padForEditor->setSource(ui->rawSource->document()); _padForEditor->setOutput(ui->dropTextEditor->document()); // Create P...
false
false
false
false
false
0
e_strcmp2n (const gchar *str1, size_t len1, const gchar *str2, size_t len2) { const gint cmp = memcmp (str1, str2, MIN (len1, len2)); return (cmp != 0 ? cmp : len1 == len2 ? 0 : len1 < len2 ? -1 : 1); }
false
false
false
false
false
0
spif_array_iterator_new(spif_array_t subject) { spif_array_iterator_t self; self = SPIF_ALLOC(array_iterator); if (!spif_array_iterator_init(self, subject)) { SPIF_DEALLOC(self); self = SPIF_NULL_TYPE(array_iterator); } return self; }
false
false
false
false
false
0
_twitter_avatar_request_avatar (SwAvatarIface *self, DBusGMethodInvocation *context) { SwServiceTwitterPrivate *priv = GET_PRIVATE (self); if (priv->image_url) { sw_web_download_image_async (priv->image_url, _requested_avatar_downloaded_c...
false
false
false
false
false
0
dwarf_get_LNE_name (unsigned int val,const char ** s_out) { switch (val) { case DW_LNE_end_sequence: *s_out = "DW_LNE_end_sequence"; return DW_DLV_OK; case DW_LNE_set_address: *s_out = "DW_LNE_set_address"; return DW_DLV_OK; case DW_LNE_define_file: *s_out = "DW_L...
false
false
false
false
false
0
create() { // Comm class must be created before Atom class // so that nthreads is defined when create_avec invokes grow() if (cuda) comm = new CommCuda(this); else comm = new Comm(this); if (cuda) neighbor = new NeighborCuda(this); else neighbor = new Neighbor(this); if (cuda) domain = new DomainCuda(t...
false
false
false
false
false
0
ell_3v_perp_f(float a[3], const float b[3]) { int idx; PERP; }
false
false
false
false
false
0
AddResource(AuID id, RESTYPE type, pointer value) { int client; ClientResourceRec *rrec; ResourcePtr res, *head; client = CLIENT_ID(id); rrec = &clientTable[client]; /* JET 3/17/2007 - Luigi Auriemma's nasbugs, attack #2. can force nasd to terminate by specifying a non-existant clienti...
false
false
false
false
false
0
s3fwrn5_nci_post_setup(struct nci_dev *ndev) { struct s3fwrn5_info *info = nci_get_drvdata(ndev); int ret; ret = s3fwrn5_firmware_update(info); if (ret < 0) goto out; /* NCI core reset */ s3fwrn5_set_mode(info, S3FWRN5_MODE_NCI); s3fwrn5_set_wake(info, true); ret = nci_core_reset(info->ndev); if (ret < 0...
false
false
false
false
false
0
paintEvent(QPaintEvent *) { QPainter painter(this); painter.fillRect(rect(), QColor(255, 150, 150)); }
false
false
false
false
false
0
estimateHyperLogLog(hyperLogLogState *cState) { double result; double sum = 0.0; int i; for (i = 0; i < cState->nRegisters; i++) { sum += 1.0 / pow(2.0, cState->hashesArr[i]); } /* result set to "raw" HyperLogLog estimate (E in the HyperLogLog paper) */ result = cState->alphaMM / sum; if (result <= (5...
false
false
false
false
false
0
Ok() const { return m_refData && (M_PLOTDATA->m_count > 0); }
false
false
false
false
false
0
register_common(const char *name, int minargs, int maxargs, bf_type func, bf_read_type read, bf_write_type write, va_list args) { int va_index; int num_arg_types = maxargs == -1 ? minargs : maxargs; static Stream *s = 0; if (!s) s = new_stream(30); if (top_bf_table == MAX_FUNC) { errlog("too m...
false
true
false
false
true
1
xmlSecNssKeyDataRsaFinalize(xmlSecKeyDataPtr data) { xmlSecAssert(xmlSecKeyDataCheckId(data, xmlSecNssKeyDataRsaId)); xmlSecNssPKIKeyDataFinalize(data); }
false
false
false
false
false
0
cxd2820r_init_c(struct dvb_frontend *fe) { struct cxd2820r_priv *priv = fe->demodulator_priv; int ret; ret = cxd2820r_wr_reg(priv, 0x00085, 0x07); if (ret) goto error; return ret; error: dev_dbg(&priv->i2c->dev, "%s: failed=%d\n", __func__, ret); return ret; }
false
false
false
false
false
0
tab_callback(int count, int key) { if (!rl_point) { strip_initial_spaces += tab_width; return 0; } int i; for (i = line_start(rl_point); i < rl_point; i++) { if (rl_line_buffer[i] != ' ') { // do tab completion i = rl_point; rl_complete_interna...
false
false
false
false
false
0
gridDefUUID(int gridID, const char *uuid) { grid_t *gridptr; if ( reshGetStatus ( gridID, &gridOps ) == CLOSED ) { xwarning("%s", "Operation not executed."); return; } gridptr = ( grid_t *) reshGetVal ( gridID, &gridOps ); grid_check_ptr(gridID, gridptr); memcpy(gridptr->uuid, uuid, 16...
false
false
false
false
false
0
lazy_memoize_variable (const SCM symbol, const SCM environment) { const SCM top_level = scm_env_top_level (environment); const SCM variable = scm_sym2var (symbol, top_level, SCM_BOOL_F); if (scm_is_false (variable)) error_unbound_variable (symbol); else return variable; }
false
false
false
false
false
0
smsc_ircc_net_xmit(struct sk_buff *skb, struct net_device *dev) { struct smsc_ircc_cb *self = netdev_priv(dev); if (self->io.speed > 115200) return smsc_ircc_hard_xmit_fir(skb, dev); else return smsc_ircc_hard_xmit_sir(skb, dev); }
false
false
false
false
false
0
PrintGenericName( void *theEnv, char *logName, DEFGENERIC *gfunc) { if (gfunc->header.whichModule->theModule != ((struct defmodule *) EnvGetCurrentModule(theEnv))) { EnvPrintRouter(theEnv,logName,EnvGetDefmoduleName(theEnv,(void *) gfunc->header.whichModule->theModule)); ...
false
false
false
false
false
0
calcoffsetsh(void) { int tw; unsigned int w; if(!curr) return; w = promptw + cmdw + 2 * spaceitem; for(next = curr; next; next=next->right) { tw = textw(next->text); if(tw > mw / 3) tw = mw / 3; w += tw; if(w > mw) break; } w = promptw + cmdw + 2 * spaceitem; for(prev = curr; prev && prev->left...
false
false
false
false
false
0
cbf_count_bits (cbf_compress_data *data) { unsigned int endcode, codes, code; unsigned long bitcount; cbf_compress_node *node; endcode = 1 << data->bits; node = data->node; /* Basic entries */ bitcount = 4 * 64; /* How many symbols do we actua...
false
false
false
false
false
0
qs_png_label(int width, int height, int border, png_bytep *row_pointers, long max, const char *name) { /* MAX */ int i; int step = height/5; int c = 5; for(i = 0; i < height; i = i + step) { qs_png_write_long(1, border - (S_W_MAX/2) + i, row_pointers, ...
false
false
false
false
false
0
ppc32_exec_BCCTR(cpu_ppc_t *cpu,ppc_insn_t insn) { int bo = bits(insn,21,25); int bi = bits(insn,16,20); if (ppc32_check_cond(cpu,bo,bi)) { cpu->ia = cpu->ctr & ~0x3; return(1); } return(0); }
false
false
false
false
false
0
Init() { jack_log("JackNetMasterInterface::Init : ID %u", fParams.fID); session_params_t host_params; uint attempt = 0; int rx_bytes = 0; // socket if (fSocket.NewSocket() == SOCKET_ERROR) { jack_error("Can't create socket : %s", StrError(NET_ERROR_CODE)...
false
false
false
false
false
0
gst_compare_buffers (GstCompare * comp, GstBuffer * buf1, GstCaps * caps1, GstBuffer * buf2, GstCaps * caps2) { gdouble delta = 0; gsize size1, size2; /* first check metadata */ gst_compare_meta (comp, buf1, caps1, buf2, caps2); size1 = gst_buffer_get_size (buf1); size2 = gst_buffer_get_size (buf1); ...
false
false
false
false
false
0
__ieee754_gammal_r (long double x, int *signgamp) { u_int32_t es, hx, lx; GET_LDOUBLE_WORDS (es, hx, lx, x); if (__builtin_expect (((es & 0x7fff) | hx | lx) == 0, 0)) { /* Return value for x == 0 is Inf with divide by zero exception. */ *signgamp = 0; return 1.0 / x; } if (__builtin...
false
false
false
false
false
0
hdmi_resources_init(struct hdmi_device *hdev) { struct device *dev = hdev->dev; struct hdmi_resources *res = &hdev->res; static char *supply[] = { "hdmi-en", "vdd", "vdd_osc", "vdd_pll", }; int i, ret; dev_dbg(dev, "HDMI resource init\n"); memset(res, 0, sizeof(*res)); hdmi_resource_clear_clocks(res);...
false
false
false
false
false
0
read_uint32(context *con, uint32_t *buf, int count) { read_data(con, buf, 4, count); if (con->swap) { uint8_t *p, *plim, t; for (p=(uint8_t*)buf, plim=p+count*4; p<plim; p+=4) t=p[0], p[0]=p[3], p[3]=t, t=p[1], p[1]=p[2], p[2]=t; } }
false
false
false
false
true
1
folder_regexp_test_cb(GtkWidget *widget, gpointer data) { #if !GTK_CHECK_VERSION(3, 0, 0) static GdkColor red; static gboolean colors_initialised = FALSE; #else static GdkColor red = { (guint32)0, (guint16)0xff, (guint16)0x70, (guint16)0x70 }; #endif static gchar buf[BUFFSIZE]; FolderItemGeneralPage *page = (Folde...
false
false
false
false
false
0
acpi_bus_can_wakeup(acpi_handle handle) { struct acpi_device *device; int result; result = acpi_bus_get_device(handle, &device); return result ? false : device->wakeup.flags.valid; }
false
false
false
false
false
0
pv_sauve_modele( modele, fp, date ) rdsfig_list *modele; FILE *fp; date_type *date; { register int numb, i; register rdsrec_list *rect; register rdsins_list *inst = modele->INSTANCE; hinfo_type infobuf; int bool = FALSE; entete(BGNSTR, 2 * sizeof(date_type)); numb = fwrite((char *)&da...
false
false
false
false
true
1
find(string const &name) const { FuncList::const_iterator p = find_if(_flist.begin(), _flist.end(), bind2nd(isFuncName(), name)); if (p == _flist.end()) { p = find_if(_flist.begin(), _flist.end(), bind2nd(isFuncAlias(), name)); } return (p == _flist.end()) ? _nullfun : *p; }
false
false
false
false
false
0
qif_merge_classes(gpointer key, gpointer value, gpointer data) { qif_merge_t *merge = data; QifClass qclass = value; /* Merge into the context. Remember items moved into the parent */ if (qif_class_merge(merge->ctx, qclass) == qclass) merge->list = g_list_prepend(merge->list, qclass->name); }
false
false
false
false
false
0
cancel_storage_daemon_job(JCR *jcr) { if (jcr->sd_canceled) { return; /* cancel only once */ } UAContext *ua = new_ua_context(jcr); JCR *control_jcr = new_control_jcr("*JobCancel*", JT_SYSTEM); BSOCK *sd; ua->jcr = control_jcr; if (jcr->store_bsock) { if (!ua->jcr->...
false
false
false
false
false
0
tab_snprint_coldesc(char *line, int len, struct col_format *cfmt, int start) { char buf[64]; int p=0, k=0; snprintf(buf, 64, "%d-%d", start+1, start + cfmt->width); if (cfmt->type == SYM_FLAGS) { p += snprintf(line, len, "%-8s %s: type ", buf, symname[cfmt->type]); if (p >= len) return cfmt->width +...
true
true
false
false
false
1
wl1251_acx_frame_rates(struct wl1251 *wl, u8 ctrl_rate, u8 ctrl_mod, u8 mgt_rate, u8 mgt_mod) { struct acx_fw_gen_frame_rates *rates; int ret; wl1251_debug(DEBUG_ACX, "acx frame rates"); rates = kzalloc(sizeof(*rates), GFP_KERNEL); if (!rates) return -ENOMEM; rates->tx_ctrl_frame_rate = ctrl_rate; rat...
false
false
false
false
false
0
free_pixels(CMAP_ENTRY *cols, unsigned int n) { unsigned long pixels[256]; unsigned int i; if (n == 0) return; for (i = 0 ; i < n ; i++) pixels[i] = cols[i].pixel; XFreeColors(display, global.cmap, pixels, n, 0); }
false
false
false
false
false
0
print_ext_chars (UtText *text, bool use_color_b) { UtExtCharLine *scan_exl = text->ext_char; char * scan_char; while (scan_exl) { printf ("%3lu [%lu]: ", scan_exl->line_i, scan_exl->nb_ext_chars); scan_char = scan_exl->line_p; while (*scan_char) { if ((u_char)*scan_char<0x80) putchar(*scan_char++); else ...
false
false
false
false
false
0
loinscmp (loins1, loins2) /*===========================================================================*/ loins_list *loins1, *loins2; /* Compares the two names (insname and figname) of the instances loins1 and loins2. Returns 0 if equal, 1 if less, and 2 if greater. If insnames are equals, but fignames not, ...
false
false
false
false
false
0
jp2_read_bpcc(opj_jp2_t *jp2, opj_cio_t *cio) { unsigned int i; opj_jp2_box_t box; opj_common_ptr cinfo = jp2->cinfo; jp2_read_boxhdr(cinfo, cio, &box); if (JP2_BPCC != box.type) { opj_event_msg(cinfo, EVT_ERROR, "Expected BPCC Marker\n"); return false; } for (i = 0; i < jp2->numcomps; i++) { ...
false
false
false
false
false
0
sharpenrow(char *a[], int w, int i, long max) { unsigned char *prev, *curr, *next; int v; prev = (unsigned char *) a[-1]; curr = (unsigned char *) a[0]; next = (unsigned char *) a[1]; w *= 3; while (w--) { v = 2.0 * curr[0] - .10 * (prev[-3] + prev[3] + next[-3] + next[3]) - .15 * (prev...
true
true
false
false
false
1
setMeshInputElementIsAdded(int elem_id, bool value) { if ( elem_id < 0 || elem_id >= nofMeshInputElements ) return; meshInputElements[elem_id].isAdded = value; }
false
false
false
false
false
0
slapi_mod_set_type (Slapi_Mod *smod, const char *type) { PR_ASSERT(smod!=NULL); PR_ASSERT(smod->mod!=NULL); if(smod->mod->mod_type!=NULL) { slapi_ch_free((void**)&smod->mod->mod_type); } smod->mod->mod_type = slapi_ch_strdup (type); }
false
false
false
false
false
0
Perl_pad_add_name_pvn(pTHX_ const char *namepv, STRLEN namelen, U32 flags, HV *typestash, HV *ourstash) { dVAR; PADOFFSET offset; SV *namesv; bool is_utf8; PERL_ARGS_ASSERT_PAD_ADD_NAME_PVN; if (flags & ~(padadd_OUR|padadd_STATE|padadd_NO_DUP_CHECK|padadd_UTF8_NAME)) Perl_croak(aTHX_ "panic...
false
false
false
false
false
0
ReadImage(char* fileName){ char* ext=GetFileExtension(fileName); int ret=0; if(!strcasecmp(ext,"bmp")){ret=BMPReadImage(fileName,*this);} else if(!strcasecmp(ext,"jpg") || !strcasecmp(ext,"jpeg")){ret=JPEGReadImage(fileName,*this);} else {}; // Unknown format delete[] ext; return ret; }
false
false
false
false
false
0
hashed_option_space_encapsulate (result, packet, lease, client_state, in_options, cfg_options, scope, universe) struct data_string *result; struct packet *packet; struct lease *lease; struct client_state *client_state; struct option_state *in_options; struct option_state *cfg_options; struct binding_sco...
false
false
false
false
false
0
MD5Final(unsigned char digest[16], MD5_CTX *ctx) { unsigned count; unsigned char *p; uint32_t *a; count = (ctx->bits[0] >> 3) & 0x3F; p = ctx->in + count; *p++ = 0x80; count = 64 - 1 - count; if (count < 8) { memset(p, 0, count); byteReverse(ctx->in, 16); MD5Transform(ctx->buf, (uint32_t *...
false
false
false
false
false
0
free_block_plus_frees(Block *bpt) { Block *b = bpt; if (b->array_dependence_range != NULL) free_block_array_dependence_range(b); if (b->dom != NULL) destruct_IntSet(b->dom); if (b->path != NULL) destruct_IntSet(b->path); if (b->pred != NULL) destruct_IntSet(b->pre...
false
false
false
false
false
0
git_test__assert_pass(git_test *tc, const char *file, int line, const char *message, int ret_value) { if (ret_value < 0) fail_test(tc, file, line, message, ret_value); }
false
false
false
false
false
0
gedit_file_browser_store_rename (GeditFileBrowserStore *model, GtkTreeIter *iter, const gchar *new_name, GError **error) { FileBrowserNode *node; GFile *file; GFile *parent; GFile *previous; GError *err = NULL; GtkTreePath *path; g_return_val_if_fail (GEDIT_I...
false
false
false
false
false
0
brw_get_depthstencil_tile_masks(struct intel_mipmap_tree *depth_mt, uint32_t depth_level, uint32_t depth_layer, struct intel_mipmap_tree *stencil_mt, uint32_t *out_tile_mask_x, ...
false
false
false
false
false
0
datetime_from_filetime (guint64 ft) { static const guint64 epoch = G_GINT64_CONSTANT (11644473600); GTimeVal tv; if (!ft) return NULL; /* ft is number of 100ns since Jan 1 1601 */ tv.tv_usec = (ft % 10000000u) / 10; tv.tv_sec = (ft / 10000000u) - epoch; return g_date_time_new_from_timeval_local (&tv); }
false
false
false
false
false
0
fzwrite(const void *buffer, unsigned size, unsigned number, adv_fz* f) { if (f->type == fz_file) { return fwrite_lock(buffer, size, number, f->f); } else if (f->type == fz_memory_write) { unsigned total_size; /* adjust the number of record to write */ total_size = size * number; if (fzgrow(f, f->virtual_p...
false
false
false
false
false
0
g_attrib_register(GAttrib *attrib, guint8 opcode, GAttribNotifyFunc func, gpointer user_data, GDestroyNotify notify) { static guint next_evt_id = 0; struct event *event; event = g_try_new0(struct event, 1); if (event == NULL) return 0; event->expected = opcode; event->func = func; event->user_data = ...
false
false
false
false
false
0
DXQueryParameter(Object o, Type t, int dim, int *count) { int nitems; Type at; Category ac; int ar, as[MAXDIM]; /* assume the worst */ if(count) *count = 0; if(!o) return NULL; /* slightly special case for char arrays, which might come in * as string objects. */ if ((...
false
false
false
false
false
0
unpackPADMULT(action* a,buffer *b) { grib_int_t count, loop; grib_int_t multiple = atol(a->count); grib_int_t startOctet = atol(a->octet); count = (int)((b->packed)-(b->startOctets)) -(startOctet-OCTETSTART); count = ((count + multiple - 1)/multiple)*multiple - count; if( count == 0 ) count = multiple; b->tot...
false
false
false
false
false
0
getMnemonic(MSMenu *m_) { int childcount = m_->children().length(); A st=gv(Et,2); A attr=(childcount>0)?gv(Et,childcount):aplus_nl; A val=(childcount>0)?gv(Et,childcount):aplus_nl; char str[2]; str[1]='\0'; MSMenuItem *item; for(int i = 0; i < childcount; i++) { item = (MSMenuItem *) m_->...
false
false
false
false
true
1
load_intfa(struct bc_read_stream *s, struct intfa *intfa, char **strings) { /* first get a count of the states and transitions */ intfa->num_states = 0; intfa->num_transitions = 0; while(1) { struct record_info ri = bc_rs_next_data_record(s); if(ri.record_type == DataRecord) ...
false
true
false
false
true
1