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
reapchild (int signo _GL_UNUSED_PARAMETER) { int save_errno = errno; while (waitpid (-1, NULL, WNOHANG) > 0) ; errno = save_errno; }
false
false
false
false
false
0
decide(const InternalLoggingEvent& event) const { if((logLevelMin != NOT_SET_LOG_LEVEL) && (event.getLogLevel() < logLevelMin)) { // priority of event is less than minimum return DENY; } if((logLevelMax != NOT_SET_LOG_LEVEL) && (event.getLogLevel() > logLevelMax)) { // priority of e...
false
false
false
false
false
0
OnMessage(talk_base::Message *pmsg) { switch (pmsg->message_id) { case MSG_ENABLE: EnableMedia_w(); break; case MSG_DISABLE: DisableMedia_w(); break; case MSG_MUTE: MuteMedia_w(); break; case MSG_UNMUTE: UnmuteMedia_w(); break; case MSG_SETLOCALCONT...
false
false
false
false
false
0
e_ews_folder_utils_pick_color_spec (gint move_by, gboolean around_middle) { static gint color_mover = 0; static gint color_indexer = -1; const guint32 colors[] = { 0x1464ae, /* dark blue */ 0x14ae64, /* dark green */ 0xae1464, /* dark red */ 0 }; guint32 color; if (mov...
false
false
false
false
false
0
dot_tag_name(FILE *f, Tag *tag) { if (tag->parent) { dot_ref_name (f, tag->parent); fprintf (f, " > "); } fprintf (f, "%s", tag->name); }
false
false
false
false
false
0
nrrdResampleRangeFullSet(NrrdResampleContext *rsmc, unsigned int axIdx) { static const char me[]="nrrdResampleRangeFullSet"; double min, max; int center; PER_AXIS_ERROR_CHECK; /* HEY trick is to figure out the axis's centering, and to make sure its the same code as used elsewhe...
false
false
false
false
false
0
ConditionalLockBufferForCleanup(Buffer buffer) { volatile BufferDesc *bufHdr; Assert(BufferIsValid(buffer)); if (BufferIsLocal(buffer)) { /* There should be exactly one pin */ Assert(LocalRefCount[-buffer - 1] > 0); if (LocalRefCount[-buffer - 1] != 1) return false; /* Nobody else to wait for */ retu...
false
false
false
false
false
0
menu_key_pressed(GtkWidget *history_menu, GdkEventKey *event, gpointer user_data) { switch (event->keyval) { case XK_1: case XK_KP_1: item_selected((GtkMenuItem*)history_menu, GINT_TO_POINTER(0)); gtk_widget_destroy(history_menu); break; case XK_2: case XK_KP_2: item_selected((...
false
false
false
false
false
0
delete(void) { PRECOND(pg_uri); /* skip if put_get failed. */ ONV(ne_delete(i_session, pg_uri), ("DELETE on normal resource failed: %s", ne_get_error(i_session))); return OK; }
false
false
false
false
false
0
PL_Base64Decode ( const char *src, PRUint32 srclen, char *dest ) { PRStatus status; PRBool allocated = PR_FALSE; if( (char *)0 == src ) { return (char *)0; } if( 0 == srclen ) { size_t len = strlen(src); srclen = len; /* Detect truncatio...
false
false
false
false
false
0
speller(const char *seed, fp_speller_t fp, void *fparg, const char *charset) { size_t seedlen = strlen(seed); for (int distance = 0; distance < 2; distance++) { void *p = spellerX(seed, seedlen, fp, fparg, charset, distance); if (p) return p; // if (seedlen > 10) // break...
false
false
false
false
false
0
Reset() override { boss_emerald_dragonAI::Reset(); m_uiArcaneBlastTimer = 12000; m_uiBellowingRoarTimer = 30000; m_uiShadesTimeoutTimer = 0; // The time that Taerar is banished m_uiShadesDead = 0; // Remove Unselectable if needed if (...
false
false
false
false
false
0
addError( ErrorXML & error, bool lastError ) throw( MissingException ) { bool firstpara = true; string tmp; string & errNumber = error.GetErrNumber(); string & errName = error.GetErrName(); const char * paragraph; paragraph = error.GetDocuParagraph(); while ( para...
false
false
false
false
false
0
NewIterator(TreeMap *tree) { struct TreeMapIterator *result = tree->Allocator->malloc(sizeof(struct TreeMapIterator)); if (result == NULL) return NULL; memset(result,0,sizeof(struct TreeMapIterator)); result->it.GetNext = GetNext; result->it.GetPrevious = GetPrevious; result->it.GetFirst = ...
false
false
false
false
false
0
localserver(const struct optstruct *opts) { struct sockaddr_un server; int sockfd, backlog; STATBUF foo; char *estr; memset((char *) &server, 0, sizeof(server)); server.sun_family = AF_UNIX; strncpy(server.sun_path, optget(opts, "LocalSocket")->strarg, sizeof(server.sun_path)); server.sun_path[size...
false
true
false
false
false
1
FBKbRepaint(x,y) int x,y; { if (!doing_edit) return; editX = x; editY = y; MFBSetColor(editCc); textcursor(editX+(int)(editC-editBuf)*FB.fFontWidth,editY); MFBSetColor(editFg); MFBText(editBuf,editX,editY,0); }
false
false
false
false
false
0
x11CursorShape(const QString &name) { static QHash<QString, int> shapes; // A font cursor is created from two glyphs; a shape glyph and a mask glyph // stored in pairs in the font, with the shape glyph first. There's only one // name for each pair. This function always returns the i...
false
false
false
false
false
0
irplib_polynomial_eval_2_max(double p2, double p1, double p0, cpl_boolean is_c, double x1, double x2) { double res; if (is_c) { res = fabs(p0 + x1 * (p1 + x1 * p2) - p2 * x2 * x2); irplib_trace(); /* OK */ ...
false
false
false
false
false
0
isdn_net_receive(struct net_device *ndev, struct sk_buff *skb) { isdn_net_local *lp = netdev_priv(ndev); isdn_net_local *olp = lp; /* original 'lp' */ #ifdef CONFIG_ISDN_X25 struct concap_proto *cprot = lp->netdev->cprot; #endif lp->transcount += skb->len; lp->stats.rx_packets++; lp->stats.rx_bytes += skb->len; ...
false
false
false
false
false
0
output_keyword_entry (KeywordExt *temp, int stringpool_index, const char *indent) { if (option[TYPE]) output_line_directive (temp->_lineno); printf ("%s ", indent); if (option[TYPE]) printf ("{"); if (option[SHAREDLIB]) printf ("(int)(long)&((struct %s_t *)0)->%s_str%d", option.get_st...
false
false
false
false
false
0
agnameof(void *obj) { Agraph_t *g; char *rv; static char buf[32]; /* perform internal lookup first */ g = agraphof(obj); if ((rv = aginternalmapprint(g, AGTYPE(obj), AGID(obj)))) return rv; if (AGDISC(g, id)->print) { if ((rv = AGDISC(g, id)->print(AGCLOS(g, id), AGTYPE(obj), AGID(...
false
false
false
false
false
0
gdither_new(GDitherType type, uint32_t channels, GDitherSize bit_depth, int dither_depth) { GDither s; s = (GDither)calloc(1, sizeof(struct GDither_s)); s->type = type; s->channels = channels; s->bit_depth = (int)bit_depth; if (dither_depth <= 0 || dither_depth > (int)bit_depth) { dith...
false
false
false
false
false
0
ceph_finish_lookup(struct ceph_mds_request *req, struct dentry *dentry, int err) { if (err == -ENOENT) { /* no trace? */ err = 0; if (!req->r_reply_info.head->is_dentry) { dout("ENOENT and no trace, dentry %p inode %p\n", dentry, d_inode(dentry)); if (d_really_is_positive(dentry)) { d_dro...
false
false
false
false
false
0
ThunderDecode(TIFF* tif, tidata_t op, tsize_t maxpixels) { register unsigned char *bp; register tsize_t cc; unsigned int lastpixel; tsize_t npixels; bp = (unsigned char *)tif->tif_rawcp; cc = tif->tif_rawcc; lastpixel = 0; npixels = 0; while (cc >...
false
false
false
false
false
0
pch_gbe_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd) { struct pch_gbe_adapter *adapter = netdev_priv(netdev); int ret; ret = mii_ethtool_gset(&adapter->mii, ecmd); ecmd->supported &= ~(SUPPORTED_TP | SUPPORTED_1000baseT_Half); ecmd->advertising &= ~(ADVERTISED_TP | ADVERTISED_1000baseT_H...
false
false
false
false
false
0
edac_report_setup(char *str) { if (!str) return -EINVAL; if (!strncmp(str, "on", 2)) set_edac_report_status(EDAC_REPORTING_ENABLED); else if (!strncmp(str, "off", 3)) set_edac_report_status(EDAC_REPORTING_DISABLED); else if (!strncmp(str, "force", 5)) set_edac_report_status(EDAC_REPORTING_FORCE); return ...
false
false
false
false
false
0
tree_selection_collect_data_helper(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer user_data) { collect_data_struct_t *cdata = user_data; /* Collect the data of the parent row */ tree_selection_collect_data_record(model, iter, cdata, TRUE); /* If the row is not expanded and there are any chil...
false
false
false
false
false
0
hdrvc_get_driver_name(char *buf, int bufsz) { int ret; struct usersmmsg msg; #ifdef HDRVC_KERNEL if (kernel_mode) { struct hdlcdrv_ioctl bhi; ret = hdrvc_hdlcdrv_ioctl(HDLCDRVCTL_DRIVERNAME, &bhi); if (ret < 0) return ret; strncpy(buf, bhi.data.modename, bufsz); return 0; } #endif /* HDRVC_KERNEL */ ...
false
true
false
false
false
1
clear_ban_cache(struct Channel *chptr) { dlink_node *ptr = NULL; DLINK_FOREACH(ptr, chptr->members.head) { struct Membership *ms = ptr->data; if (MyConnect(ms->client_p)) ms->flags &= ~(CHFL_BAN_SILENCED|CHFL_BAN_CHECKED); } }
false
false
false
false
false
0
_gcry_mpi_point_get (gcry_mpi_t x, gcry_mpi_t y, gcry_mpi_t z, mpi_point_t point) { if (x) mpi_set (x, point->x); if (y) mpi_set (y, point->y); if (z) mpi_set (z, point->z); }
false
false
false
false
false
0
WritePoints(std::ofstream* ofs, int ff, int lf, Acquisition::Pointer acq, PointCollection::Pointer points) { *ofs << "Time"; // Label for (btk::PointCollection::ConstIterator it = points->Begin() ; it != points->End() ; ++it) *ofs << this->m_Separator << (*it)->GetLabel() << this->m_Separator << thi...
false
false
false
false
false
0
sub_ilc(ilc, cd, indx) struct il_c *ilc; struct code *cd; int indx; { struct il_c *ilc1; struct code *cd1; int n; /* * Count the number of pieces of C code to process. */ n = 0; for (ilc1 = ilc; ilc1 != NULL; ilc1 = ilc1->next) ++n; /* * If there is only one piece of code, pl...
false
false
false
false
false
0
get_index(guint64 event_time) { if (!bHaveEvents) return 0; unsigned long start_index, search_index, bstep; start_index = (index + 1) & max_events; bstep = (max_events+1) >> 1; search_index = (start_index + bstep) & max_events; bstep >>= 1; // Binary search for the event time: do { if(event_...
false
false
false
false
false
0
aim_icq_getalias(aim_session_t *sess, const char *uin) { aim_conn_t *conn; aim_frame_t *fr; aim_snacid_t snacid; int bslen; struct aim_icq_info *info; if (!uin || uin[0] < '0' || uin[0] > '9') return -EINVAL; if (!sess || !(conn = aim_conn_findbygroup(sess, 0x0015))) return -EINVAL; bslen = 2 + 4 + 2 + 2...
false
false
false
false
true
1
cell_value(unsigned char c, unsigned int age) { if (!c) { return 0; } else if (c > age) { return (3); } else { return (1); } }
false
false
false
false
false
0
md_final(MD_HANDLE a) { struct md_digest_list_s *r; if( a->finalized ) return; if( a->bufcount ) md_write( a, NULL, 0 ); for(r=a->list; r; r = r->next ) { (*r->final)( &r->context.c ); } a->finalized = 1; }
false
false
false
false
false
0
gst_logoinsert_set_data (GstLogoinsert * li, GstBuffer * buffer) { if (li->buffer) gst_buffer_unref (li->buffer); /* steals the reference */ li->buffer = buffer; if (li->overlay_frame) { cog_frame_unref (li->overlay_frame); li->overlay_frame = NULL; } if (li->alpha_frame) { cog_frame_unref...
false
false
false
false
false
0
applicable0(const hc2hc_solver *ego, const problem *p_, planner *plnr) { const problem_rdft *p = (const problem_rdft *) p_; INT r; return (1 && p->sz->rnk == 1 && p->vecsz->rnk <= 1 && (/* either the problem is R2HC, which is solved by DIT */ (p->kind[0] == R2HC) || /* or...
false
false
false
false
false
0
JS_HasProperty(JSContext *cx, JSObject *obj, const char *name, JSBool *foundp) { JSBool ok; JSObject *obj2; JSProperty *prop; CHECK_REQUEST(cx); ok = LookupProperty(cx, obj, name, JSRESOLVE_QUALIFIED | JSRESOLVE_DETECTING, &obj2, &prop); if (ok) {...
false
false
false
false
false
0
treesearch(node_t * v) { edge_t *e; for (e = agfstout(G, v); e; e = agnxtout(G, e)) { if ((ND_mark(aghead(e)) == FALSE) && (SLACK(e) == 0)) { add_tree_edge(e); if ((Tree_edge.size == N_nodes - 1) || treesearch(aghead(e))) return TRUE; } } for (e = agfstin(G, v); e; e = agnxtin(G, e)) { i...
false
false
false
false
false
0
createStructType( DIScope *Context, StringRef Name, DIFile *File, unsigned LineNumber, uint64_t SizeInBits, uint64_t AlignInBits, unsigned Flags, DIType *DerivedFrom, DINodeArray Elements, unsigned RunTimeLang, DIType *VTableHolder, StringRef UniqueIdentifier) { auto *R = DICompositeType::get( V...
false
false
false
false
false
0
ReportHash(TCHAR* tszReport, REPORT_TYPE rtReportType) const { if(tszReport == NULL) return false; TCHAR tszTemp[16]; if((rtReportType == REPORT_HEX) || (rtReportType == REPORT_HEX_SHORT)) { _sntprintf(tszTemp, 15, _T("%02X"), m_digest[0]); _tcscpy(tszReport, tszTemp); const TCHAR* lpFmt = ((rtR...
false
false
false
false
false
0
have_any_ready_slaves (NMDevice *device, const GSList *slaves) { const GSList *iter; /* Any enslaved slave is "ready" in the generic case as it's * at least >= NM_DEVCIE_STATE_IP_CONFIG and has had Layer 2 * properties set up. */ for (iter = slaves; iter; iter = g_slist_next (iter)) { if (nm_device_get_ensl...
false
false
false
false
false
0
write(raw_ostream &OS) { encodeULEB128(Filenames.size(), OS); for (const auto &Filename : Filenames) { encodeULEB128(Filename.size(), OS); OS << Filename; } }
false
false
false
false
false
0
elapsed() const { double elapsed = 0.0; #if defined(QWT_HIGH_RESOLUTION_CLOCK) if ( d_data->clock ) { if ( !d_data->clock->isNull() ) elapsed = d_data->clock->elapsed(); return elapsed; } #endif if ( !d_data->time.isNull() ) elapsed = d_data->time.elapsed(); ...
false
false
false
false
false
0
check_format_any (struct bfd *abfd, bfd_format format) { char** targets = NULL; if (bfd_check_format_matches (abfd, format, &targets)) return TRUE; if (targets) { bfd_find_target (targets[0], abfd); return bfd_check_format (abfd, format); } return FALSE; }
false
false
false
false
false
0
think_assign_better_overseer(Town* targetTown) { //----- check if there is already a queued action -----// Nation* ownNation = nation_array[nation_recno]; if( ownNation->is_action_exist( loc_x1, loc_y1, -1, -1, ACTION_AI_ASSIGN_OVERSEER, FIRM_CAMP ) ) { return 1; // there is a queued action being processed ...
false
false
false
false
false
0
privateKey2Pem(const QString& strFilenamePath, const QString& strPassphrase) { bool fRet(false); if (m_pKey) { FILE* const pPemFile(::fopen(strFilenamePath.toUtf8().constData(), "wb")); if (pPemFile) { if (::PEM_write_RSAPrivateKey(pPemFile, m_pKey->pkey.rsa, ::EVP_des_ede3_cbc(), ...
false
false
false
false
false
0
brute_force_gen (void) { u8 *p = pw_end; do { u8 o = *--p; *p = bf_next[o]; if (o != bf_last) return pw_end - p; } while (p > pw); if (pw_end - pw < max_length) { p = ++pw_end; *p = 0; while (p > pw) *--p = bf_next[255]; return -1; } ...
false
false
false
false
false
0
xenfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) { struct xenfb_info *xenfb_info; int required_mem_len; xenfb_info = info->par; if (!xenfb_info->feature_resize) { if (var->xres == video[KPARAM_WIDTH] && var->yres == video[KPARAM_HEIGHT] && var->bits_per_pixel == xenfb_info->page-...
false
false
false
false
false
0
release_op(node *n) { PSC_DUMP( sblog << "release_op "; dump::dump_op(n); sblog << "\n"; ); n->remove(); if (n->is_copy_mov()) { ready_copies.push_back(n); } else if (n->is_mova() || n->is_pred_set()) { ready.push_front(n); } else { ready.push_back(n); } }
false
false
false
false
false
0
ext2_get_group_desc(struct fs_info *fs, uint32_t group_num) { struct ext2_sb_info *sbi = EXT2_SB(fs); uint32_t desc_block, desc_index; const struct ext2_group_desc *desc_data_block; if (group_num >= sbi->s_groups_count) { printf ("ext2_get_group_desc" "block_group >= groups_count - " "block_group ...
false
false
false
false
false
0
dns_sdlzdestroy(void *driverdata, void **dbdata) { dns_sdlzimplementation_t *imp; /* Write debugging message to log */ sdlz_log(ISC_LOG_DEBUG(2), "Unloading SDLZ driver."); imp = driverdata; /* If the destroy method exists, call it. */ if (imp->methods->destroy != NULL) { MAYBE_LOCK(imp); imp->methods->de...
false
false
false
false
false
0
readBinary(std::istream &s) { if (!s.good()){ OCTOMAP_WARNING_STR("Input filestream not \"good\" in OcTree::readBinary"); } // check if first line valid: std::string line; std::istream::pos_type streampos = s.tellg(); std::getline(s, line); unsigned size; double res; ...
false
false
false
false
false
0
L14() {register object *base=vs_base; register object *sup=base+VM14; VC14 vs_check; {register object V31; V31=(base[0]); vs_top=sup; goto TTL; TTL:; {register object V32; register object V33; V32= Cnil; V33= Cnil; base[1]= (V31); vs_top=(vs_base=base+1)+1; (void) (*Lnk37)(); vs_top=sup; V34= vs_base[0];...
false
false
false
false
false
0
disco_refresh_info_sync (CamelFolder *folder, GCancellable *cancellable, GError **error) { CamelDiscoFolderClass *disco_folder_class; CamelStore *parent_store; gboolean success; parent_store = camel_folder_get_parent_store (folder); if (camel_disco_store_status (...
false
false
false
false
false
0
kdbSetString(KDB * handle, const char *keyname, const char *value) { Key *key = 0; int rc = 0; if (!handle || !keyname || !value) return -1; key=keyNew(0); if (!key) return -1; rc=keySetName(key,keyname); if (rc == -1) { keyDel (key); return -1; } kdbGetKey(handle,key); keySetString(key,value); rc=kd...
false
false
false
false
false
0
ad5449_read_raw(struct iio_dev *indio_dev, struct iio_chan_spec const *chan, int *val, int *val2, long info) { struct ad5449 *st = iio_priv(indio_dev); struct regulator_bulk_data *reg; int scale_uv; int ret; switch (info) { case IIO_CHAN_INFO_RAW: if (st->has_sdo) { ret = ad5449_read(indio_dev, AD5449_...
false
false
false
false
false
0
csio_lnode_exit(struct csio_lnode *ln) { struct csio_hw *hw = csio_lnode_to_hw(ln); csio_ln_exit(ln); /* Remove this lnode from hw->sln_head */ spin_lock_irq(&hw->lock); list_del_init(&ln->sm.sm_list); /* If it is children lnode, decrement the * counter in its parent lnode */ if (ln->pln) ln->pln->num_...
false
false
false
false
false
0
H5G_dense_btree2_name_compare(const void *_bt2_udata, const void *_bt2_rec, int *result) { const H5G_bt2_ud_common_t *bt2_udata = (const H5G_bt2_ud_common_t *)_bt2_udata; const H5G_dense_bt2_name_rec_t *bt2_rec = (const H5G_dense_bt2_name_rec_t *)_bt2_rec; herr_t ret_value = SUCCEED; /* Return value */ ...
false
false
false
false
false
0
ks_tuple_present(int n_ks_tuple, krb5_key_salt_tuple *ks_tuple, krb5_key_salt_tuple *looking_for) { int i; for (i = 0; i < n_ks_tuple; i++) { if (ks_tuple[i].ks_enctype == looking_for->ks_enctype && ks_tuple[i].ks_salttype == looking_for->ks_salttype) return TRU...
false
false
false
false
false
0
searchEnv (Tree key, Tree& v, Tree env) { while (isList(env)) { if (hd(hd(env)) == key) { v = tl(hd(env)); return true; } env = tl(env); } return false; }
false
false
false
false
false
0
gdict_source_create_context (GdictSource *source, GdictSourceTransport transport, GError **error) { GdictSourcePrivate *priv; GdictContext *context; g_assert (GDICT_IS_SOURCE (source)); priv = source->priv; switch (transport) { case GDICT_SOURCE_TRANS...
false
false
false
false
false
0
posix_pathconf(PyObject *self, PyObject *args, PyObject *kwargs) { path_t path; PyObject *result = NULL; int name; static char *keywords[] = {"path", "name", NULL}; memset(&path, 0, sizeof(path)); path.function_name = "pathconf"; #ifdef HAVE_FPATHCONF path.allow_fd = 1; #endif if (PyArg...
false
false
false
false
false
0
site_highlight_loop(geosite * gp, const char **argvPtr, int argcPtr, int what, int flag, float value) { geopoint *gpt; int i; switch (what) { case SITE_HIGHLIGHT_SIZE: for (i = 0; i < argcPtr; i++) { if ((gpt = site_highlight_get_geopoint(gp, atoi(argvPtr[i]))) == NULL) return (0); g...
false
false
false
false
false
0
usbnet_defer_kevent (struct usbnet *dev, int work) { set_bit (work, &dev->flags); if (!schedule_work (&dev->kevent)) { if (net_ratelimit()) netdev_err(dev->net, "kevent %d may have been dropped\n", work); } else { netdev_dbg(dev->net, "kevent %d scheduled\n", work); } }
false
false
false
false
false
0
calgary_setup_tar(struct pci_dev *dev, void __iomem *bbar) { u64 val64; u64 table_phys; void __iomem *target; int ret; struct iommu_table *tbl; /* build TCE tables for each PHB */ ret = build_tce_table(dev, bbar); if (ret) return ret; tbl = pci_iommu(dev->bus); tbl->it_base = (unsigned long)bus_info[dev->...
false
false
false
false
false
0
ptql_proc_list_destroy(sigar_t *sigar, sigar_proc_list_t *proclist) { if (proclist != sigar->pids) { sigar_proc_list_destroy(sigar, proclist); free(proclist); } return SIGAR_OK; }
false
false
false
false
false
0
bnx2_init_copper_phy(struct bnx2 *bp, int reset_phy) { u32 val; if (reset_phy) bnx2_reset_phy(bp); if (bp->phy_flags & BNX2_PHY_FLAG_CRC_FIX) { bnx2_write_phy(bp, 0x18, 0x0c00); bnx2_write_phy(bp, 0x17, 0x000a); bnx2_write_phy(bp, 0x15, 0x310b); bnx2_write_phy(bp, 0x17, 0x201f); bnx2_write_phy(bp, 0x15...
false
false
false
false
false
0
write_dir (MarkupDir *dir, FILE *f, int indent, gboolean save_as_subtree, const char *locale, GHashTable *other_locales) { GSList *tmp; gboolean retval = FALSE; dir->not_in_filesystem = TRUE; if (save_as_subtree && locale != NULL && dir->is_dir_empty) return TRUE; ...
false
false
false
false
false
0
_set_sleep_interval(const char *optarg) { sleep_interval = atoi(optarg); if (sleep_interval < MINIMUM_SLEEP_INTERVAL) { log_warning("sleep interval too small... using default."); sleep_interval = DEFAULT_SLEEP_INTERVAL; } return STATUS_SUCCESS; }
false
false
false
false
true
1
verify_each_object (gpointer key, gpointer value, gpointer user_data) { gpointer k; g_assert (SEAHORSE_IS_OBJECT (value)); k = hashkey_by_source (seahorse_object_get_source (value), seahorse_object_get_id (value)); g_assert (k == key); }
false
false
false
false
false
0
FScreenGetPrimaryScreen(XEvent *ev) { if (!is_xinerama_enabled) { return 0; } if (primary_scr == FSCREEN_GLOBAL) { return 0; } else if (primary_scr == FSCREEN_CURRENT) { int mx; int my; /* use current screen as primary screen */ GetMouseXY(ev, &mx, &my); return FindScreenOfXY(mx, my); } else if...
false
false
false
false
false
0
enLarge(int _l, int _t, int _r, int _b) { if (l > _l || l < 0) l = _l; if (t > _t || t < 0) t = _t; if (r < _r || r < 0) r = _r; if (b < _b || b < 0) b = _b; }
false
false
false
false
false
0
maybe_deadlock (dotlock_t h) { dotlock_t r; int res = 0; LOCK_all_lockfiles (); for (r=all_lockfiles; r; r = r->next) { if ( r != h && r->locked ) { res = 1; break; } } UNLOCK_all_lockfiles (); return res; }
false
false
false
false
false
0
ParseVarRef(const char *expr, int start, int end) { if (start + 1 < end && expr[start] == '$') { if (expr[start+1] == '(' || expr[start+1] == '{') { char closing_bracket = expr[start+1] == '(' ? ')' : '}'; StringParseResult res = ParseQname(expr, start + 2, end); if (res.result) {...
false
false
false
false
false
0
brasero_jacket_view_set_image (BraseroJacketView *self, BraseroJacketImageStyle style, const gchar *path) { BraseroJacketViewPrivate *priv; GError *error = NULL; priv = BRASERO_JACKET_VIEW_PRIVATE (self); if (!path) return priv->image_path; priv->color_style = BRASERO_JACKET_COLOR_NONE; ...
false
false
false
false
false
0
uv_idle_init(uv_idle_t* idle) { uv__handle_init((uv_handle_t*)idle, UV_IDLE); uv_counters()->idle_init++; ev_idle_init(&idle->idle_watcher, uv__idle); idle->idle_watcher.data = idle; idle->idle_cb = NULL; return 0; }
false
false
false
false
false
0
saveSettings(QSettings *settings) { qint64 lnb_lo = (qint64)(ui->lnbSpinBox->value()*1.e6); if (lnb_lo) settings->setValue("input/lnb_lo", lnb_lo); else settings->remove("input/lnb_lo"); // gains are stored as a QMap<QString, QVariant(int)> // note that we store the integer values, ...
false
false
false
false
false
0
builtins_derUnwrapInt(unsigned char *src, int size, unsigned char **dest) { unsigned char *start = src; int len = 0; if (*src ++ != 2) { return 0; } len = *src++; if (len & 0x80) { int count = len & 0x7f; len =0; if (count+2 > size) { return 0; } while (count-- > 0) { len = (le...
false
false
false
false
false
0
done_loading (NemoDirectory *directory) { static int i = 0; g_print ("done loading\n"); if (i == 0) { g_timeout_add (5000, (GSourceFunc)force_reload, directory); i++; } else { } }
false
false
false
false
false
0
stringbuf_cat_locale_string (struct stringbuf *buf, SCM str) { size_t max_len = buf->buf_len - (buf->ptr - buf->buf) - 1; size_t len = scm_to_locale_stringbuf (str, buf->ptr, max_len); if (len > max_len) { /* buffer is too small, double its size and try again. */ stringbuf_grow (buf); ...
false
false
false
false
false
0
picolcd_resume(struct hid_device *hdev) { int ret; ret = picolcd_resume_backlight(hid_get_drvdata(hdev)); if (ret) dbg_hid(PICOLCD_NAME " restoring backlight failed: %d\n", ret); return 0; }
false
false
false
false
false
0
clutter_bin_layout_get_alignment (ClutterBinLayout *self, ClutterActor *child, ClutterBinAlignment *x_align, ClutterBinAlignment *y_align) { ClutterBinLayoutPrivate *priv; ClutterLayoutManager *manager; ...
false
false
false
true
false
1
ir_edit_lock_surface(GxIREdit *ir_edit, cairo_paint_function excl) { if (ir_edit->surface) { g_object_unref(ir_edit->surface); } ir_edit->surface = gdk_pixmap_new( gtk_widget_get_window(GTK_WIDGET(ir_edit)), ir_edit->width, ir_edit->height, -1); cairo_t *c = gdk_cairo_create(ir_edit->surface); ir_edit_paint_ar...
false
false
false
false
false
0
negate_rtx (enum machine_mode mode, rtx x) { rtx result = simplify_unary_operation (NEG, mode, x, mode); if (result == 0) result = expand_unop (mode, neg_optab, x, NULL_RTX, 0); return result; }
false
false
false
false
false
0
gspca_input_connect(struct gspca_dev *dev) { struct input_dev *input_dev; int err = 0; dev->input_dev = NULL; if (dev->sd_desc->int_pkt_scan || dev->sd_desc->other_input) { input_dev = input_allocate_device(); if (!input_dev) return -ENOMEM; usb_make_path(dev->dev, dev->phys, sizeof(dev->phys)); strlc...
false
false
false
false
false
0
hsynd_str(u8 synd) { switch (synd) { case MLX5_HEALTH_SYNDR_FW_ERR: return "firmware internal error"; case MLX5_HEALTH_SYNDR_IRISC_ERR: return "irisc not responding"; case MLX5_HEALTH_SYNDR_HW_UNRECOVERABLE_ERR: return "unrecoverable hardware error"; case MLX5_HEALTH_SYNDR_CRC_ERR: return "firmware CRC err...
false
false
false
false
false
0
setSoftMaskFromImageMask(GfxState *state, Object *ref, Stream *str, int width, int height, GBool invert, GBool inlineImg, double *baseMatrix) { if (level != psLevel1 && level != psLevel1Sep) { maskToClippingPath(str, width, height, invert); } }
false
false
false
false
false
0
tg3_lookup_by_subsys(struct tg3 *tp) { DBGP("%s\n", __func__); int i; DBGC(tp->dev, "Matching with: %x:%x\n", tp->subsystem_vendor, tp->subsystem_device); for (i = 0; i < (int) ARRAY_SIZE(subsys_id_to_phy_id); i++) { if ((subsys_id_to_phy_id[i].subsys_vendor == tp->subsystem_vendor) && (subsys_id_t...
false
false
false
false
false
0
start_preview () { PWaitAndSignal m(core_mutex); PTRACE(4, "VidInputCore\tStarting preview " << preview_config); if (!preview_config.active && !stream_config.active) { internal_open(preview_config.width, preview_config.height, preview_config.fps); preview_manager->start(preview_config.width, preview_conf...
false
false
false
false
false
0
Argusgen_ecode(eaddr, q) u_char *eaddr; struct qual q; { struct ablock *b0 = NULL; if ((q.addr == Q_HOST || q.addr == Q_DEFAULT) && q.proto == Q_LINK) b0 = Argusgen_ehostop(eaddr, (int)q.dir); else ArgusLog(LOG_ERR, "ethernet address used in non-ether expression"); return b0; }
false
false
false
false
false
0
dostmpdir(drive) int drive; { char path[MAXPATHLEN]; path[0] = DOSTMPPREFIX; path[1] = drive; path[2] = '\0'; if (mktmpdir(path) < 0) return(NULL); return(Xstrdup(path)); }
false
false
false
false
false
0
setDeadReconPose(ArPose pose) { myEncoderPose.setPose(pose); myEncoderTransform.setTransform(myEncoderPose, myGlobalPose); myGlobalPose = myEncoderTransform.doTransform(myEncoderPose); }
false
false
false
false
false
0
ipmi_sdr_get_next_header(struct ipmi_intf *intf, struct ipmi_sdr_iterator *itr) { struct sdr_get_rs *header; if (itr->next == 0xffff) return NULL; header = ipmi_sdr_get_header(intf, itr); if (header == NULL) return NULL; itr->next = header->next; return header; }
false
false
false
false
false
0
getFont(ustring name, ustring xftFont, bool) { #endif ref<YFont> font; #if CONFIG_XFREETYPE == 1 if (haveXft == -1) { int renderEvents, renderErrors; haveXft = (XRenderQueryExtension(xapp->display(), &renderEvents, &renderErrors) && XftDefaultHasRender(xapp->display())) ? 1 ...
false
false
false
false
false
0
svnic_wq_disable(struct vnic_wq *wq) { unsigned int wait; iowrite32(0, &wq->ctrl->enable); /* Wait for HW to ACK disable request */ for (wait = 0; wait < 100; wait++) { if (!(ioread32(&wq->ctrl->running))) return 0; udelay(1); } pr_err("Failed to disable WQ[%d]\n", wq->index); return -ETIMEDOUT; }
false
false
false
false
false
0
sort_cmp64(const void *a, const void *b) { u_int32 l, r; l = *(u_int32*)a; r = *(u_int32*)b; if (sort_i64[l] < sort_i64[r]) return -1; if (sort_i64[l] > sort_i64[r]) return 1; return 0; }
false
false
false
false
false
0
OnRelease(bool appShutDown) { // do de-initialization for your plugin // if appShutDown is true, the plugin is unloaded because Code::Blocks is being shut down, // which means you must not use any of the SDK Managers // NOTE: after this function, the inherited member variable // m_IsAttached will be...
false
false
false
false
false
0
post_force(int vflag) { int *mask = atom->mask; int nlocal = atom->nlocal; double **f = atom->f; // Scaling forces. for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) { f[i][0] = lambda * f[i][0]; f[i][1] = lambda * f[i][1]; f[i][2] = lambda * f[i][2]; } } }
false
false
false
false
false
0