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 |
|---|---|---|---|---|---|---|
autoQuoteApostrophe(const UnicodeString& pattern, UErrorCode& status) {
UnicodeString result;
if (U_SUCCESS(status)) {
int32_t plen = pattern.length();
const UChar* pat = pattern.getBuffer();
int32_t blen = plen * 2 + 1; // space for null termination, convenience
UChar* buf = res... | false | false | false | false | false | 0 |
terminal_accels_shutdown (void)
{
GConfClient *conf;
conf = gconf_client_get_default ();
gconf_client_notify_remove (conf, gconf_notify_id);
gconf_client_remove_dir (conf, CONF_KEYS_PREFIX, NULL);
g_object_unref (conf);
if (sync_idle_id != 0)
{
g_source_remove (sync_idle_id);
sync_idle_id ... | false | false | false | false | false | 0 |
lookup_load_shortlist(nlookup_t *nl)
{
knode_t **kvec;
int kcnt;
int i;
int contactable = 0;
lookup_check(nl);
/*
* Start with nodes from the routing table.
*/
WALLOC_ARRAY(kvec, KDA_K);
kcnt = dht_fill_closest(nl->kuid, kvec, KDA_K, NULL, FALSE);
for (i = 0; i < kcnt; i++) {
knode_t *kn = kvec[i];
... | false | false | false | false | false | 0 |
split_path_and_file(JCR *jcr, B_DB *mdb, const char *fname)
{
const char *p, *f;
/* Find path without the filename.
* I.e. everything after the last / is a "filename".
* OK, maybe it is a directory name, but we treat it like
* a filename. If we don't find a / then the whole name
* must be a path ... | false | false | false | false | false | 0 |
_gnutls_ssl3_hash_md5 (const void *first, int first_len,
const void *second, int second_len,
int ret_len, opaque * ret)
{
opaque digest[MAX_HASH_SIZE];
digest_hd_st td;
int block = _gnutls_hash_get_algo_len (GNUTLS_MAC_MD5);
int rc;
rc = _gnutls_hash_init (&td, G... | false | false | false | false | true | 1 |
get_key_or_joy (void)
{
if (key_ready ())
return (get_key ());
if (kbjoy[0] && !kbjoyold[0])
return (HK_Up);
if (kbjoy[1] && !kbjoyold[1])
return (HK_Right);
if (kbjoy[2] && !kbjoyold[2])
return (HK_Down);
if (kbjoy[3] && !kbjoyold[3])
return (HK_Left);
if (kbjoy[4] && !kbjoyold[4])
... | false | false | false | false | false | 0 |
get_bus(char *device)
{
char file[PATH_MAX];
char s[1024];
FILE *f;
if (!strcmp(device, "/sys/devices/virtual"))
return MEDIA_BUS_VIRTUAL;
snprintf(file, PATH_MAX, "%s/modalias", device);
f = fopen(file, "r");
if (!f)
return MEDIA_BUS_UNKNOWN;
if (!fgets(s, sizeof(s), f))
return MEDIA_BUS_UNKNOWN;
fclo... | false | false | false | false | false | 0 |
closeTab()
{
int idx = m_tabWidget->currentIndex();
m_tabWidget->removeTab(idx);
m_openDocuments.removeAt(idx);
if (m_openDocuments.isEmpty())
m_tabWidget->hide();
} | false | false | false | false | false | 0 |
add_song_to_gui_playlist(mpd_Song *song, gint pos) {
GtkTreeIter iter;
gchar title[1024];
if( !glurp->gui_playlist ) {
debug("No playlist liststore!");
return;
}
if( !song ) {
debug("song == NULL, ignoring");
return;
}
gtk_list_store_append(glurp->gui_playlist, &iter);
mpd_song_markup... | false | false | false | false | false | 0 |
dict_field_print_low(
/*=================*/
const dict_field_t* field) /*!< in: field */
{
ut_ad(mutex_own(&(dict_sys->mutex)));
fprintf(stderr, " %s", field->name);
if (field->prefix_len != 0) {
fprintf(stderr, "(%lu)", (ulong) field->prefix_len);
}
} | false | false | false | false | false | 0 |
handle_sighup(void)
{
fprintf(stderr,
"Received SIGHUP. "
"If this is an error, send another one within 5 seconds\n");
n_sighups = 1;
sleep(5);
if (n_sighups > 1) {
n_sighups = 0;
fprintf(stderr, "Continuing\n");
return;
}
fprintf(stderr, "Exiting...\n");
signal(SIGHUP, SIG_DFL);
kill(... | false | false | false | false | false | 0 |
layer_readyRead(const QByteArray &a)
{
SecureLayer *s = (SecureLayer *)sender();
QList<SecureLayer*>::Iterator it(d->layers.begin());
while((*it) != s) {
Q_ASSERT(it != d->layers.end());
++it;
}
Q_ASSERT(it != d->layers.end());
// pass upwards
++it;
if (it != d->layers.end()) {
s = (*it);
s->writeIncom... | false | false | false | false | false | 0 |
bfa_fcs_rport_fcs_online_action(struct bfa_fcs_rport_s *rport)
{
if ((!rport->pid) || (!rport->pwwn)) {
bfa_trc(rport->fcs, rport->pid);
bfa_sm_fault(rport->fcs, rport->pid);
}
bfa_sm_send_event(rport->itnim, BFA_FCS_ITNIM_SM_FCS_ONLINE);
} | false | false | false | false | false | 0 |
vfy(V v,A a)
{
I z;
if (NULL==vfyFP) { H("WARNING: uninitialized vfy called\n"); R -1; }
suppressFpeDomain=1;nExternalFPE=0;
z=(*vfyFP)(v,a);
if(dbg_xfpe)xfpechk("vfy callout",nExternalFPE);
suppressFpeDomain=0;
R z;
} | false | false | false | false | false | 0 |
closeNow()
{
close();
// It might happen the next scenario:
// - Start a job which opens a progress widget. Keep it open. Address job is 0xdeadbeef
// - Start a new job, which is given address 0xdeadbeef. A new window is opened.
// This one will take much longer to complete. The key 0xdeadbeef on... | false | false | false | false | false | 0 |
gt_reads2twobit_set_separators_to_less_frequent_char(
GtReads2Twobit *r2t)
{
unsigned long seqnum, pos, codenum, posincode;
GtTwobitencoding sepcode, code, mask, shift;
sepcode = gt_reads2twobit_less_frequent_char(r2t);
if (sepcode != r2t->current_sepcode && r2t->nofseqs > 1UL)
{
unsigned long from, t... | false | false | false | false | false | 0 |
DSDPVMatMult(DSDPVMat X, SDPConeVec Z, SDPConeVec Y){
int info,n;
double *z,*y;
DSDPFunctionBegin;
info=SDPConeVecGetSize(Y,&n); DSDPCHKERR(info);
if (X.dsdpops->matmult){
info=SDPConeVecGetArray(Z,&z); DSDPCHKERR(info);
info=SDPConeVecGetArray(Y,&y); DSDPCHKERR(info);
info=(X.dsdpops->matmult)(X.... | false | false | false | false | false | 0 |
start_index_file (void)
{
if (I_index_file && strcmp (I_index_file, "-") != 0) {
FILE * ifp;
if (atoi(I_index_file) != 0) {
ndmjob_log (1, "Writing index (-I%s)", I_index_file);
ifp = fdopen(atoi(I_index_file), "w");
} else {
ndmjob_log (1, "Writing index (-I%s)", I_index_file);
ifp = fopen (I_inde... | false | false | true | false | true | 1 |
glfs_first_lookup_safe (xlator_t *subvol)
{
loc_t loc = {0, };
int ret = -1;
loc.inode = subvol->itable->root;
memset (loc.gfid, 0, 16);
loc.gfid[15] = 1;
loc.path = "/";
loc.name = "";
ret = syncop_lookup (subvol, &loc, 0, 0, 0, 0);
gf_log (subvol->name, GF_LOG_DEBUG, "first lookup complete %d", ret);
... | false | false | false | false | false | 0 |
vme_bus_error_handler(struct vme_bridge *bridge,
unsigned long long address, int am)
{
struct list_head *handler_pos = NULL;
struct vme_error_handler *handler;
int handler_triggered = 0;
u32 aspace = vme_get_aspace(am);
list_for_each(handler_pos, &bridge->vme_error_handlers) {
handler = list_entry(handler... | false | false | false | false | false | 0 |
dowait(status)
wait_status_t *status; /* may be NULL */
{
# ifdef IPROCS
while (DeadPid != ChildPid) {
wait_status_t w;
pid_t rpid = wait(&w);
if (rpid == -1) {
if (errno == ECHILD) {
/* fudge what we hope is a bland value */
byte_zero((UnivPtr)&DeadStatus, sizeof(wait_status_t));
break;
}
}... | false | false | false | false | false | 0 |
getPoints( OGRRawPoint * paoPointsOut, double * padfZ ) const
{
if ( ! paoPointsOut )
return;
memcpy( paoPointsOut, paoPoints, sizeof(OGRRawPoint) * nPointCount );
/* -------------------------------------------------------------------- */
/* Check 2D/3D. ... | false | false | false | false | false | 0 |
flmGetCompoundKeys(
FDB * pDb,
IXD * pIxd,
FLMBOOL bRemoveDups,
F_Pool * pPool,
FlmRecord * pRecord,
FLMUINT uiContainerNum,
REC_KEY ** ppKeyList)
{
RCODE rc = FERR_OK;
IFD * pFirstIfd;
IFD * pIfd;
CDL ** ppCdlTbl = pDb->KrefCntrl.ppCdlTbl;
FLMUINT uiFirstCdlEntry;
FLMUINT ui... | false | false | false | false | false | 0 |
decodeContact(char* trame, struct sensorType* capteur) {
char and = '1';
if (((trame[15])&(and)) == and) {
((dataCONTACT*) capteur->data)->contact = 1;
} else {
((dataCONTACT*) capteur->data)->contact = 0;
}
logValue(capteur->id, "contact", ((dataCONTACT*) capteur->data)->contact);
... | false | false | false | false | false | 0 |
set_fork_info (TestResult *tr, int status, int signal_expected)
{
int was_sig;
int was_exit;
int exit_status;
int signal_received;
#if HAVE_FORK
was_sig = WIFSIGNALED(status);
was_exit = WIFEXITED(status);
exit_status = WEXITSTATUS(status);
signal_received = WTERMSIG(status);
#else //HAVE_FORK
was_si... | false | false | false | false | false | 0 |
imap_reset(void *rock)
{
struct generic_context_t *gentext = (struct generic_context_t *)rock;
struct imap_context_t *text = (struct imap_context_t *)gentext->rock;
char tag[64];
static int i=0;
if(text->inLiteral || gentext->midLine) return IMTEST_FAIL;
snprintf(tag, sizeof(tag) - 1, "UN%d",... | true | true | false | false | false | 1 |
gf_odf_write_pl_ext(GF_BitStream *bs, GF_PLExt *pld)
{
GF_Err e;
u32 size;
if (!pld) return GF_BAD_PARAM;
e = gf_odf_size_descriptor((GF_Descriptor *)pld, &size);
if (e) return e;
e = gf_odf_write_base_descriptor(bs, pld->tag, size);
if (e) return e;
gf_bs_write_int(bs, pld->profileLevelIndicationIndex, 8);
... | false | false | false | false | false | 0 |
build_media_from_entry_search_cb (GrlMedia *media, gpointer user_data)
{
/*
* TODO: Async resolution of URL messes (or could mess) with the sorting,
* If we want to ensure a particular sorting or implement sorting
* mechanisms we should add code to handle that here so we emit items in
* the right order an... | false | false | false | false | false | 0 |
teardown (Fixture *fixture, gconstpointer pData)
{
QofBook *book = xaccSplitGetBook (fixture->split);
Account *acc = xaccSplitGetAccount (fixture->split);
Transaction *txn = xaccSplitGetParent (fixture->split);
GNCLot *lot = xaccSplitGetLot (fixture->split);
test_destroy (fixture->split->gains_split... | false | false | false | false | false | 0 |
sys_rcfile(void)
{
FILE* file;
int i;
int k;
int rcargc;
char* rcargv[NUMARGS];
char* buffer;
char fname[MAXPDSTRING], buf[1000], *home = getenv("HOME");
int retval = 1; /* that's what we will return at the end; for now, let's think it'll be an error */
/* initialize rc-arg-array ... | true | true | false | false | true | 1 |
authorize(const char* passwd) {
bool found=false, authorized;
int retval, n;
char nonce[256], nonce_hash[256], buf[256];
RPC rpc(this);
XML_PARSER xp(&rpc.fin);
retval = rpc.do_rpc("<auth1/>\n");
if (retval) return retval;
while (!xp.get_tag()) {
if (!xp.is_tag) continue;
... | false | false | false | false | false | 0 |
peek_buf_has_control0_command(buf_t *buf)
{
if (buf->datalen >= 4) {
char header[4];
uint16_t cmd;
peek_from_buf(header, sizeof(header), buf);
cmd = ntohs(get_uint16(header+2));
if (cmd <= 0x14)
return 1; /* This is definitely not a v1 control command. */
}
return 0;
} | false | false | false | false | false | 0 |
p_is_char_ge(li_object *args) {
assert_nargs(2, args);
assert_character(li_car(args));
assert_character(li_cadr(args));
return li_boolean(li_to_character(li_car(args)) >= li_to_character(li_cadr(args)));
} | false | false | false | false | false | 0 |
next(int n) const {
if (n < 0) return 0; // this is so selected==-1 returns NULL
const Fl_Menu_Item* m = this;
int nest = 0;
if (!m->visible()) n++;
while (n>0) {
if (!m->text) {
if (!nest) return m;
nest--;
} else if (m->flags&FL_SUBMENU) {
nest++;
}
m++;
if (!nest && m-... | false | false | false | false | false | 0 |
cx18_unload_queues(struct cx18_stream *s)
{
struct cx18_queue *q_idle = &s->q_idle;
struct cx18_mdl *mdl;
struct cx18_buffer *buf;
/* Move all MDLS to q_idle */
cx18_queue_flush(s, &s->q_busy, q_idle);
cx18_queue_flush(s, &s->q_full, q_idle);
cx18_queue_flush(s, &s->q_free, q_idle);
/* Reset MDL id's and move... | false | false | false | false | false | 0 |
pixSetPixelColumn(PIX *pix,
l_int32 col,
l_float32 *colvect)
{
l_int32 i, w, h, wpl;
l_uint32 *data;
PROCNAME("pixSetCPixelColumn");
if (!pix || pixGetDepth(pix) != 8)
return ERROR_INT("pix not defined or not 8 bpp", procName, 1);
if (!colvect)
... | false | false | false | false | false | 0 |
isCurNodeBlocked ( void )
{
// for non-lazy blocking blocked status is correct
if ( !useLazyBlocking() )
return curNode->isBlocked();
// update node's blocked status
if ( !curNode->isBlocked() && curNode->isAffected() )
{
updateLevel ( curNode, curConcept.getDep() );
CGraph.detectBlockedStatus(curNode);
}
... | false | false | false | false | false | 0 |
integrateV(OfxTime time1, OfxTime time2, va_list arg)
{
double *r = va_arg(arg, double*);
double *g = va_arg(arg, double*);
double *b = va_arg(arg, double*);
double *a = va_arg(arg, double*);
OfxStatus stat = integrate(time1, time2, *r, *g, *b, *a);
# ifdef OFX_DEBUG_... | false | false | false | false | false | 0 |
gst_tag_get_description (const gchar * tag)
{
GstTagInfo *info;
g_return_val_if_fail (tag != NULL, NULL);
info = gst_tag_lookup (tag);
g_return_val_if_fail (info != NULL, NULL);
return info->blurb;
} | false | false | false | false | false | 0 |
qmonSchedOk(Widget w, XtPointer cld, XtPointer cad)
{
lList *scl = NULL;
lListElem *sep = NULL;
lEnumeration *what = NULL;
lList *alp = NULL;
Boolean status = False;
DENTER(GUI_LAYER, "qmonSchedOk");
/*
** get the contents of the dialog fields here,
** build the cull list and send gdi reque... | false | false | false | false | false | 0 |
online_notify (gboolean online, gpointer user_data)
{
SwServiceTwitter *twitter = (SwServiceTwitter *)user_data;
SwServiceTwitterPrivate *priv = twitter->priv;
SW_DEBUG (TWITTER, "Online: %s", online ? "yes" : "no");
/* Clear the token and token secret stored inside the proxy */
oauth_proxy_set_token (OAUTH... | false | false | false | false | false | 0 |
group_display(struct widget *w)
{
struct widget *widget;
list_for_each_entry(widget, &WIDGET_GROUP(w)->list, node) {
if (widget->enabled && widget->display)
widget->display(widget);
}
} | false | false | false | false | false | 0 |
ExpandPrivateRval(char *scopeid,void *rval,char type)
{ char buffer[CF_EXPANDSIZE];
struct FnCall *fp,*fpe;
struct Rval returnval;
Debug("ExpandPrivateRval(scope=%s,type=%c)\n",scopeid,type);
/* Allocates new memory for the copy */
returnval.item = NULL;
returnval.rtype = CF_NOPROMISEE;
switch (type)
{
... | true | true | false | false | false | 1 |
ifoRead_CELL_PLAYBACK_TBL(ifo_handle_t *ifofile,
cell_playback_t *cell_playback,
unsigned int nr, unsigned int offset) {
unsigned int i;
unsigned int size = nr * sizeof(cell_playback_t);
if(!DVDFileSeek_(ifofile->file, offset))
return ... | false | false | false | false | false | 0 |
ni_mc_load_microcode(struct radeon_device *rdev)
{
const __be32 *fw_data;
u32 mem_type, running, blackout = 0;
u32 *io_mc_regs;
int i, ucode_size, regs_size;
if (!rdev->mc_fw)
return -EINVAL;
switch (rdev->family) {
case CHIP_BARTS:
io_mc_regs = (u32 *)&barts_io_mc_regs;
ucode_size = BTC_MC_UCODE_SIZE;
... | false | false | false | false | false | 0 |
defdict_repr(defdictobject *dd)
{
PyObject *defrepr;
PyObject *baserepr;
PyObject *result;
baserepr = PyDict_Type.tp_repr((PyObject *)dd);
if (baserepr == NULL)
return NULL;
if (dd->default_factory == NULL)
defrepr = PyString_FromString("None");
else
{
int status ... | false | false | false | false | false | 0 |
eap_input(unit, inp, inlen)
int unit;
u_char *inp;
int inlen;
{
eap_state *esp = &eap_states[unit];
u_char code, id;
int len;
/*
* Parse header (code, id and length). If packet too short,
* drop it.
*/
if (inlen < EAP_HEADERLEN) {
error("EAP: packet too short: %d < %d", inlen, EAP_HEADERLEN);
return;
... | false | false | false | false | false | 0 |
release(const Event& e)
{
if (active_) {
current_window_ = e.window();
SelectionManager* s = e.display()->primary_selection();
switch(drag_mode_) {
case DragSelect:
// copy and own current selection
copy_selection(s);
own_selection(s);
break;
case DragMenu:
// unselect... | false | false | false | false | false | 0 |
all_streams_prerolled (GstASFDemux * demux)
{
GstClockTime preroll_time;
guint i, num_no_data = 0;
/* Allow at least 500ms of preroll_time */
preroll_time = MAX (demux->preroll, 500 * GST_MSECOND);
/* returns TRUE as long as there isn't a stream which (a) has data queued
* and (b) the timestamp of last ... | false | false | false | false | false | 0 |
cache_manager_standard_clean_close_cb(GenericDialog *gd, gpointer data)
{
CleanData *cd = data;
#if GTK_CHECK_VERSION(2,20,0)
if (!gtk_widget_get_sensitive(cd->button_close)) return;
#else
if (!GTK_WIDGET_SENSITIVE(cd->button_close)) return;
#endif
generic_dialog_close(cd->gd);
thumb_loader_std_thumb_file_valid... | false | false | false | false | false | 0 |
ev_ses_starting(struct ap_session *ses)
{
struct log_file_pd_t *lpd;
char *fname1, *fname2;
lpd = find_lpd(ses, &pd_key2);
if (!lpd)
return;
fname1 = _malloc(PATH_MAX);
if (!fname1) {
log_emerg("log_file: out of memory\n");
return;
}
fname2 = _malloc(PATH_MAX);
if (!fname2) {
log_emerg("log_file: o... | false | false | false | false | false | 0 |
EvalPlanQual(EState *estate, EPQState *epqstate,
Relation relation, Index rti,
ItemPointer tid, TransactionId priorXmax)
{
TupleTableSlot *slot;
HeapTuple copyTuple;
Assert(rti > 0);
/*
* Get and lock the updated version of the row; if fail, return NULL.
*/
copyTuple = EvalPlanQualFetch(estate, relat... | false | false | false | false | false | 0 |
get_g3d_raster_value_as_double(void *map, int x, int y, int z,
int type, double nullval)
{
double val = 0;
float fvalue;
double dvalue;
if (type == FCELL_TYPE) {
G3d_getValue(map, x, y, z, &fvalue, type);
if (G3d_isNullValueNum(&fvalue, FCELL_TYPE))
val = nullval;
else
val = (dou... | false | false | false | false | false | 0 |
EmitIsRegExpEquivalent(ZoneList<Expression*>* args) {
ASSERT_EQ(2, args->length());
Register right = rax;
Register left = rbx;
Register tmp = rcx;
VisitForStackValue(args->at(0));
VisitForAccumulatorValue(args->at(1));
__ pop(left);
NearLabel done, fail, ok;
__ cmpq(left, right);
__ j(equal, &ok)... | false | false | false | false | false | 0 |
User_notifyofnotesonsignon(userrec *u, nickrec *n)
{
int new;
/* check to see if they have any New notes */
context;
new = Note_numnew(u);
context;
if(new)
sendnotice(n->nick,"You have %d new Note%s. (%d total) - ('rn n' to display)",new,new==1?"":"s",u->num_notes);
context;
} | false | false | false | false | false | 0 |
send_abort(struct iwch_ep *ep, struct sk_buff *skb, gfp_t gfp)
{
struct cpl_abort_req *req;
PDBG("%s ep %p\n", __func__, ep);
skb = get_skb(skb, sizeof(*req), gfp);
if (!skb) {
printk(KERN_ERR MOD "%s - failed to alloc skb.\n",
__func__);
return -ENOMEM;
}
skb->priority = CPL_PRIORITY_DATA;
set_arp... | false | false | false | false | false | 0 |
sendUserException(giopStream* g,const CORBA::UserException& ex) {
GIOP_S& giop_s = *(GIOP_S*)g;
cdrStream& s = (cdrStream&) *g;
giop_s.state(GIOP_S::ReplyIsBeingComposed);
int repoid_size;
const char* repoid = ex._NP_repoId(&repoid_size);
outputNewMessage(g);
char* hdr = (char*)g->pd_currentOutputBuf... | false | false | false | false | false | 0 |
root_path() const
{
path temp(root_name());
if (!root_directory().empty()) temp.m_pathname += root_directory().c_str();
return temp;
} | false | false | false | false | false | 0 |
process(void)
{
EFFECT_MODULATING_DELAY::process();
i.begin();
while(!i.end()) {
SAMPLE_SPECS::sample_t temp1 = 0.0;
parameter_t p = vartime * lfo.value(lfo_pos_secs_rep);
if (filled[i.channel()] == true) {
DBC_CHECK((dtime + delay_index[i.channel()] + static_cast<long int>(p)) % (dtime * 2) >=... | false | false | false | false | false | 0 |
unspace_string(const char *str)
{
static const char *spaces = " \t\n";
char *tr_str = CatString2(str, NULL);
int i;
if (!tr_str)
{
return NULL;
}
for (i = 0; i < strlen(spaces); i++)
{
char *ptr = tr_str;
while ((ptr = strchr(ptr, spaces[i])) != NULL)
{
*(ptr++) = '_';
}
}
return tr_str;
} | false | false | false | false | false | 0 |
brcmf_sdio_bus_sleep(struct brcmf_sdio *bus, bool sleep, bool pendok)
{
int err = 0;
u8 clkcsr;
brcmf_dbg(SDIO, "Enter: request %s currently %s\n",
(sleep ? "SLEEP" : "WAKE"),
(bus->sleeping ? "SLEEP" : "WAKE"));
/* If SR is enabled control bus state with KSO */
if (bus->sr_enabled) {
/* Done if we're ... | false | false | false | false | false | 0 |
EventHandler(event)
XEvent *event;
{
switch (event->type)
{
case ButtonPress:
if (windowState.tooSmall);
else if (FGetEvent != NULL)
(*FGetEvent)(event);
else
HandleButton(&event->xbutton);
break;
case KeyPress:
if (windowState.tooSmall);
else if (FGetEvent != NULL)
(*... | false | false | false | false | false | 0 |
RegisterXMLFormat(XMLBaseFormat* pFormat, bool IsDefault, const char* uri)
{
if(IsDefault || Namespaces().empty())
_pDefault=pFormat;
if(uri)
Namespaces()[uri] = pFormat;
else
Namespaces()[pFormat->NamespaceURI()] = pFormat;
} | false | false | false | false | false | 0 |
xmp_iterator_skip(XmpIteratorPtr iter, XmpIterSkipOptions options)
{
CHECK_PTR(iter, false);
RESET_ERROR;
SXMPIterator *titer = (SXMPIterator*)iter;
titer->Skip(options);
return true;
} | false | false | false | false | false | 0 |
physdev_save(const void *ip, const struct xt_entry_match *match)
{
const struct xt_physdev_info *info = (const void *)match->data;
if (info->bitmask & XT_PHYSDEV_OP_ISIN)
printf("%s --physdev-is-in",
(info->invert & XT_PHYSDEV_OP_ISIN) ? " !" : "");
if (info->bitmask & XT_PHYSDEV_OP_IN)
printf("%s --ph... | false | false | false | false | false | 0 |
aspell_config_retrieve_list(Config * ths, const char * key, MutableContainer * lst)
{
PosibErr<void> ret = ths->retrieve_list(key, lst);
ths->err_.reset(ret.release_err());
if (ths->err_ != 0) return 0;
return 1;
} | false | false | false | false | false | 0 |
squelch_item_ok(const object_type *o_ptr)
{
byte type;
if (p_ptr->unignoring)
return FALSE;
/* Don't squelch artifacts unless marked to be squelched */
if (o_ptr->artifact ||
check_for_inscrip(o_ptr, "!k") || check_for_inscrip(o_ptr, "!*"))
return FALSE;
/* Do squelch individual objects that marked ignor... | false | false | false | false | false | 0 |
get_cmap (GdkPixmap *pixmap)
{
GdkColormap *cmap;
cmap = gdk_drawable_get_colormap (pixmap);
if (cmap)
g_object_ref (G_OBJECT (cmap));
if (cmap == NULL)
{
if (gdk_drawable_get_depth (pixmap) == 1)
{
/* try null cmap */
cmap = NULL;
}
else
{
... | false | false | false | false | false | 0 |
array_element_has_equality(TypeCacheEntry *typentry)
{
if (!(typentry->flags & TCFLAGS_CHECKED_ELEM_PROPERTIES))
cache_array_element_properties(typentry);
return (typentry->flags & TCFLAGS_HAVE_ELEM_EQUALITY) != 0;
} | false | false | false | false | false | 0 |
pixGetBackgroundGrayMapMorph(PIX *pixs,
PIX *pixim,
l_int32 reduction,
l_int32 size,
PIX **ppixm)
{
l_int32 nx, ny, empty, fgpixels;
l_float32 scale;
PIX *pixm, *pixt1, *pixt2, *pix... | false | false | false | false | false | 0 |
mailid (const std::string uid = std::string(""))
{
if (uid.size () > 0)
mailid_ = uid;
else {
std::stringstream ss;
ss << g_str_hash (sender_.c_str());
ss << g_str_hash (subject_.c_str());
ss << g_str_hash (date_.c_str());
mailid_ = ss.str ();
}
} | false | false | false | false | false | 0 |
__free_thd_list(struct thread_t *thp)
{
register struct thread_t *thp2, *thp3;
for (thp2 = thp; thp2 != NULL;)
{
thp3 = thp2->thright;
if (thp2->thofs != NULL) __free_thd_list(thp2->thofs);
__free_1thd(thp2);
thp2 = thp3;
}
} | false | false | false | false | false | 0 |
OnContextMenu(wxContextMenuEvent& evt)
{
wxPoint pt = evt.GetPosition();
ScreenToClient(&pt.x, &pt.y);
/*
Show context menu at event point if it's within the window,
or at caret location if not
*/
wxHitTest ht = this->HitTest(pt);
if (ht != wxHT_WINDOW_INSIDE) {
pt = this->Po... | false | false | false | false | false | 0 |
_configure_init_timer(void *data __UNUSED__)
{
handlers = eina_list_append
(handlers, ecore_event_handler_add
(EFREET_EVENT_DESKTOP_CACHE_UPDATE, _e_configure_cb_efreet_desktop_cache_update, NULL));
if (update_job) ecore_job_del(update_job);
update_job = ecore_job_add(_configure_job, NULL);
... | false | false | false | false | false | 0 |
project_copy (const Project* self, Project* dest) {
GFile* _tmp0_ = NULL;
GFile* _tmp1_ = NULL;
GFile* _tmp2_ = NULL;
GFile* _tmp3_ = NULL;
_tmp0_ = (*self).directory;
_tmp1_ = _g_object_ref0 (_tmp0_);
_g_object_unref0 ((*dest).directory);
(*dest).directory = _tmp1_;
_tmp2_ = (*self).main_file;
_tmp3_ = _g_ob... | false | false | false | false | false | 0 |
dev_rot_capture_sample(struct hid_sensor_hub_device *hsdev,
unsigned usage_id,
size_t raw_len, char *raw_data,
void *priv)
{
struct iio_dev *indio_dev = platform_get_drvdata(priv);
struct dev_rot_state *rot_state = iio_priv(indio_dev);
if (usage_id == HID_USAGE_SENSOR_ORIENT_QUATERNION) {
memcpy(rot_s... | false | false | false | false | false | 0 |
js_LeaveLocalRootScopeWithResult(JSContext *cx, jsval rval)
{
JSLocalRootStack *lrs;
uint32 mark, m, n;
JSLocalRootChunk *lrc;
/* Defend against buggy native callers. */
lrs = cx->localRootStack;
JS_ASSERT(lrs && lrs->rootCount != 0);
if (!lrs || lrs->rootCount == 0)
return;
ma... | false | false | false | false | false | 0 |
xref_decs (FILE_T f, TABLE_T * t)
{
if (INDICANTS (t) != NO_TAG) {
xref_tags (f, INDICANTS (t), INDICANT);
}
if (OPERATORS (t) != NO_TAG) {
xref_tags (f, OPERATORS (t), OP_SYMBOL);
}
if (PRIO (t) != NO_TAG) {
xref_tags (f, PRIO (t), PRIO_SYMBOL);
}
if (IDENTIFIERS (t) != NO_TAG) {
xref_tag... | false | false | false | false | false | 0 |
parseRequest(std::string const& request, XmlRpcValue& params)
{
std::string methodName;
int offset = 0; // Number of chars parsed from the request
bool emptyTag;
if (XmlRpcUtil::parseTag(METHODNAME_TAG, request, &offset, methodName) &&
XmlRpcUtil::findTag(PARAMS_TAG, request, &offset, &emptyTag) &&
... | false | false | false | false | false | 0 |
generate_subkey(AES_ctx *ctx, unsigned char *K1, unsigned char *K2)
{
unsigned char L[16];
unsigned char Z[16];
unsigned char tmp[16];
int i;
for ( i=0; i<16; i++ ) Z[i] = 0;
AES_encrypt(ctx, Z, L);
if ( (L[0] & 0x80) == 0 ) /* If MSB(L) = 0, then K1 = L << 1 */
{
leftshift_onebit(L,K1);
} else { /* ... | true | true | false | false | false | 1 |
zend_stack_destroy(zend_stack *stack)
{
int i;
if (stack->elements) {
for (i = 0; i < stack->top; i++) {
efree(stack->elements[i]);
}
efree(stack->elements);
}
return SUCCESS;
} | false | false | false | false | false | 0 |
SetVideoMode(VIDEOMODE_resolution_t *res, VIDEOMODE_MODE_t display_mode,
unsigned int out_w, unsigned int out_h,
int windowed, int rotate)
{
VIDEOMODE_actual_width = out_w;
VIDEOMODE_src_width = (*display_modes[display_mode].out2src_w_func)(out_w);
VIDEOMODE_src_heig... | false | false | false | false | false | 0 |
comment() {
try { // for error handling
match(COMMENT_START);
#line 159 "pf.g"
QStringList str;
while (LA(1) != ANTLR_USE_NAMESPACE(antlr)Token::EOF_TYPE &&
LA(1) != NEWLINE)
{
str << QString::fromUtf8(LT(1)->getText().c_str());
consume();
}
importer->last_comment << str.join(" ");
#line... | false | false | false | false | false | 0 |
stepd_daemon_pid(int fd)
{
int req = REQUEST_DAEMON_PID;
pid_t pid;
safe_write(fd, &req, sizeof(int));
safe_read(fd, &pid, sizeof(pid_t));
return pid;
rwfail:
return (pid_t)-1;
} | false | false | false | false | false | 0 |
stv0367cab_GetSymbolRate(struct stv0367_state *state, u32 mclk_hz)
{
u32 regsym;
u32 adp_khz;
regsym = stv0367_readreg(state, R367CAB_SRC_NCO_LL) +
(stv0367_readreg(state, R367CAB_SRC_NCO_LH) << 8) +
(stv0367_readreg(state, R367CAB_SRC_NCO_HL) << 16) +
(stv0367_readreg(state, R367CAB_SRC_NCO_HH) << 24);
adp... | false | false | false | false | false | 0 |
acdSetAssembly(AcdPAcd thys)
{
AjPAssemload val;
AjBool required = ajFalse;
AjBool ok = ajFalse;
AjBool nullok = ajFalse;
ajint itry;
AjPStr infname = NULL;
val = ajAssemloadNew(); /* set the default value */
acdAttrToBool(thys, "nullok", ajFalse, &nullok);
acdInF... | false | false | false | false | false | 0 |
FrameInstSetIterCount (FrameInst fi, int num)
{
ExtraData d;
ExtraDataRec dr;
register int i;
XimFrameType type;
i = 0;
while ((type = fi->template[i].type) != EOL)
{
switch (type)
{
case ITER:
if ((d = ChainMgrGetExtraData (&fi->cm, i)) == NULL)
... | false | false | false | false | false | 0 |
lconvert(char *s, long *r)
{ static char zero='0',nine='9';
long sgn;
long result;
char c;
sgn = 1L;
result = 0L;
if ((c = *s) == '-')
{ sgn = -1L;
c = *++s; }
else if (c == '+') c= *++s;
if (c >= zero)
if (c <= nine)
{ result = (long)(c - zero);
while ((c = *++s) >= z... | false | false | false | false | false | 0 |
qlcnic_83xx_napi_enable(struct qlcnic_adapter *adapter)
{
int ring;
struct qlcnic_host_sds_ring *sds_ring;
struct qlcnic_host_tx_ring *tx_ring;
struct qlcnic_recv_context *recv_ctx = adapter->recv_ctx;
if (adapter->is_up != QLCNIC_ADAPTER_UP_MAGIC)
return;
for (ring = 0; ring < adapter->drv_sds_rings; ring++)... | false | false | false | false | false | 0 |
resetHole()
{
if (askSave(true))
return;
setModified(false);
curHole--;
startNextHole();
resetHoleScores();
} | false | false | false | false | false | 0 |
rail_core_handle_server_minmax_info(
RAIL_SESSION* session,
uint32 window_id,
uint16 max_width, uint16 max_height,
uint16 max_pos_x, uint16 max_pos_y,
uint16 min_track_width, uint16 min_track_height,
uint16 max_track_width, uint16 max_track_height
)
{
RAIL_VCHANNEL_EVENT event = {0};
DEBUG_RAIL("rail_core_... | false | false | false | false | false | 0 |
__repmgr_prepare_simple_input(env, conn, msg_hdr)
ENV *env;
REPMGR_CONNECTION *conn;
__repmgr_msg_hdr_args *msg_hdr;
{
DBT *dbt;
u_int32_t control_size, rec_size;
int ret;
control_size = REP_MSG_CONTROL_SIZE(*msg_hdr);
rec_size = REP_MSG_REC_SIZE(*msg_hdr);
dbt = &conn->input.repmgr_msg.cntrl;
if ((dbt->siz... | false | false | false | false | false | 0 |
opj_procedure_list_add_procedure (opj_procedure_list_t * p_validation_list, opj_procedure p_procedure)
{
if (p_validation_list->m_nb_max_procedures == p_validation_list->m_nb_procedures)
{
opj_procedure * new_procedures;
p_validation_list->m_nb_max_procedures += OPJ_VALI... | false | false | false | false | false | 0 |
ImageSolarize (gpaint_image * input, gpaint_image * output)
{
int width = image_width (input);
int height = image_height (input);
int i;
unsigned char *ip, *op;
int count, limit;
limit = ImgProcessInfo.solarizeThreshold * 255 / 100;
{
ip = image_pixels (input);
op = image_... | false | false | false | false | false | 0 |
TimeAndValueQueueCompDesc( StatisticsHistory::TimeAndValueQueue* const &key, StatisticsHistory::TimeAndValueQueue* const &data )
{
if (key->sortValue > data->sortValue)
return -1;
if (key->sortValue < data->sortValue)
return 1;
if (key->key > data->key)
return -1;
if (key->key < data->key)
return 1... | false | false | false | false | false | 0 |
write_sqconfig(const char *dir, const char *configfile, const char *val)
{
char *p=malloc(strlen(dir) + strlen(configfile) + 2);
struct maildir_tmpcreate_info createInfo;
FILE *fp;
if (!p) enomem();
strcat(strcat(strcpy(p, dir), "/"), configfile);
if (!val)
{
unlink(p);
free(p);
return;
}
maildir_tmp... | false | true | false | false | true | 1 |
GetPlayerInvitesList(ObjectGuid const& guid, CalendarInvitesList& calInvList)
{
for (CalendarEventStore::iterator itr = m_EventStore.begin(); itr != m_EventStore.end(); ++itr)
{
CalendarEvent* event = &itr->second;
if (event->IsGuildAnnouncement())
continue;
CalendarInviteM... | false | false | false | false | false | 0 |
insertText(const std::string &text, const KEYCharacterStylePtr_t &style)
{
assert(bool(m_currentParagraph));
const KEYObjectPtr_t object(new TextSpanObject(style, text));
m_currentParagraph->objects.push_back(object);
} | false | false | false | false | false | 0 |
oneshot_drawcrosshairs( struct mame_bitmap *bitmap, const struct rectangle *cliprect )
{
int xpos,ypos;
/* get gun raw coordonates (player 1) */
gun_x_p1 = (readinputport(5) & 0xff) * 320 / 256;
gun_y_p1 = (readinputport(6) & 0xff) * 240 / 256;
/* compute the coordonates for drawing (from ro... | false | false | false | false | false | 0 |
data(const QModelIndex &index, int role) const
{
if(!index.isValid())
return QVariant();
ActionTools::ActionInstance *actionInstance = mScript->actionAt(index.row());
if(!actionInstance)
return QVariant();
switch(role)
{
case ActionDataRole:
return QVariant::fromValue(*actionInstance);
case ActionIdRole:... | 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.