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 |
|---|---|---|---|---|---|---|
main_thread(void *arg)
{
WSPPushClientMachine *cpm;
WAPEvent *e;
while (push_client_run_status == running &&
(e = gwlist_consume(push_client_queue)) != NULL) {
cpm = push_client_machine_find_or_create(e);
if (cpm == NULL)
wap_event_destroy(e);
else
push_cl... | false | false | false | false | false | 0 |
dialog_doc_metadata_set_file_permissions (DialogDocMetaData *state)
{
if (state->file_permissions != NULL &&
state->permissions_changed == TRUE)
go_set_file_permissions (go_doc_get_uri (state->doc),
state->file_permissions);
} | false | false | false | false | false | 0 |
SetupOptionMenu(XmtHelpBrowserWidget hb, XmtHelpTree *node)
#else
static void SetupOptionMenu(hb, node)
XmtHelpBrowserWidget hb;
XmtHelpTree *node;
#endif
{
int i, j, nodenum;
XmtHelpTree *parent;
XmtHelpTree *xref;
if (!node) return;
/*
* display the current node and each of its parents in t... | false | false | false | true | false | 1 |
pfs_process_verify_break_rw_address( struct pfs_process *p )
{
PTRINT_T start, end, offset;
int major, minor,inode;
char flagstring[5];
FILE *file;
char line[1024];
int fields;
if(!p->break_address) return p->heap_address;
sprintf(line,"/proc/%d/maps",p->pid);
file = fopen(line,"r");
if(!file) {
debug(D... | false | false | false | false | false | 0 |
get_page_size(BFDmemoryType memtype)
{
unsigned int page_size;
switch( memtype ) {
case MEM_FLASH:
page_size = global_p_device_def->flash_page_size;
break;
case MEM_EEPROM:
page_size = global_p_device_def->eeprom_page_size;
break;
default:
page_size = 1;
... | false | false | false | false | false | 0 |
d2i_ECPrivateKey(EC_KEY **a, const unsigned char **in, long len)
{
int ok=0;
EC_KEY *ret=NULL;
EC_PRIVATEKEY *priv_key=NULL;
if ((priv_key = EC_PRIVATEKEY_new()) == NULL)
{
ECerr(EC_F_D2I_ECPRIVATEKEY, ERR_R_MALLOC_FAILURE);
return NULL;
}
if ((priv_key = d2i_EC_PRIVATEKEY(&priv_k... | false | false | false | false | false | 0 |
addBasis(GtkWidget *list,char *fileName)
{
gchar *texts[1];
gchar t[BSIZE];
FILE *fd;
gboolean OK = FALSE;
gchar* data;
GtkTreeModel *model;
GtkListStore *store;
GtkTreeIter iter;
model = gtk_tree_view_get_model(GTK_TREE_VIEW(list));
store = GTK_LIST_STORE (model);
fd = FOpen(fileName, "r");... | false | false | false | false | false | 0 |
meta_checksum(struct via_meta *via)
{
uint8_t i = 50, sum = 0;
while (i--)
sum += ((uint8_t*) via)[i];
return sum == via->checksum;
} | false | false | false | false | false | 0 |
omfs_shrink_inode(struct inode *inode)
{
struct omfs_sb_info *sbi = OMFS_SB(inode->i_sb);
struct omfs_extent *oe;
struct omfs_extent_entry *entry;
struct buffer_head *bh;
u64 next, last;
u32 extent_count;
u32 max_extents;
int ret;
/* traverse extent table, freeing each entry that is greater
* than inode->i_... | false | false | false | false | false | 0 |
AddGroupCmd(Server *servPtr, Tcl_Interp *interp, int argc, char *argv[])
{
char *name, *user;
User *userPtr;
Group *groupPtr;
Tcl_HashSearch search;
Tcl_HashEntry *hPtr;
int new, param;
if (argc < 4) {
Tcl_AppendResult(interp, "wrong # args: should be \"",
argv[0], " ", argv[1], " na... | false | false | false | false | false | 0 |
p_set_in_reif(FlatZincSpace& s, const ConExpr& ce, AST::Node* ann, ReifyMode rm) {
if (!ce[1]->isSetVar()) {
if (rm==RM_EQV) {
p_int_in_reif(s,ce,ann);
} else {
assert(rm==RM_IMP);
p_int_in_imp(s,ce,ann);
}
} else {
if (!ce[0]->isIntVar()) {
... | false | false | false | false | false | 0 |
il_dbgfs_register(struct il_priv *il, const char *name)
{
struct dentry *phyd = il->hw->wiphy->debugfsdir;
struct dentry *dir_drv, *dir_data, *dir_rf, *dir_debug;
dir_drv = debugfs_create_dir(name, phyd);
if (!dir_drv)
return -ENOMEM;
il->debugfs_dir = dir_drv;
dir_data = debugfs_create_dir("data", dir_drv);... | false | false | false | false | false | 0 |
indexes_addexclude_aggr(indexes_t *indexes_p, char *fpath, eventinfo_flags_t flags) {
printf_ddd("Debug3: indexes_addexclude_aggr(indexes_p, \"%s\", %u).\n", fpath, flags);
gpointer flags_gp = g_hash_table_lookup(indexes_p->exc_fpath_ht, fpath);
if(flags_gp != NULL)
flags |= GPOINTER_TO_INT(flags_gp);
// Removi... | false | false | false | false | false | 0 |
gst_oss4_source_getcaps (GstBaseSrc * bsrc, GstCaps * filter)
{
GstOss4Source *oss;
GstCaps *caps;
oss = GST_OSS4_SOURCE (bsrc);
if (oss->fd == -1) {
caps = gst_oss4_audio_get_template_caps ();
} else if (oss->probed_caps) {
caps = gst_caps_copy (oss->probed_caps);
} else {
caps = gst_oss4_aud... | false | false | false | false | false | 0 |
const_vector_from_tree (exp)
tree exp;
{
rtvec v;
int units, i;
tree link, elt;
enum machine_mode inner, mode;
mode = TYPE_MODE (TREE_TYPE (exp));
if (is_zeros_p (exp))
return CONST0_RTX (mode);
units = GET_MODE_NUNITS (mode);
inner = GET_MODE_INNER (mode);
v = rtvec_alloc (units);
lin... | false | false | false | false | false | 0 |
uncache_firmware(const char *fw_name)
{
struct firmware_buf *buf;
struct firmware fw;
pr_debug("%s: %s\n", __func__, fw_name);
if (fw_get_builtin_firmware(&fw, fw_name))
return 0;
buf = fw_lookup_buf(fw_name);
if (buf) {
fw_free_buf(buf);
return 0;
}
return -EINVAL;
} | false | false | false | false | false | 0 |
flame_broil(object *monster)
{
short row, col;
if ((!mon_sees(monster, rogue.row, rogue.col)) || coin_toss()) {
return 0;
}
row = rogue.row - monster->row;
col = rogue.col - monster->col;
if (row < 0) {
row = -row;
}
if (col < 0) {
col = -col;
}
if (((row != 0) && (col != 0) ... | false | false | false | false | false | 0 |
arena_boot(void)
{
size_t header_size;
unsigned i;
/* Set variables according to the value of opt_lg_[qc]space_max. */
qspace_max = (1U << opt_lg_qspace_max);
cspace_min = CACHELINE_CEILING(qspace_max);
if (cspace_min == qspace_max)
cspace_min += CACHELINE;
cspace_max = (1U << opt_lg_cspace_max);
sspace_min ... | false | false | false | false | false | 0 |
_bufferevent_del_generic_timeout_cbs(struct bufferevent *bev)
{
int r1,r2;
r1 = event_del(&bev->ev_read);
r2 = event_del(&bev->ev_write);
if (r2<0 || r2<0)
return -1;
return 0;
} | false | false | false | false | true | 1 |
createARMMCAsmInfo(const Target &T, StringRef TT) {
Triple TheTriple(TT);
if (TheTriple.isOSDarwin())
return new ARMMCAsmInfoDarwin();
return new ARMELFMCAsmInfo();
} | false | false | false | false | false | 0 |
iconv_iconv(int argc, VALUE *argv, VALUE self)
{
VALUE str, n1, n2;
VALUE cd = check_iconv(self);
long start = 0, length = 0, slen = 0;
rb_scan_args(argc, argv, "12", &str, &n1, &n2);
if (!NIL_P(str)) {
VALUE n = rb_str_length(StringValue(str));
slen = NUM2LONG(n);
}
if (argc != 2 || !RTE... | false | false | false | false | false | 0 |
ximExtForwardKeyeventProc(conn, major, minor, arglen)
IMConnection *conn;
int major;
int minor;
int arglen;
{
IMIC *icp;
int synchronous;
int type;
unsigned int serial;
XEvent event;
TRACE(("ximExtForwardKeyeventProc(#%d)\n", conn->serial));
if ((icp = IMGetIC(conn, arglen)) == NULL) retur... | false | false | false | false | false | 0 |
EncodeWithEncoding(Handle<Value> encoding_v, char* buf,
int len) {
HandleScope scope;
Local<Value> outString;
enum encoding enc = ParseEncoding(encoding_v, (enum encoding) -1);
char* retbuf;
int retlen;
if (enc == HEX) {
// Hex encoding
HexEncode(reinterpret_cast<unsigned cha... | false | false | false | false | false | 0 |
mxr_reg_graph_buffer(struct mxr_device *mdev, int idx, dma_addr_t addr)
{
u32 val = addr ? ~0 : 0;
unsigned long flags;
spin_lock_irqsave(&mdev->reg_slock, flags);
mxr_vsync_set_update(mdev, MXR_DISABLE);
if (idx == 0)
mxr_write_mask(mdev, MXR_CFG, val, MXR_CFG_GRP0_ENABLE);
else
mxr_write_mask(mdev, MXR_CF... | false | false | false | false | false | 0 |
set_vl_weights(struct hfi1_pportdata *ppd, u32 target,
u32 size, struct ib_vl_weight_elem *vl)
{
struct hfi1_devdata *dd = ppd->dd;
u64 reg;
unsigned int i, is_up = 0;
int drain, ret = 0;
mutex_lock(&ppd->hls_lock);
if (ppd->host_link_state & HLS_UP)
is_up = 1;
drain = !is_ax(dd) && is_up;
if (drain)... | false | false | false | false | false | 0 |
makepath(string path, int64_t date=0, int64_t attr=0) {
for (int i=0; i<size(path); ++i) {
if (path[i]=='\\' || path[i]=='/') {
path[i]=0;
#ifdef unix
mkdir(path.c_str(), 0777);
#else
CreateDirectory(utow(path.c_str(), true).c_str(), 0);
#endif
path[i]='/';
}
}
// Set date and att... | false | false | false | false | false | 0 |
sourceRowsRemoved( const QModelIndex &parentIndex, int start, int end )
{
// iterate over all of our stored parent indexes
QMutableMapIterator<qint64, QModelIndex> it( mParentIndexes );
while ( it.hasNext() ) {
it.next();
if ( it.value().parent() == parentIndex ) {
if ( it.value().row() >= start && ... | false | false | false | false | false | 0 |
slf_init_cancel (pTHX_ struct CoroSLF *frame, CV *cv, SV **arg, int items)
{
HV *coro_hv;
struct coro *coro;
if (items <= 0)
croak ("Coro::cancel called without coro object,");
coro = SvSTATE (arg [0]);
coro_hv = coro->hv;
coro_set_status (aTHX_ coro, arg + 1, items - 1);
if (ecb_expect_false (co... | false | false | false | false | false | 0 |
configureAction( QAction *action, const QDomAttr &attribute,
ShortcutOption shortcutOption )
{
static const QString &attrShortcut = KGlobal::staticQString( "shortcut" );
QString attrName = attribute.name();
// If the attribute is a deprecated "accel", change to "shortcut".
if ( equals(attrName,... | false | false | false | false | false | 0 |
UnFactorElementsInternal(vtkXMLDataElement *tree,
vtkXMLDataElement *pool)
{
if (!tree || !pool)
{
return 0;
}
int res = 0;
// We found a factor, replace it with the corresponding sub-tree
if (tree->GetName() &&
!strcmp(tree->GetName(), VTK_XML_... | false | false | false | false | false | 0 |
RemoveServer(FirewallSocketServer* server) {
CritScope scope(&crit_);
servers_.erase(std::remove(servers_.begin(), servers_.end(), server),
servers_.end());
} | false | false | false | false | false | 0 |
snd_pcm_null_rewind(snd_pcm_t *pcm, snd_pcm_uframes_t frames)
{
snd_pcm_null_t *null = pcm->private_data;
switch (null->state) {
case SND_PCM_STATE_RUNNING:
snd_pcm_mmap_hw_backward(pcm, frames);
/* Fall through */
case SND_PCM_STATE_PREPARED:
snd_pcm_mmap_appl_backward(pcm, frames);
return frames;
default... | false | false | false | false | false | 0 |
ndmca_media_load_next (struct ndm_session *sess)
{
int n_media = sess->control_acb.job.media_tab.n_media;
if (sess->control_acb.cur_media_ix+1 >= n_media) {
ndmalogf (sess, 0, 0, "Out of tapes");
return -1;
}
sess->control_acb.cur_media_ix++;
return ndmca_media_load_current (sess);
} | false | false | false | false | false | 0 |
Inverse(const Integer &a) const
{
if (!a)
return a;
CopyWords(m_result.reg.begin(), m_modulus.reg, m_modulus.reg.size());
if (CryptoPP::Subtract(m_result.reg.begin(), m_result.reg, a.reg, a.reg.size()))
Decrement(m_result.reg.begin()+a.reg.size(), m_modulus.reg.size()-a.reg.size());
return m_result;
} | false | false | false | false | false | 0 |
bnxt_init_napi(struct bnxt *bp)
{
int i;
unsigned int cp_nr_rings = bp->cp_nr_rings;
struct bnxt_napi *bnapi;
if (bp->flags & BNXT_FLAG_USING_MSIX) {
if (BNXT_CHIP_TYPE_NITRO_A0(bp))
cp_nr_rings--;
for (i = 0; i < cp_nr_rings; i++) {
bnapi = bp->bnapi[i];
netif_napi_add(bp->dev, &bnapi->napi,
... | false | false | false | false | false | 0 |
get_write_vector (rw_vector *vec)
{
size_t free_cnt;
size_t cnt2;
size_t w, r;
w = write_ptr;
r = read_ptr;
if (w > r) {
free_cnt = ((r - w + size) & size_mask) - 1;
} else if (w < r) {
free_cnt = (r - w) - 1;
} else {
free_cnt = size - 1;
}
cnt2 = w + free_cnt;
if (cnt2 > size) {
/* Two p... | false | false | false | false | false | 0 |
back_serialize_ref(httrackp * opt, const lien_back * src) {
char *filename =
url_savename_refname_fullpath(opt, src->url_adr, src->url_fil);
FILE *fp = fopen(filename, "wb");
if (fp == NULL) {
#ifdef _WIN32
if (mkdir
(fconcat(OPT_GET_BUFF(opt), StringBuff(opt->path_log), CACHE_REFNAME))
=... | false | false | false | false | true | 1 |
ssl_sock_ocsp_stapling_cbk(SSL *ssl, void *arg)
{
struct certificate_ocsp *ocsp = (struct certificate_ocsp *)arg;
char* ssl_buf;
if (!ocsp ||
!ocsp->response.str ||
!ocsp->response.len ||
(ocsp->expire < now.tv_sec))
return SSL_TLSEXT_ERR_NOACK;
ssl_buf = OPENSSL_malloc(ocsp->response.len);
if (... | false | true | false | false | false | 1 |
on_reload_as_activate(GtkMenuItem *menuitem, gpointer user_data)
{
GeanyDocument *doc = document_get_current();
gchar *base_name;
gint i = GPOINTER_TO_INT(user_data);
const gchar *charset = NULL;
g_return_if_fail(doc != NULL);
/* No need to reload "untitled" (non-file-backed) documents */
if (doc->file_name ==... | false | false | false | false | false | 0 |
__partition_close(dbp, txn, flags)
DB *dbp;
DB_TXN *txn;
u_int32_t flags;
{
DB **pdbp;
DB_PARTITION *part;
ENV *env;
u_int32_t i;
int ret, t_ret;
if ((part = dbp->p_internal) == NULL)
return (0);
env = dbp->env;
ret = 0;
if ((pdbp = part->handles) != NULL) {
for (i = 0; i < part->nparts; i++, pdbp++)... | false | false | false | false | false | 0 |
yyrestart( std::istream* input_file )
{
if ( ! YY_CURRENT_BUFFER ){
yyensure_buffer_stack ();
YY_CURRENT_BUFFER_LVALUE =
yy_create_buffer( yyin, YY_BUF_SIZE );
}
yy_init_buffer( YY_CURRENT_BUFFER, input_file );
yy_load_buffer_state( );
} | false | false | false | false | false | 0 |
mono_class_vtable_full (MonoDomain *domain, MonoClass *class, gboolean raise_on_error)
{
MonoClassRuntimeInfo *runtime_info;
g_assert (class);
if (class->exception_type) {
if (raise_on_error)
mono_raise_exception (mono_class_get_exception_for_failure (class));
return NULL;
}
/* this check can be inlined ... | false | false | false | false | false | 0 |
__repmgr_connect(env, netaddr, connp, errp)
ENV *env;
repmgr_netaddr_t *netaddr;
REPMGR_CONNECTION **connp;
int *errp;
{
REPMGR_CONNECTION *conn;
ADDRINFO *ai0, *ai;
socket_t sock;
int err, ret;
u_int port;
COMPQUIET(err, 0);
#ifdef CONFIG_TEST
port = fake_port(env, netaddr->port);
#else
port = netaddr->po... | false | false | false | false | true | 1 |
external_slideshow_params_parse(void *data __UNUSED__, Evas_Object *obj __UNUSED__, const Eina_List *params)
{
Elm_Params_Slideshow *mem;
Edje_External_Param *param;
const Eina_List *l;
mem = calloc(1, sizeof(Elm_Params_Slideshow));
if (!mem)
return NULL;
EINA_LIST_FOREACH(params, l, param)
... | false | false | false | false | false | 0 |
init()
{
if ( !cache )
cache = new QHash<QString,CachedObject*>();
if ( !docloader )
docloader = new QLinkedList<DocLoader*>;
if ( !nullPixmap )
nullPixmap = new QPixmap;
if ( !brokenPixmap )
brokenPixmap = new QPixmap(KHTMLGlobal::iconLoader()->loadIcon("image-missing... | false | false | false | false | false | 0 |
gx_cie_common_complete(gs_cie_common *pcie)
{
int i;
for (i = 0; i < 3; ++i)
cache_set_linear(&pcie->caches.DecodeLMN[i].floats);
} | false | false | false | false | false | 0 |
CreateSpline()
{
mesh = NULL;
spline = new FCDGeometrySpline(GetDocument(), this);
SetNewChildFlag();
return spline;
} | false | false | false | false | false | 0 |
fileflag(Dir *db)
{
if(Fflag == 0)
return "";
if(QTDIR & db->qid.type)
return "/";
if(0111 & db->mode)
return "*";
return "";
} | false | false | false | false | false | 0 |
_e_fm2_icon_visible(const E_Fm2_Icon *ic)
{
/* return if the icon is visible */
if (
((ic->x - ic->sd->pos.x) < (ic->sd->w + OVERCLIP)) &&
((ic->x + ic->w - ic->sd->pos.x) > (-OVERCLIP)) &&
((ic->y - ic->sd->pos.y) < (ic->sd->h + OVERCLIP)) &&
((ic->y + ic->h - ic->sd->pos.y) > (-OVERCLIP))
... | false | false | false | false | false | 0 |
av_copy_parsestate(struct parse_state *ps, struct parse_state *destps)
{
destps->linkctr = ps->linkctr;
destps->nextseg = ps->nextseg;
destps->resolvelast = ps->resolvelast;
destps->islink = ps->islink;
if(ps->path)
destps->path = av_strdup(ps->path);
else
destps->path = NULL;
... | false | false | false | false | false | 0 |
ParseEntityQuery (char *buffer)
{
ISNS_Attr *p_attr;
ISNS_HDR *pdu;
char *ptr;
pdu = (struct isns_hdr *)buffer;
ptr = buffer + sizeof (ISNS_HDR) + 4;
while (ptr < buffer + sizeof (ISNS_HDR) + pdu->len)
{
p_attr = (struct ISNS_attr *)ptr;
p_attr->tag = htonl (p_attr->tag);
p_attr-... | false | false | false | false | true | 1 |
on_cme__spinbutton_width_changed (GtkEditable *editable,
GapCmeGlobalParams *gpp)
{
GtkAdjustment *adj;
if(gap_debug) printf("CB: on_cme__spinbutton_width_changed\n");
if(gpp == NULL) return;
adj = GTK_ADJUSTMENT(gpp->cme__spinbutton_width_adj);
if(adj)
{
i... | false | false | false | false | false | 0 |
BaseException_setstate(PyObject *self, PyObject *state)
{
PyObject *d_key, *d_value;
Py_ssize_t i = 0;
if (state != Py_None) {
if (!PyDict_Check(state)) {
PyErr_SetString(PyExc_TypeError, "state is not a dictionary");
return NULL;
}
while (PyDict_Next(state, ... | false | false | false | false | false | 0 |
setScale() const {
if ( haveX1X2() ) {
lastXCombPtr()->lastSHat((meMomenta()[0]+meMomenta()[1]).m2());
}
Energy2 fscale = factorizationScale()*factorizationScaleFactor();
Energy2 rscale = renormalizationScale()*renormalizationScaleFactor();
lastXCombPtr()->lastScale(fscale);
if ( !fixedCouplings() ) {
... | false | false | false | false | false | 0 |
__ov2659_try_frame_size(struct v4l2_mbus_framefmt *mf,
const struct ov2659_framesize **size)
{
const struct ov2659_framesize *fsize = &ov2659_framesizes[0];
const struct ov2659_framesize *match = NULL;
int i = ARRAY_SIZE(ov2659_framesizes);
unsigned int min_err = UINT_MAX;
while (i--) {
int err = abs(fs... | false | false | false | false | false | 0 |
locking_callback(int mode, int type, const char *file, int line) {
(void)file; /* skip warning about unused parameter */
(void)line; /* skip warning about unused parameter */
if(mode&CRYPTO_LOCK)
pthread_mutex_lock(lock_cs+type);
else
pthread_mutex_unlock(lock_cs+type);
} | false | false | false | false | false | 0 |
unw_decode_p1 (const unsigned char *dp, unsigned int code,
void *arg ATTRIBUTE_UNUSED)
{
unsigned char brmask = (code & 0x1f);
UNW_DEC_BR_MEM ("P1", brmask, arg);
return dp;
} | false | false | false | false | false | 0 |
OnFocus( wxFocusEvent &event )
{
if (m_textCtrl)
m_textCtrl->SetFocus(); // this is to pass TAB navigation
event.Skip();
} | false | false | false | false | false | 0 |
RedrawCmd(PLStream *pls)
{
XwDev *dev = (XwDev *) pls->dev;
XwDisplay *xwd = (XwDisplay *) dev->xwd;
int write_to_window = dev->write_to_window;
dbug_enter("RedrawCmd");
/* Return if plD_init_xw hasn't been called yet */
if (dev == NULL) {
plwarn("RedrawCmd: Illegal call -- driver uninitialized"... | false | false | false | false | false | 0 |
ksCopy (KeySet *dest, const KeySet *source)
{
if (!dest) return -1;
ksClear (dest);
if (!source) return 0;
ksAppend (dest, source);
ksSetCursor (dest, ksGetCursor (source));
return 1;
} | false | false | false | false | false | 0 |
ComputeLabelBounds(
vtkTextProperty* tprop, vtkUnicodeString label, double bds[4])
{
//vtkTimerLog* timer = vtkTimerLog::New();
//timer->StartTimer();
// Check for empty string.
vtkStdString str;
label.utf8_str(str);
if (str.length() == 0)
{
bds[0] = 0;
bds[1] = 0;
bds[2] = 0;
bds[3] ... | false | false | false | false | false | 0 |
calendar_event_destructor(void *obj)
{
struct ast_calendar_event *event = obj;
struct ast_calendar_attendee *attendee;
ast_debug(3, "Destroying event for calendar '%s'\n", event->owner->name);
ast_string_field_free_memory(event);
while ((attendee = AST_LIST_REMOVE_HEAD(&event->attendees, next))) {
if (attendee-... | false | false | false | false | false | 0 |
nfs_compare_remount_data(struct nfs_server *nfss,
struct nfs_parsed_mount_data *data)
{
if ((data->flags ^ nfss->flags) & NFS_REMOUNT_CMP_FLAGMASK ||
data->rsize != nfss->rsize ||
data->wsize != nfss->wsize ||
data->version != nfss->nfs_client->rpc_ops->version ||
data->minorversion != nfss->nf... | false | false | false | false | false | 0 |
getErrorMode(uint16_t& mode, const CmtDeviceId deviceId)
{
CMT3LOG("L3: getErrorMode %08x\n",deviceId);
CMT3EXITLOG;
if (isXm())
{
DO_DATA_REQUEST_BID(CMT_MID_REQXMERRORMODE,CMT_BID_MASTER);
mode = rcv.getDataShort();
}
else
{
DO_DATA_REQUEST(CMT_MID_REQERRORMODE);
mode = rcv.getDataShort();
}
return ... | false | false | false | false | false | 0 |
AllocateFunctionPrototype(JSFunction* function) {
// Allocate the prototype. Make sure to use the object function
// from the function's context, since the function can be from a
// different context.
JSFunction* object_function =
function->context()->global_context()->object_function();
Object* protot... | false | false | false | false | false | 0 |
ReparseCommandLineNonHelpFlags() {
// We make a copy of argc and argv to pass in
const vector<string>& argvs = GetArgvs();
int tmp_argc = static_cast<int>(argvs.size());
char** tmp_argv = new char* [tmp_argc + 1];
for (int i = 0; i < tmp_argc; ++i)
tmp_argv[i] = strdup(argvs[i].c_str()); // TODO(csilver... | false | false | false | false | false | 0 |
getSorte(bool vergangenheit /*= false*/) const {
return ld->mSorten[vergangenheit
? getVariableVergangenheit(spezvar_kind)
: getVariable(spezvar_kind)];
} | false | false | false | false | false | 0 |
pushchar(struct line_stat *ls, int cc)
{
if (ls->buf_index == MAX_TOKEN_LEN - 1) {
ls->buf[MAX_TOKEN_LEN - 1] = 0;
} else {
ls->buf[ls->buf_index] = cc;
ls->buf_index ++;
}
} | false | false | false | false | false | 0 |
SetPiece(unsigned int blockno, vtkDataObject* block)
{
if (block && block->IsA("vtkCompositeDataSet"))
{
vtkErrorMacro("Piece cannot be a vtkCompositeDataSet.");
return;
}
this->Superclass::SetChild(blockno, block);
} | false | false | false | false | false | 0 |
HandleError(Barry::Error &error)
{
std::ostringstream errorOss;
errorOss << _("RawChannel: Socket error received, what: ") << error.what();
if( m_callback ) {
m_callback->ChannelError(errorOss.str().c_str());
}
else {
SetPendingError(errorOss.str().c_str());
}
} | false | false | false | false | false | 0 |
push_uleb128 (vec<uchar, va_gc> **data_area, unsigned int value)
{
do
{
unsigned char byte = value & 0x7f;
value >>= 7;
if (value)
byte |= 0x80;
vec_safe_push (*data_area, byte);
}
while (value);
} | false | false | false | false | false | 0 |
fetch (void) throw (pop_err)
{
// Is there a password? Can we obtain it?
if (!biff_->get_password_for_mailbox (this)) {
g_warning (_("[%d] Empty password"), uin());
throw pop_nologin_err();
}
// Connection and authentification
connect();
fetch_mails ();
// QUIT
command_quit();
} | false | false | false | false | false | 0 |
Do(const Segment& in1,Segment& in2, Segment& out)
{
if(!mpInput2)
mpInput2 = &in2;
mHaveInternalSegment = true;
return Do(in1,out);
} | false | false | false | false | false | 0 |
init_addba_retry_timer23a(struct sta_info *psta)
{
setup_timer(&psta->addba_retry_timer, addba_timer_hdl,
(unsigned long)psta);
} | false | false | false | false | false | 0 |
sg_drag_drop(GtkWidget *widget,GdkDragContext *context,gint x,gint y,guint time,gControl *data)
{
gControl *source;
if (!gApplication::allEvents()) return true;
//g_debug("sg_drag_drop\n");
source = gApplication::controlItem(gtk_drag_get_source_widget(context));
gDrag::setDropData(gDrag::getAction(), x, y, s... | false | false | false | false | false | 0 |
gen_tagged_type_die (tree type,
dw_die_ref context_die,
enum debug_info_usage usage)
{
int need_pop;
if (type == NULL_TREE
|| !is_tagged_type (type))
return;
/* If this is a nested type whose containing class hasn't been written
out yet, writing it out will cover this one, too. Thi... | false | false | false | false | false | 0 |
gcu_chem3d_viewer_finalize (GObject *obj)
{
GcuChem3DViewer *viewer = GCU_CHEM3D_VIEWER (obj);
if (viewer->Doc) {
delete viewer->Doc->GetView ();
delete viewer->Doc;
}
G_OBJECT_CLASS (parent_class)->finalize (obj);
} | false | false | false | false | false | 0 |
projects_conflict (Projects* self, GFile* dir1, GFile* dir2) {
gboolean result = FALSE;
gboolean _tmp0_ = FALSE;
gboolean _tmp1_ = FALSE;
GFile* _tmp2_ = NULL;
GFile* _tmp3_ = NULL;
gboolean _tmp4_ = FALSE;
g_return_val_if_fail (self != NULL, FALSE);
g_return_val_if_fail (dir1 != NULL, FALSE);
g_return_val_if_... | false | false | false | false | false | 0 |
enic_pp_preassociate_rr(struct enic *enic, int vf,
struct enic_port_profile *prev_pp, int *restore_pp)
{
struct enic_port_profile *pp;
int err;
int active = 0;
ENIC_PP_BY_INDEX(enic, vf, pp, &err);
if (err)
return err;
if (pp->request != PORT_REQUEST_ASSOCIATE) {
/* If pre-associate is not part of an assoc... | false | false | false | false | false | 0 |
_stuffAllRunsOnALine(void)
{
UT_ASSERT(getFirstContainer() == NULL);
fp_Line* pLine = static_cast<fp_Line *>(getNewContainer());
UT_return_if_fail(pLine);
if(pLine->getContainer() == NULL)
{
fp_VerticalContainer * pContainer = NULL;
if(m_pSectionLayout->getFirstContainer())
{
// TODO assert something here... | false | false | false | false | false | 0 |
sierra_probe(struct usb_serial *serial,
const struct usb_device_id *id)
{
int result = 0;
struct usb_device *udev;
u8 ifnum;
udev = serial->dev;
ifnum = sierra_calc_interface(serial);
/*
* If this interface supports more than 1 alternate
* select the 2nd one
*/
if (serial->interface->num_altsetting ==... | false | false | false | false | false | 0 |
filePath() const
{
QString result = m_device->prop("volume.mount_point").toString();
if (result.isEmpty()) {
QStringList mountpoints
= FstabHandling::possibleMountPoints(m_device->prop("block.device").toString());
if (mountpoints.size()==1) {
result = mountpoints.first()... | false | false | false | false | false | 0 |
FITS_header_info( const void * p )
{
const SPEC *h = p;
static char hbuf[ 15 ][ 80 ];
static char *buf[ 15 ];
int i,
j;
for ( i = 0; i < 15; i++ )
buf[ i ] = hbuf[ i ];
i = 0;
sprintf( buf[ i++ ], "SIMPLE\t= %c", h->simple == 1 ? 'Y' : 'N' );
sprintf( buf[ i++ ], "NAXIS... | false | false | false | false | false | 0 |
process_each_segment_in_pv(struct cmd_context *cmd,
struct volume_group *vg,
struct physical_volume *pv,
void *handle,
process_single_pvseg_fn_t process_single_pvseg)
{
struct pv_segment *pvseg;
struct pv_list *pvl;
const char *vg_name = NULL;
int ret_max = ECMD_PROCESSED;
i... | false | false | false | false | false | 0 |
handleDropEvent(PlexyDesk::AbstractDesktopWidget * /*widget*/, QDropEvent *event)
{
///TODO create a New Image Browser UI
//for now just set the pixmap picture
qDebug() << Q_FUNC_INFO;
if ( event->mimeData()->urls().count() >= 0 ) {
const QString droppedFile = event->mimeData()->urls().value(0)... | false | false | false | false | false | 0 |
GC_with_callee_saves_pushed(void (*fn)(ptr_t, void *),
ptr_t arg)
{
word dummy;
void * context = 0;
# if defined(HAVE_PUSH_REGS)
GC_push_regs();
# elif defined(UNIX_LIKE) && !defined(NO_GETCONTEXT)
/* Older versions of Darwin seem to lack getcontext(). ... | false | false | false | false | false | 0 |
lam_arr_init(int elemsize, lam_array_comp_fn_t comp)
{
/* Create the entry and fill it up */
lam_array_t *a = malloc(sizeof(lam_array_t));
if (a == NULL)
return NULL;
a->la_element_size = elemsize;
a->la_num_allocated = 0;
a->la_num_used = 0;
a->la_array = NULL;
a->la_comp = comp;
expand_array(... | false | false | false | false | false | 0 |
cmd_feature(CMD_ARGS)
{
int i;
(void)priv;
(void)cmd;
if (av == NULL)
return;
for (i = 1; av[i] != NULL; i++) {
#ifdef SO_RCVTIMEO_WORKS
if (!strcmp(av[i], "SO_RCVTIMEO_WORKS"))
continue;
#endif
if (sizeof(void*) == 8 && !strcmp(av[i], "64bit"))
continue;
if (!strcmp(av[i], "!OSX")) {
#if !defined... | false | false | false | false | false | 0 |
labelPixelWidth(unsigned labelPixelWidth_)
{
if (_fieldLabel!=0)
{
if (_fieldLabel->length()==0) labelPixelWidth_=0;
if (_fieldLabel->width()!=labelPixelWidth_)
{
int offset=highlightThickness()+shadowThickness();
if (labelAlignment()==MSTop)
{
unsigned lh=_fieldLabel->textHeight()+
... | false | false | false | false | false | 0 |
zr364xx_got_frame(struct zr364xx_camera *cam, int jpgsize)
{
struct zr364xx_dmaqueue *dma_q = &cam->vidq;
struct zr364xx_buffer *buf;
unsigned long flags = 0;
int rc = 0;
DBG("wakeup: %p\n", &dma_q);
spin_lock_irqsave(&cam->slock, flags);
if (list_empty(&dma_q->active)) {
DBG("No active queue to serve\n");
... | false | false | false | false | false | 0 |
ixgbe_clear_vf_vlans(struct ixgbe_adapter *adapter, u32 vf)
{
struct ixgbe_hw *hw = &adapter->hw;
u32 i;
/* post increment loop, covers VLVF_ENTRIES - 1 to 0 */
for (i = IXGBE_VLVF_ENTRIES; i--;) {
u32 bits[2], vlvfb, vid, vfta, vlvf;
u32 word = i * 2 + vf / 32;
u32 mask = 1 << (vf % 32);
vlvfb = IXGBE_RE... | false | false | false | false | false | 0 |
deepCompareDomNodes(const QDomNode & node1, const QDomNode & node2)
{
// compare name and value
if (node1.nodeName() != node2.nodeName() || node1.nodeValue() != node2.nodeValue())
return false;
// recursively compare children
const QDomNodeList node1Children = node1.childNodes();
... | false | false | false | false | false | 0 |
ssl_DefSend(sslSocket *ss, const unsigned char *buf, int len, int flags)
{
PRFileDesc *lower = ss->fd->lower;
int sent = 0;
#if NSS_DISABLE_NAGLE_DELAYS
/* Although this is overkill, we disable Nagle delays completely for
** SSL sockets.
*/
if (ss->opt.useSecurity && !ss->delayDisabled) {
ssl... | false | false | false | false | false | 0 |
finish_for_stmt (tree for_stmt)
{
/* Pop the scope for the body of the loop. */
do_poplevel ();
RECHAIN_STMTS (for_stmt, FOR_BODY (for_stmt));
if (NEW_FOR_SCOPE_P (for_stmt))
do_poplevel ();
finish_stmt ();
} | false | false | false | false | true | 1 |
type_has_full_pointer(const type_t *type, const attr_list_t *attrs,
int toplevel_param)
{
switch (typegen_detect_type(type, NULL, TDT_IGNORE_STRINGS))
{
case TGT_USER_TYPE:
return FALSE;
case TGT_POINTER:
if (get_pointer_fc(type, attrs, toplevel_param) ==... | false | false | false | false | false | 0 |
process_message(unsigned long type,unsigned long *body)
{
int msglen;
switch (type)
{
case M_ADD_WINDOW:
case M_CONFIGURE_WINDOW:
relay_packet(type, sizeof(struct ConfigWinPacket) * SOL, body);
break;
case M_ICON_LOCATION:
case M_ICONIFY:
relay_packet(type, 7 * SOL, body);
break;
case... | false | false | false | false | false | 0 |
gdl_dock_item_showhide_grip (GdlDockItem *item)
{
gdl_dock_item_detach_menu (GTK_WIDGET (item), NULL);
if (item->priv->grip) {
if (GDL_DOCK_ITEM_GRIP_SHOWN (item) &&
GDL_DOCK_ITEM_NOT_LOCKED(item))
gdl_dock_item_grip_show_handle (GDL_DOCK_ITEM_GRIP (item->priv->grip));
e... | false | false | false | false | false | 0 |
eject_named_disk(Disk *dsk, const char *name, const char *partition_name)
{
if(dsk->fd < 0) {
return;
}
/* If name matches, eject the disk! */
if(!strcmp(dsk->name_ptr, name)) {
/* It matches, eject it */
if((partition_name != 0) && (dsk->partition_name != 0)) {
/* If both have partitions, and they diffe... | false | false | false | false | false | 0 |
ProcLockWakeup(LockMethod lockMethodTable, LOCK *lock)
{
PROC_QUEUE *waitQueue = &(lock->waitProcs);
int queue_size = waitQueue->size;
PGPROC *proc;
LOCKMASK aheadRequests = 0;
Assert(queue_size >= 0);
if (queue_size == 0)
return;
proc = (PGPROC *) MAKE_PTR(waitQueue->links.next);
while (queue_size--... | false | false | false | false | false | 0 |
cp_parser_objc_selector_expression (cp_parser* parser)
{
tree sel_seq = NULL_TREE;
bool maybe_unary_selector_p = true;
cp_token *token;
location_t loc = cp_lexer_peek_token (parser->lexer)->location;
cp_lexer_consume_token (parser->lexer); /* Eat '@selector'. */
cp_parser_require (parser, CPP_OPEN_PAREN,... | false | false | false | false | false | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.