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
usrMutexCleanup() { if (pMutexDestroyFn != NULL) { for (int i = 0; i < gMutexListSize; i++) { UMutex *m = gMutexList[i]; U_ASSERT(m->fInitialized); (*pMutexDestroyFn)(gMutexContext, &m->fUserMutex); m->fInitialized = FALSE; } (*pMutexDestroyFn)...
false
false
false
false
false
0
ath10k_wmi_main_op_fw_stats_fill(struct ath10k *ar, struct ath10k_fw_stats *fw_stats, char *buf) { u32 len = 0; u32 buf_len = ATH10K_FW_STATS_BUF_SIZE; const struct ath10k_fw_stats_pdev *pdev; const struct ath10k_fw_stats_vdev *vdev; const struct ath10k_fw_stats_peer *peer; size_t num_peers; ...
false
false
false
false
false
0
tor_split_lines(smartlist_t *sl, char *buf, int len) { /* Index in buf of the start of the current line */ int start = 0; /* Index in buf of the current character being processed */ int cur = 0; /* Are we currently in a line */ char in_line = 0; /* Loop over string */ while (cur < len) { /* Loop un...
false
false
false
false
false
0
mxmlSetCustom(mxml_node_t *node, /* I - Node to set */ void *data, /* I - New data pointer */ void (*destroy)(void *)) /* I - New destructor function */ { /* * Range check input... */ if (!node || node->type != MXML_CUSTOM) return (-1); /* * Free any old element v...
false
false
false
false
false
0
FastEmitInst_r(unsigned MachineInstOpcode, const TargetRegisterClass *RC, unsigned Op0, bool Op0IsKill) { unsigned ResultReg = createResultReg(RC); const TargetInstrDesc &II = TII.get(MachineInstOpcode); if (II.getNumDefs() >= 1) BuildMI(*Fu...
false
false
false
false
false
0
echoTriMeshSet(echoObject *trim, int numV, echoPos_t *pos, int numF, int *vert) { int i; if (trim && echoTypeTriMesh == trim->type) { TRIMESH(trim)->numV = numV; TRIMESH(trim)->numF = numF; TRIMESH(trim)->pos = pos; TRIMESH(trim)->vert = vert; ELL_3V_SET(TRIMESH(tr...
false
false
false
false
false
0
create_and_fill_model (guint32 flags) { GtkListStore *liststore; /* the list store data structure */ GtkTreeIter item; /* new item added to the list store */ guint i; gboolean checked; /* create a new list store */ liststore = gtk_list_store_new (3, G_TY...
false
false
false
false
false
0
commitLength(Value* v) { CSSPrimitiveValueImpl* val = new CSSPrimitiveValueImpl(v->fValue, (CSSPrimitiveValue::UnitTypes)v->unit); if (allowX) { x = val; allowX = false; allowY = true; allowColor = false; allowBreak =...
false
false
false
false
false
0
parse_sortnorm(int offset, ubyte *bsp_data) { int frontlist, backlist, prelist, postlist, onlist; frontlist = w(bsp_data+offset+36); backlist = w(bsp_data+offset+40); prelist = w(bsp_data+offset+44); postlist = w(bsp_data+offset+48); onlist = w(bsp_data+offset+52); if (prelist) parse_bsp(offset+prelist,bsp_dat...
false
false
false
false
false
0
source_initable_init (GInitable *initable, GCancellable *cancellable, GError **error) { ESource *source; gboolean success = TRUE; source = E_SOURCE (initable); /* The D-Bus object has the unique identifier (UID). */ if (source->priv->dbus_object != NULL) { EDBusObjec...
false
false
false
false
false
0
addHostsFromFile(char *filename, unsigned int start_pos, unsigned int max_hosts) { FILE *inputfd; char line[MAXLINE + 1]; char *cp; unsigned int pos = 0; unsigned int hosts_added = 0; /* nmap */ if (!strcmp(filename, "-")) { inputfd = stdin; } else { inputfd = fopen(filename, "r"); if (!inputfd) { pri...
false
false
false
false
true
1
print_time_stats(double time, uint64_t size, int total) { double speed = (time == 0 ? 0 : (double)(int64_t)size / 1048576.0 / time); if (total) { fprintf(rhash_data.log, _("Total %.3f sec, %4.2f MBps\n"), time, speed); } else { fprintf(rhash_data.log, _("Calculated in %.3f sec, %4.2f MBps\n"), time, speed); } ...
false
false
false
false
false
0
removeChild(Node* child) { if (child) { ChildNodeMap::iterator i = mChildren.find(child->getName()); // ensure it's our child if (i != mChildren.end() && i->second == child) { // cancel any pending update cancelUpdate(ch...
false
false
false
false
false
0
gamgi_math_position_translation (gamgi_object *object, double *translation) { gamgi_assembly *assembly; gamgi_cell *cell; gamgi_cluster *cluster; gamgi_molecule *molecule; gamgi_group *group; gamgi_plane *plane; gamgi_direction *direction; gamgi_text *text; switch (object->class) { case GAMGI_ENGINE_LAYER: gamgi...
false
false
false
false
false
0
__str__() const { std::ostringstream o; o << "abs(" << *arg_ << ")"; return o.str(); }
false
false
false
false
false
0
typeMess(int ac,t_atom* av) { if(ac&&A_SYMBOL==av->a_type) { t_symbol*s=atom_getsymbolarg(0,ac,av); switch(*(s->s_name)) { case 'l': case 'L': m_drawType=GL_LINES; break; case 'p': case 'P': m_drawType=GL_POINTS; break; default: error("unknown draw style"); return; } } else { ...
false
false
false
false
false
0
sge_gdi_do_permcheck(sge_gdi_packet_class_t *packet, sge_gdi_task_class_t *task) { lList *lp = NULL; lListElem *ep = NULL; DENTER(GDI_LAYER, "sge_gdi_do_permcheck"); DPRINTF(("User: %s\n", packet->user )); if (task->answer_list == NULL) { const char *mapped_user = NULL; const char* reques...
false
false
false
false
false
0
gkd_ssh_agent_proto_read_public_v1 (EggBuffer *req, gsize *offset, GckBuilder *attrs) { guint32 bits; g_assert (req); g_assert (offset); g_assert (attrs); if (!egg_buffer_get_uint32 (req, *offset, offset, &bits)) return FALSE; if (!gkd_s...
false
false
false
false
false
0
hga_pan(unsigned int xoffset, unsigned int yoffset) { unsigned int base; unsigned long flags; base = (yoffset / 8) * 90 + xoffset; spin_lock_irqsave(&hga_reg_lock, flags); write_hga_w(base, 0x0c); /* start address */ spin_unlock_irqrestore(&hga_reg_lock, flags); DPRINTK("hga_pan: base:%d\n", base); }
false
false
false
false
false
0
host_is_disk_available(struct host *h, gfarm_off_t size) { gfarm_off_t avail, minfree = gfarm_get_minimum_free_disk_space(); static const char diag[] = "host_get_disk_avail"; gfarm_mutex_lock(&h->back_channel_mutex, diag, "back_channel_mutex"); if (host_is_up_unlocked(h)) avail = h->status.disk_avail * 1024; e...
false
false
false
false
false
0
packPAD(action* a,buffer *b) { /* // Pack buffer with zeroes */ grib_int_t zero = 0, loop, numberOfZeroes = atoi((a->count)); updateOffsets(a,b,&numberOfZeroes); if( NEQUAL(a->octet,"n/a") ) { for( loop = 0; loop < numberOfZeroes; loop++ ) { MOVE1BYTE((b->packed),&zero); (b->packed)++; } ...
false
false
false
false
false
0
atombios_blank_crtc(struct drm_crtc *crtc, int state) { struct radeon_crtc *radeon_crtc = to_radeon_crtc(crtc); struct drm_device *dev = crtc->dev; struct radeon_device *rdev = dev->dev_private; int index = GetIndexIntoMasterTable(COMMAND, BlankCRTC); BLANK_CRTC_PS_ALLOCATION args; u32 vga_control = 0; memset(&...
false
false
false
false
false
0
lkbde_irq_mask_set(int d, uint32_t addr, uint32_t mask, uint32_t fmask) { bde_ctrl_t *ctrl; int isr2_dev; unsigned long flags; isr2_dev = d & LKBDE_ISR2_DEV; d &= ~LKBDE_ISR2_DEV; if (!VALID_DEVICE(d)) { return -1; } ctrl = _devices + d; /* Lock is required to synchronize...
false
false
false
false
false
0
lit_(integer rm) { /* System generated locals */ logical ret_val; /* Local variables */ integer i, j, oa; ret_val = TRUE_; /* !ASSUME WINS */ if ((rooms_1.rflag[rm - 1] & RLIGHT) != 0) { return ret_val; } for (i = 1; i <= objcts_1.olnt; ++i) { /* !LOOK FOR LIT OBJ *...
false
false
false
false
false
0
sh_csi2_s_mbus_config(struct v4l2_subdev *sd, const struct v4l2_mbus_config *cfg) { struct sh_csi2 *priv = container_of(sd, struct sh_csi2, subdev); struct soc_camera_device *icd = v4l2_get_subdev_hostdata(sd); struct v4l2_subdev *client_sd = soc_camera_to_subdev(icd); struct v4l2_mbus_config client_cfg = {.ty...
false
false
false
false
false
0
stab_demangle_arg (struct stab_demangle_info *minfo, const char **pp, debug_type **pargs, unsigned int *pcount, unsigned int *palloc) { const char *start; debug_type type; start = *pp; if (! stab_demangle_type (minfo, pp, pargs == NULL ? (debug_type *) NULL : &type) || ! stab_demangle_re...
false
false
false
false
false
0
check_status(int gen_cnt, double avg_fit, double min_fit, double max_fit) { char view_text[150]; if (gen_cnt == 0) sprintf(view_text,"Evaluating first generation"); else sprintf(view_text,"Gen:%d Avg:%5i Min:%5i Max:%5i",gen_cnt,int(avg_fit),int(min_fit),int(max_fit)); if (aw_status(vi...
false
false
false
false
false
0
Draw(wxPaintDC & pdc) { int bgW,bgH; wxRect pieRect; //size for background ops GetSize(&bgW,&bgH); //pie rect respects padding and is centered int maxL = std::min(bgW,bgH) - 2* m_padding; if(m_CanRepaint) { //calc the pie rect coords pieRect.SetLeft(bgW/2 - maxL/2); pieRect.SetTop(bgH/2 - maxL/2); pieR...
false
false
false
false
false
0
dw_mci_exynos_config_hs400(struct dw_mci *host, u32 timing) { struct dw_mci_exynos_priv_data *priv = host->priv; u32 dqs, strobe; /* * Not supported to configure register * related to HS400 */ if (priv->ctrl_type < DW_MCI_TYPE_EXYNOS5420) return; dqs = priv->saved_dqs_en; strobe = priv->saved_strobe_ctr...
false
false
false
false
false
0
varcircles_show (gboolean show, GGobiData * d, displayd * display, ggobid * gg) { GtkWidget *basement = widget_find_by_name (gg->main_window, "BASEMENT"); GtkWidget *parent = (d->vcirc_ui.ebox)->parent; if (show) { /* * Add the ebox for the table of variable circles/rectangles * to...
false
false
false
false
false
0
cyapa_initialize(struct cyapa *cyapa) { int error = 0; cyapa->state = CYAPA_STATE_NO_DEVICE; cyapa->gen = CYAPA_GEN_UNKNOWN; mutex_init(&cyapa->state_sync_lock); /* * Set to hard code default, they will be updated with trackpad set * default values after probe and initialized. */ cyapa->suspend_power_mode...
false
false
false
false
false
0
_6d(K a,K b) //A lot of this is copy/paste from 0: dyadic write { //K3.2 bug: (,`) 6: "chars" -> prints ": No such device or address" //TODO? (1.0) 6: "data" -> stop //-this is a lot like 0: write without the newline business //-if the first argument is an enlisted sym(4) or enlisted -3 then this is append a...
false
false
false
false
false
0
gyrus_admin_acl_get (GyrusAdmin *admin, const gchar *mailbox, gchar **error) { GList *list = NULL; GyrusImapStatus status; GyrusImapAclEntry *entry; gchar *iter, *iter2; gchar *msg = g_strdup_printf (". getacl \"%s\"\n", mailbox); gyrus_admin_write_channel (admin, msg); g_free (msg); status...
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)); QtLuaPrinter *_t = static_cast<QtLuaPrinter *>(_o); switch (_id) { case 0: _t->closing((*reinterpret_cast< QObject*(*)>(_a[1])))...
false
false
false
false
false
0
rl_domove_read_callback (m) _rl_vimotion_cxt *m; { int c, save; c = m->motion; if (member (c, vi_motion)) { #if defined (READLINE_CALLBACKS) /* If we just read a vi-mode motion command numeric argument, turn off the `reading numeric arg' state */ if (RL_ISSTATE (RL_STATE_CALLBACK) && RL_V...
false
false
false
false
false
0
strmap_iter_next_rmv(strmap_t *map, strmap_iter_t *iter) { strmap_entry_t *rmv; tor_assert(map); tor_assert(iter); tor_assert(*iter); rmv = *iter; iter = HT_NEXT_RMV(strmap_impl, &map->head, iter); tor_free(rmv->key); tor_free(rmv); return iter; }
false
false
false
false
false
0
getOppositeBranchOpc(unsigned Opc) const { switch (Opc) { default: llvm_unreachable("Illegal opcode!"); case Mips::BEQ: return Mips::BNE; case Mips::BNE: return Mips::BEQ; case Mips::BGTZ: return Mips::BLEZ; case Mips::BGEZ: return Mips::BLTZ; case Mips::BLTZ: return Mips::BGEZ; ca...
false
false
false
false
false
0
GetCompilerIndex(Compiler* compiler) { for (size_t i = 0; i < Compilers.GetCount(); ++i) { if (Compilers[i] == compiler) return i; } return -1; }
false
false
false
false
false
0
replace_path(struct path *p, const struct path *old, const struct path *new) { if (likely(p->dentry != old->dentry || p->mnt != old->mnt)) return 0; *p = *new; return 1; }
false
false
false
false
false
0
sig_gen_skeyid(struct exchange *exchange, size_t *sz) { struct prf *prf; struct ipsec_exch *ie = exchange->data; u_int8_t *skeyid; unsigned char *key; key = malloc(exchange->nonce_i_len + exchange->nonce_r_len); if (!key) return 0; memcpy(key, exchange->nonce_i, exchange->nonce_i_len); memcpy(key ...
false
false
false
false
false
0
SetDefaultACLsInSchemas(InternalDefaultACL *iacls, List *nspnames) { if (nspnames == NIL) { /* Set database-wide permissions if no schema was specified */ iacls->nspid = InvalidOid; SetDefaultACL(iacls); } else { /* Look up the schema OIDs and set permissions for each one */ ListCell *nspcell; fore...
false
false
false
false
false
0
on_roster_selection_changed (G_GNUC_UNUSED GtkWidget* view, gpointer self) { EkigaMainWindow *mw = EKIGA_MAIN_WINDOW (self); gint section; GtkWidget* menu = gtk_menu_get_widget (mw->priv->main_menu, "contact"); if (GTK_IS_MENU_ITEM (menu)) { section = gtk_notebook_get_current_page (GTK_NOTEBOOK (m...
false
false
false
false
false
0
H5C_reset_cache_hit_rate_stats(H5C_t * cache_ptr) { herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(FAIL) if ( ( cache_ptr == NULL ) || ( cache_ptr->magic != H5C__H5C_T_MAGIC ) ) { HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad cache_ptr on entry.") } cache_ptr->cache...
false
false
false
false
false
0
btree_next(btree_iterator iter) { int ret = btree_deref(iter); if (ret) { iter->k++; if (iter->node->depth) branch_begin(iter); } return ret; }
false
false
false
false
false
0
deriveOrd(t) /* make binding for derived compare*/ Type t; { /* for some TUPLE or DATATYPE t */ List alts = NIL; if (isEnumType(t)) { /* special case for enumerations */ alts = mkVarAlts(tycon(t).line,nameConCmp); } else if (isTycon(t)) { /* deal with type constrs */ List cs = tycon(t).defn;...
false
false
false
false
false
0
isAdaptive() const { for (unsigned int ch = 0; ch < _methods.size(); ++ch) { if (_methods[ch]->isAdaptive()) return true; } return false; }
false
false
false
false
false
0
char_hex_encode(char *dest, size_t dest_len, const char *src, size_t len) { int i, n = dest_len / 2 >= len ? len : dest_len / 2; for (i = 0; i < n; i++) snprintf(dest + i * 2, 3, "%02X", char_def_alphabet_encode(src[i])); return len * 2; }
false
false
false
false
false
0
_gck_call_async_prep (gpointer object, gpointer cb_object, gpointer perform, gpointer complete, gsize args_size, gpointer destroy) { GckArguments *args; GckCall *call; g_assert (!object || G_IS_OBJECT (object)); g_assert (!cb_object || G_IS_OBJECT (cb_object)); g_assert (perform); if (!de...
false
false
false
false
false
0
close(Block *& c) { tables_of_identifier.erase(itabl); c=fatherblock; if (fatherblock) {fatherblock->topmax=topmax; fatherblock->top=top;} CC_F0 r; r = table.destroy(); delete this; return r;}
false
false
false
false
false
0
cfclose(cfp *fp) { int result; if (fp == NULL) { errno = EBADF; return EOF; } #ifdef HAVE_LIBZ if (fp->compressedfp) { result = gzclose(fp->compressedfp); fp->compressedfp = NULL; } else #endif { result = fclose(fp->uncompressedfp); fp->uncompressedfp = NULL; } free_keep_errno(fp); return re...
false
false
false
false
false
0
array_init_array(array *src) { size_t i; array *a = array_init(); a->used = src->used; a->size = src->size; a->next_power_of_2 = src->next_power_of_2; a->unique_ndx = src->unique_ndx; a->data = malloc(sizeof(*src->data) * src->size); for (i = 0; i < src->size; i++) { if (src->data[i]) a->data[i] = src->data...
false
false
false
false
true
1
fts_open(char * const *argv, int options, FTS_OPEN_TYPE_ARG3(compar)) { FTS *sp; FTSENT *p, *root; int nitems; FTSENT *parent, *tmp = NULL; size_t len; debug("fts_open({\"%s\", ...}, %d, &compar)", **argv, options); /* Options check. */ if (options &...
false
false
false
false
true
1
e2_tree_find_iter_from_str_simple (GtkTreeModel *model, gint column, const gchar *search, GtkTreeIter *iter, gboolean with_children) { GtkTreeIter backup; backup = *iter; do { GtkTreeIter iter2; gchar *value; gtk_tree_model_get (model, iter, column, &value, -1); if (value == NULL) continue; if (g_str_...
false
false
false
false
false
0
Interpolator_Print (Interpolator interp, struct prt_info *p) { Type t; Category c; int rank, shape[MAXRANK]; if(!DXGetType((Object)interp, &t, &c, &rank, shape)) { DXMessage(" has no type information\n"); return; } DXMessage(" for "); pinfo(0, 0, t, c, rank, shape, p->level); return...
false
false
false
false
false
0
set_message_state(struct gl_context *ctx, enum mesa_debug_source source, enum mesa_debug_type type, GLuint id, GLboolean enabled) { GLint gstack = ctx->Debug.GroupStackDepth; struct gl_debug_namespace *nspace = &ctx->Debug.Namespaces[gstack][source][t...
false
false
false
false
false
0
quirk_tc86c001_ide(struct pci_dev *dev) { struct resource *r = &dev->resource[0]; if (r->start & 0x8) { r->flags |= IORESOURCE_UNSET; r->start = 0; r->end = 0xf; } }
false
false
false
false
false
0
construct(const char *name) { P16C62 *p = new P16C62(name); cout << " c62 construct\n"; p->create(); p->create_invalid_registers (); p->create_symbols(); return p; }
false
false
false
false
false
0
vme_unregister_bridge(struct vme_bridge *bridge) { struct vme_dev *vdev; struct vme_dev *tmp; mutex_lock(&vme_buses_lock); vme_bus_numbers &= ~(1 << bridge->num); list_for_each_entry_safe(vdev, tmp, &bridge->devices, bridge_list) { list_del(&vdev->drv_list); list_del(&vdev->bridge_list); device_unregister(&...
false
false
false
false
false
0
theme_format_expand_get(THEME_REC *theme, const char **format) { GString *str; char *ret, dummy; int braces = 1; /* we start with one brace opened */ str = g_string_new(NULL); while (**format != '\0' && braces != 0) { if (**format == '{') braces++; else if (**format == '}') braces--; else if ((braces ...
false
false
false
false
false
0
__nfs3_queue_call_state (struct inode_op_queue *inode_q, nfs3_call_state_t *cs) { int ret = -1; if (!inode_q) goto err; pthread_mutex_lock (&inode_q->qlock); { if (list_empty (&inode_q->opq)) { gf_log (GF_NFS3, GF_LOG_TRACE, "...
false
false
false
false
false
0
handle_redirect (char *args, size_t len) { static List *redirects = NULL; TRACE (TRACE_FUNCTION, "handle_redirect (%s)", args); if (redirects && findnode (redirects, args)) error (1, 0, "`Redirect' loop detected. Server misconfiguration?"); else { if (!redirects) redirects = getlist(); push_st...
false
false
false
false
false
0
mlpx_update (chn_t *ch) { int id = ch->id; if (ch->flags & CHN_ERROR) { /* some read/write/logfile/poll error */ /* currently we do not report this */ /* FIXME: perhaps we need to close the channel */ /* if we cannot write the logfile? */ /* clear flags */ ch->flags &= ~(CHN_ERROR); } if (ch->f...
false
false
false
false
false
0
open(const std::string& path) { #if defined(_SYS_MSVC_) || defined(_SYS_MINGW_) _assert_(true); DirStreamCore* core = (DirStreamCore*)opq_; ScopedMutex lock(&core->alock); if (core->dh) return false; std::string dpath = path; size_t plen = path.size(); if (plen < 1 || path[plen-1] != File::PATHCHR) dpath....
false
false
false
false
false
0
seq_equalizer(int bass, int treble) { fprintf(stderr, "equalizer = %d %d\n", bass, treble); AWE_EQUALIZER(awe_dev, bass, treble); if (!buffering) seqbuf_dump(); }
false
false
false
false
false
0
setSubjectKeyIdentifier( UINT8* a_value, UINT32 a_valueLen ) { SINT32 ret = E_UNKNOWN; ASN1_OCTET_STRING* skid = NULL; skid = ASN1_OCTET_STRING_new(); if(NULL == skid) goto end; ASN1_OCTET_STRING_set(skid, a_value, a_valueLen); if( X509_add1_ext_i2d(m_pCert, NID_subject_key_identifier, skid,...
false
false
false
false
false
0
mx_label_set_y_align (MxLabel *label, MxAlign align) { g_return_if_fail (MX_IS_LABEL (label)); if (align != label->priv->y_align) { label->priv->y_align = align; clutter_actor_queue_relayout (CLUTTER_ACTOR (label)); g_object_notify (G_OBJECT (label), "y-align"); ...
false
false
false
false
false
0
Run_Audio_Player_Using_Directory (void) { GList *l; GList *path_list = NULL; for (l = g_list_first (ETCore->ETFileList); l != NULL; l = g_list_next (l)) { ET_File *etfile = (ET_File *)l->data; gchar *path = ((File_Name *)etfile->FileNameCur->data)->value; path_list = g_list_prep...
false
false
false
false
false
0
gfx_v7_0_select_se_sh(struct amdgpu_device *adev, u32 se_num, u32 sh_num) { u32 data = GRBM_GFX_INDEX__INSTANCE_BROADCAST_WRITES_MASK; if ((se_num == 0xffffffff) && (sh_num == 0xffffffff)) data |= GRBM_GFX_INDEX__SH_BROADCAST_WRITES_MASK | GRBM_GFX_INDEX__SE_BROADCAST_WRITES_MASK; else if (se_num == 0xffffffff...
false
false
false
false
false
0
max_v(unsigned short *vals,int n) { unsigned short maxv=vals[0]; for(int i=1;i<n;i++) { unsigned short v=vals[i]; if(v>maxv){maxv=v;} } return(maxv); }
false
false
false
false
false
0
restore_non_blocking_mode (ACE_HANDLE handle, int val) { if (ACE_BIT_DISABLED (val, ACE_NONBLOCK)) { // Save/restore errno. ACE_Errno_Guard error (errno); // Only disable ACE_NONBLOCK if we weren't in non-blocking mode // originally. ACE::clr_flags (handle, ACE_NONBLOCK); } }
false
false
false
false
false
0
png_do_dither(png_row_infop row_info, png_bytep row, png_bytep palette_lookup, png_bytep dither_lookup) { png_bytep sp, dp; png_uint_32 i; png_uint_32 row_width=row_info->width; png_debug(1, "in png_do_dither"); #ifdef PNG_USELESS_TESTS_SUPPORTED if (row != NULL && row_info != NULL) #endif { ...
false
false
false
false
false
0
rgb_to_color_common8 (int r, int g, int b) { rgb_t color; hsv_t hsv; color.red = r; color.green = g; color.blue = b; rgb_to_hsv (color, &hsv); if (hsv.saturation < 0.065f) { /* Greyscale approximation. */ float luminance = color_luminance (r, g, b); if (luminance < 0.500f) ret...
false
false
false
false
false
0
poll() { bool action; unsigned int i; static double last_time = 0; if (!gstate.clock_change && gstate.now - last_time < TASK_POLL_PERIOD) return false; last_time = gstate.now; action = check_app_exited(); send_heartbeats(); send_trickle_downs(); process_control_poll(); action |=...
false
false
false
false
false
0
stats_delay(struct Client *source_p) { struct nd_entry *nd; struct DictionaryIter iter; DICTIONARY_FOREACH(nd, &iter, nd_dict) { sendto_one_notice(source_p, ":Delaying: %s for %ld", nd->name, (long) nd->expire); } }
false
false
false
false
false
0
ast_variables_dup(struct ast_variable *var) { struct ast_variable *cloned; struct ast_variable *tmp; if (!(cloned = ast_variable_new(var->name, var->value, var->file))) { return NULL; } tmp = cloned; while ((var = var->next)) { if (!(tmp->next = ast_variable_new(var->name, var->value, var->file))) { ast...
false
false
false
false
false
0
enumerate(const std::string& key, Keys& range) const { std::string cKey(key); if (!cKey.empty()) cKey += '.'; std::string::size_type keyLen = cKey.length(); if (keyLen < _toPrefix.length()) { if (_toPrefix.compare(0, keyLen, cKey) == 0) { std::string::size_type pos = _toPrefix.find_first_of('.', keyLen); ...
false
false
false
false
false
0
zoran_open_init_params (struct zoran *zr) { int i; /* User must explicitly set a window */ zr->overlay_settings.is_set = 0; zr->overlay_mask = NULL; zr->overlay_active = ZORAN_FREE; zr->v4l_memgrab_active = 0; zr->v4l_overlay_active = 0; zr->v4l_grab_frame = NO_GRAB_ACTIVE; zr->v4l_grab_seq = 0; zr->v4l_set...
false
false
false
false
false
0
GC_start_world() { pthread_t my_thread = pthread_self(); register int i; register GC_thread p; register int n_live_threads = 0; register int result; #ifdef GC_NETBSD_THREADS_WORKAROUND int code; #endif # if DEBUG_THREADS GC_printf0("World starting\n"); # endif GC_world_is_stopped...
false
false
false
false
false
0
IsBoundsCleared(const Image *image1, const Image *image2,RectangleInfo *bounds,ExceptionInfo *exception) { register ssize_t x; register const PixelPacket *p, *q; ssize_t y; #if 0 assert(image1->matte==MagickTrue); assert(image2->matte==MagickTrue); #endif if ( bounds->x< 0 ) return(Mag...
false
false
false
false
false
0
lua_dofile (char *filename) { int status; int c; FILE *f = (filename == NULL) ? stdin : fopen(filename, "r"); if (f == NULL) return 2; luaI_setparsedfile(filename?filename:"(stdin)"); c = fgetc(f); ungetc(c, f); if (c == ID_CHUNK) { f = freopen(filename, "rb", f); /* set binary mode */ stat...
false
false
false
false
true
1
initLayout(QFileInfoList & list) { m_tabWidget = new QTabWidget(); m_general = new QWidget(); m_breadboard = new QWidget(); m_schematic = new QWidget(); m_pcb = new QWidget(); m_tabWidget->addTab(m_general, tr("General")); m_tabWidget->addTab(m_breadboard, m_viewInfoThings[0].viewName); m_tabWidget->addTab(m_s...
false
false
false
false
false
0
more(const Classifier_Program &c, const String &type_name, StringAccum &header, StringAccum &source) { if (c.unsafe_length_output_everything >= 0) return; header << " int length_checked_match(const Packet *p) const;\n"; source << "int\n" << type_name << "::length_checked_match(const Packet *p) cons...
false
false
false
false
false
0
_tpf_persona_store_ensure_persona_for_id_data_free (gpointer _data) { TpfPersonaStoreEnsurePersonaForIdData* _data_; _data_ = _data; _g_free0 (_data_->contact_id); _g_object_unref0 (_data_->result); _g_object_unref0 (_data_->self); g_slice_free (TpfPersonaStoreEnsurePersonaForIdData, _data_); }
false
false
false
false
false
0
deleteCube(VimosCube *Cube) { if (Cube != NULL) { deleteAllDescriptors(Cube->descs); if (Cube->data != NULL) { pil_free(Cube->data); } pil_free(Cube); } }
false
false
false
false
false
0
kdb_initbptab(void) { int i; kdb_bp_t *bp; /* * First time initialization. */ memset(&kdb_breakpoints, '\0', sizeof(kdb_breakpoints)); for (i = 0, bp = kdb_breakpoints; i < KDB_MAXBPT; i++, bp++) bp->bp_free = 1; kdb_register_flags("bp", kdb_bp, "[<vaddr>]", "Set/Display breakpoints", 0, KDB_ENABLE_F...
false
false
false
false
false
0
makeRightToLeft() { QTextBlockFormat format; format.setLayoutDirection(Qt::RightToLeft); QTextCursor cursor = textCursor(); cursor.mergeBlockFormat(format); setTextCursor(cursor); setFocus(); d->activateRichText(); }
false
false
false
false
false
0
recon_read_dir(char *zPath){ DIR *d; struct dirent *pEntry; Blob aContent; /* content of the just read artifact */ static int nFileRead = 0; void *zUnicodePath; char *zUtf8Name; zUnicodePath = fossil_utf8_to_filename(zPath); d = opendir(zUnicodePath); if( d ){ while( (pEntry=readdir(d))!=0 ){ ...
false
false
false
false
false
0
uih_playdefpalette(struct uih_context *uih, int shift) { if (uih->zengine->fractalc->palette == NULL) return; if (mkdefaultpalette(uih->zengine->fractalc->palette) != 0) { uih_newimage(uih); } uih->palettetype = 0; uih->palettechanged = 1; if (shiftpalette(uih->zengine->fractalc->palette, shif...
false
false
false
false
false
0
action_duplicate_callback (GtkAction *action, gpointer callback_data) { NemoView *view; GList *selection; GArray *selected_item_locations; view = NEMO_VIEW (callback_data); selection = nemo_view_get_selection_for_file_transfer (view); if (selection_not_empty_in_menu_callback (v...
false
false
false
false
false
0
tftp_parse_option_ack(tftp_state_data_t *state, const char *ptr, int len) { const char *tmp = ptr; struct SessionHandle *data = state->conn->data; /* if OACK doesn't contain blksize option, the default (512) must be used */ state->blksize = TFTP_BLKSIZE_DEFAULT; while(t...
false
false
false
false
false
0
thread_startup (MonoProfiler *prof, uintptr_t tid) { MonoInternalThread *thread = mono_thread_internal_current (); MonoInternalThread *old_thread; DebuggerTlsData *tls; if (mono_native_thread_id_equals (MONO_UINT_TO_NATIVE_THREAD_ID (tid), debugger_thread_id)) return; g_assert (mono_native_thread_id_equals (MO...
false
false
false
false
false
0
fs_raw_conference_class_init (FsRawConferenceClass * klass) { GObjectClass *gobject_class = G_OBJECT_CLASS (klass); GstElementClass *gstelement_class = GST_ELEMENT_CLASS (klass); FsConferenceClass *baseconf_class = FS_CONFERENCE_CLASS (klass); GstBinClass *gstbin_class = GST_BIN_CLASS (klass); g_type_class_a...
false
false
false
false
false
0
reshCountType ( resOps * ops ) { int i, nsp, countType = 0; xassert ( ops ); LIST_INIT(); LIST_LOCK(); nsp = namespaceGetActive (); for ( i = 0; i < resHList[nsp].size; i++ ) if ( resHList[nsp].resources[i].val ) if ( resHList[nsp].resources[i].ops == ops ) countType++; LIST_UNLOCK...
false
false
false
false
false
0
try_query_info (GVfsBackend *backend, GVfsJobQueryInfo *job, const char *filename, GFileQueryInfoFlags flags, GFileInfo *info, GFileAttributeMatcher *matcher) { ComputerFile *file; file = lookup (G_VFS_BACKEND_COMPUTER (backend), ...
false
false
false
false
false
0
parse_genome(const string & filename, const string & outfile, int species_id, string pam) { cerr << "Loading genome from:\n" << filename << "\n"; ifstream text( filename ); ofstream out ( outfile ); if ( ! out.is_open() ) { cerr << "Error opening output file: " << outfile << endl; throw...
false
false
false
false
false
0
cb_strings_destroy_notify (gpointer data) { char **str = (char **) data; unsigned i = 0; while (str[i] != NULL) g_free (str[i++]); g_free (str); }
false
false
false
false
false
0
qh_link_async(struct fotg210_hcd *fotg210, struct fotg210_qh *qh) { __hc32 dma = QH_NEXT(fotg210, qh->qh_dma); struct fotg210_qh *head; /* Don't link a QH if there's a Clear-TT-Buffer pending */ if (unlikely(qh->clearing_tt)) return; WARN_ON(qh->qh_state != QH_STATE_IDLE); /* clear halt and/or toggle; and ma...
false
false
false
false
false
0
hpsa_update_device_info(struct ctlr_info *h, unsigned char scsi3addr[], struct hpsa_scsi_dev_t *this_device, unsigned char *is_OBDR_device) { #define OBDR_SIG_OFFSET 43 #define OBDR_TAPE_SIG "$DR-10" #define OBDR_SIG_LEN (sizeof(OBDR_TAPE_SIG) - 1) #define OBDR_TAPE_INQ_SIZE (OBDR_SIG_OFFSET + OBDR_SIG_LEN) unsign...
false
true
false
false
false
1
scan_for_XLLs_and_register_functions (const gchar *dir_name) { GDir *dir = g_dir_open (dir_name, 0, NULL); gchar *full_entry_name; const gchar *d_name; struct stat d_info; GModule *handle; int stat_success; if (NULL != dir) { while ((d_name = g_dir_read_name (dir)) != NULL) { if ( ! (strcmp (d_name, ".") ==...
false
false
false
false
false
0
do_range_limit(timelib_sll start, timelib_sll end, timelib_sll adj, timelib_sll *a, timelib_sll *b) { if (*a < start) { *b -= (start - *a - 1) / adj + 1; *a += adj * ((start - *a - 1) / adj + 1); } if (*a >= end) { *b += *a / adj; *a -= adj * (*a / adj); } return 0; }
false
false
false
false
false
0