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 |
|---|---|---|---|---|---|---|
streamer_read_uhwi (struct lto_input_block *ib)
{
unsigned HOST_WIDE_INT result = 0;
int shift = 0;
unsigned HOST_WIDE_INT byte;
while (true)
{
byte = streamer_read_uchar (ib);
result |= (byte & 0x7f) << shift;
shift += 7;
if ((byte & 0x80) == 0)
return result;
}
} | false | false | false | false | false | 0 |
propagateDistance(const SCEV *&Src,
const SCEV *&Dst,
Constraint &CurConstraint,
bool &Consistent) {
const Loop *CurLoop = CurConstraint.getAssociatedLoop();
DEBUG(dbgs() << "\t\tSrc is "... | false | false | false | false | false | 0 |
for_each_insn_in_loop (struct loop *loop, loop_insn_callback fncall)
{
int not_every_iteration = 0;
int maybe_multiple = 0;
int past_loop_latch = 0;
int loop_depth = 0;
rtx p;
/* If loop_scan_start points to the loop exit test, we have to be wary of
subversive use of gotos inside expression statements... | false | false | false | false | false | 0 |
cw1200_queue_requeue(struct cw1200_queue *queue, u32 packet_id)
{
int ret = 0;
u8 queue_generation, queue_id, item_generation, item_id;
struct cw1200_queue_item *item;
struct cw1200_queue_stats *stats = queue->stats;
cw1200_queue_parse_id(packet_id, &queue_generation, &queue_id,
&item_generation, &item_i... | false | false | false | false | false | 0 |
wq_unbind_fn(struct work_struct *work)
{
int cpu = smp_processor_id();
struct worker_pool *pool;
struct worker *worker;
for_each_cpu_worker_pool(pool, cpu) {
mutex_lock(&pool->attach_mutex);
spin_lock_irq(&pool->lock);
/*
* We've blocked all attach/detach operations. Make all workers
* unbound and set... | false | false | false | false | false | 0 |
main() {
char* ones[] = {"","one","two","three","four","five","six","seven","eight","nine"};
char* teens[] = {"ten","eleven","twelve","thirteen","fourteen","fifteen","sixteen","seventeen","eighteen","nineteen"};
char* tens[] = {"","","twenty","thirty","forty","fifty","sixty","seventy","eighty","ninety"};
... | false | false | false | false | false | 0 |
probe_device(snmp_cache_t *device) /* I - Device */
{
char uri[1024], /* Full device URI */
*uriptr, /* Pointer into URI */
*format; /* Format string for device */
device_uri_t *device_uri; /* Current DeviceURI match */
debug_printf("DEBUG: %.3f Probing %s...\n", run_time(), device->addrname);
#ifdef ... | false | false | false | false | false | 0 |
memory_cell_write(memory_page *mem, uint addr, memory_cell value) {
if (addr >= mem->size || addr == NIL) {
printf("Illegal write to address %d (memory size %d)\n", addr, mem->size);
exit(1);
}
memory_cell_set_used(mem, addr);
mem->memory[addr] = value;
} | false | false | false | false | false | 0 |
getCurrentPageId() {
unsigned int i;
i=getCurrentPage();
if (i >= pages.size())
return 0;
return( pages[i]->number );
} | false | false | false | false | false | 0 |
on_dialog_password_delete_event (GtkWidget *widget,
GdkEvent *event,
gpointer user_data)
{
if(state->startup_tray) {
gtk_widget_hide(gui->pass_window);
state->locked = TRUE;
} else
gtk_main_quit()... | false | false | false | false | false | 0 |
workbook_detach_view (WorkbookView *wbv)
{
g_return_if_fail (IS_WORKBOOK_VIEW (wbv));
g_return_if_fail (IS_WORKBOOK (wbv->wb));
WORKBOOK_FOREACH_SHEET (wbv->wb, sheet, {
SheetView *sv = sheet_get_view (sheet, wbv);
sv_dispose (sv);
});
g_ptr_array_remove (wbv->wb->wb_views, wbv);
if (wbv->wb->wb_views->len ... | false | false | false | false | false | 0 |
caseMap(BreakIterator *titleIter,
const char *locale,
uint32_t options,
int32_t toWhichCase) {
if(isEmpty() || !isWritable()) {
// nothing to do
return *this;
}
UErrorCode errorCode;
errorCode = U_ZERO_ERROR;
const UCaseProps *csp=... | false | false | false | false | false | 0 |
_HZOpen(UConverter *cnv, UConverterLoadArgs *pArgs, UErrorCode *errorCode){
UConverter *gbConverter;
if(pArgs->onlyTestIsLoadable) {
ucnv_canCreateConverter("GBK", errorCode); /* errorCode carries result */
return;
}
gbConverter = ucnv_open("GBK", errorCode);
if(U_FAILURE(*errorCode... | false | false | false | false | false | 0 |
operator<< (std::ostream& os, const audioCodecType& t)
{
switch (t)
{
case AUDIO_CODEC_RAW:
os << "Raw";
break;
case AUDIO_CODEC_ADPCM:
os << "ADPCM";
break;
case AUDIO_CODEC_MP3:
os << "MP3";
break;
case AUD... | false | false | false | false | false | 0 |
gretl_errmsg_sprintf (const char *fmt, ...)
{
#if EDEBUG
fprintf(stderr, "gretl_errmsg_sprintf: fmt='%s'\n", fmt);
#endif
if (*gretl_errmsg == '\0') {
va_list ap;
va_start(ap, fmt);
vsnprintf(gretl_errmsg, ERRLEN, fmt, ap);
va_end(ap);
} else if (strstr(gretl_errmsg, "*** error in fun") &&
str... | true | true | false | false | true | 1 |
c4iw_post_receive(struct ib_qp *ibqp, struct ib_recv_wr *wr,
struct ib_recv_wr **bad_wr)
{
int err = 0;
struct c4iw_qp *qhp;
union t4_recv_wr *wqe = NULL;
u32 num_wrs;
u8 len16 = 0;
unsigned long flag;
u16 idx = 0;
qhp = to_c4iw_qp(ibqp);
spin_lock_irqsave(&qhp->lock, flag);
if (t4_wq_in_error(&qhp->... | false | false | false | false | false | 0 |
nextInput(ByteInStream & is, StdVnChar & stdChar, int & bytesRead)
{
// read first char
UniCompCharInfo key;
UKWORD w;
if (!is.getNextW(w)) {
bytesRead = 0;
return 0;
}
key.compChar = w;
bytesRead = 2;
UniCompCharInfo *pInfo = (UniCompCharInfo *)bsearch(&key, m_info, m_totalChars,
... | false | false | false | false | false | 0 |
SaveRollback(off_t p)
{
pos=p;
if(buffer_ptr<p)
save=false;
if(!save)
p=0;
buffer.truncate(buffer_ptr=p);
} | false | false | false | false | false | 0 |
cryptui_keyset_get_closure (CryptUIKeyset *keyset, const gchar *key)
{
gpointer closure = g_hash_table_lookup (keyset->priv->keys, key);
g_return_val_if_fail (closure != NULL, NULL);
/* |TRUE| means no closure has been set */
if (closure == GINT_TO_POINTER (TRUE))
return NULL;
return c... | false | false | false | false | false | 0 |
F_sub(struct alisp_instance *instance, struct alisp_object * args)
{
struct alisp_object * p = args, * p1, * n;
long v = 0;
double f = 0;
int type = ALISP_OBJ_INTEGER;
do {
p1 = eval(instance, car(p));
if (alisp_compare_type(p1, ALISP_OBJ_INTEGER)) {
if (p == args && cdr(p) != &alsa_lisp_nil) {
v = p1-... | false | false | false | false | false | 0 |
XmtSetFocusToShell(Widget w)
#else
void XmtSetFocusToShell(w)
Widget w;
#endif
{
Widget shell = XmtGetShell(w);
if (!XtIsRealized(shell)) return;
XmtRaiseShell(shell);
XSetInputFocus(XtDisplay(shell), XtWindow(shell), RevertToParent,
XtLastTimestampProcessed(XtDisplay(shell)));
} | false | false | false | false | false | 0 |
clientCachable(clientHttpRequest * http)
{
request_t *req = http->request;
method_t *method = req->method;
if (req->flags.loopdetect)
return 0;
if (req->protocol == PROTO_HTTP)
return httpCachable(method);
/* FTP is always cachable */
if (method->code == METHOD_OTHER)
return 0;
if (method... | false | false | false | false | false | 0 |
_ecore_evas_ews_fullscreen_set(Ecore_Evas *ee, int val)
{
if (ee->prop.fullscreen == val) return;
ee->prop.fullscreen = val;
if (!val)
{
evas_object_move(ee->engine.ews.image, ee->x, ee->y);
evas_object_resize(ee->engine.ews.image, ee->w, ee->h);
}
else
{
Evas_Coord w... | false | false | false | false | false | 0 |
RPC_CMK_CreateKey_TP(struct host_table_entry *hte,
TCS_KEY_HANDLE hWrappingKey, /* in */
TPM_ENCAUTH *keyUsageAuth, /* in */
TPM_HMAC *migAuthorityApproval, /* in */
TPM_DIGEST *migAuthorityDigest, /* in */
UINT32 *keyDataSize, /* in, out */
BYTE **keyData, /* in, out */
... | false | false | false | false | false | 0 |
cddb_cache_read(cddb_conn_t *c, cddb_disc_t *disc)
{
int rv;
cddb_log_debug("cddb_cache_read()");
if (c->use_cache == CACHE_OFF) {
/* don't use cache */
cddb_log_debug("...cache disabled");
return FALSE;
}
/* check whether cached version exists */
if (!cddb_cache_exists... | false | false | false | false | true | 1 |
scsi_debug_target_reset(struct scsi_cmnd *SCpnt)
{
struct sdebug_host_info *sdbg_host;
struct sdebug_dev_info *devip;
struct scsi_device *sdp;
struct Scsi_Host *hp;
int k = 0;
++num_target_resets;
if (!SCpnt)
goto lie;
sdp = SCpnt->device;
if (!sdp)
goto lie;
if (SCSI_DEBUG_OPT_ALL_NOISE & scsi_debug_opt... | false | false | false | false | false | 0 |
go_file_create (char const *uri, GError **err)
{
char *filename;
int fd;
g_return_val_if_fail (uri != NULL, NULL);
filename = go_filename_from_uri (uri);
if (filename) {
GsfOutput *result = gsf_output_stdio_new (filename, err);
g_free (filename);
return result;
}
if (is_fd_uri (uri, &fd)) {
int fd2 = ... | false | false | false | false | false | 0 |
ParseNull(struct Aoc *chanp, u_char *p, u_char *end, int dummy)
{
INIT;
return p - beg;
} | false | false | false | false | false | 0 |
sci_goto_line(ScintillaObject *sci, gint line, gboolean unfold)
{
if (unfold) SSM(sci, SCI_ENSUREVISIBLE, (uptr_t) line, 0);
SSM(sci, SCI_GOTOLINE, (uptr_t) line, 0);
} | false | false | false | false | false | 0 |
_field_match(struct dm_report *rh, const char *field, size_t flen,
unsigned report_type_only)
{
uint32_t f, type;
if (!flen)
return 0;
for (f = 0; rh->fields[f].report_fn; f++)
if (_is_same_field(rh->fields[f].id, field, flen,
rh->field_prefix)) {
if (report_type_only) {
rh->report_types |= rh... | false | false | false | false | false | 0 |
tg3_phy_eee_adjust(struct tg3 *tp, bool current_link_up)
{
u32 val;
if (!(tp->phy_flags & TG3_PHYFLG_EEE_CAP))
return;
tp->setlpicnt = 0;
if (tp->link_config.autoneg == AUTONEG_ENABLE &&
current_link_up &&
tp->link_config.active_duplex == DUPLEX_FULL &&
(tp->link_config.active_speed == SPEED_100... | false | false | false | false | false | 0 |
gsb_form_scheduler_set_content_list ( GSList *content_list )
{
GSList *list_tmp;
gint account_number;
account_number = gsb_form_scheduler_get_account ();
list_tmp = content_list;
/* see each saved element */
while (list_tmp)
{
content_element *element;
GSList *form_list;
element = lis... | false | false | false | false | false | 0 |
cosm_shutdown_status_int(struct cosm_device *cdev,
enum mic_status shutdown_status)
{
switch (shutdown_status) {
case MIC_HALTED:
case MIC_POWER_OFF:
case MIC_RESTART:
case MIC_CRASHED:
break;
default:
dev_err(&cdev->dev, "%s %d Unexpected shutdown_status %d\n",
__func__, __LINE__, shutdown_status... | false | false | false | false | false | 0 |
xpath_search(xmlNode * xml_top, const char *path)
{
xmlDocPtr doc = NULL;
xmlXPathObjectPtr xpathObj = NULL;
xmlXPathContextPtr xpathCtx = NULL;
const xmlChar *xpathExpr = (const xmlChar *)path;
CRM_CHECK(path != NULL, return NULL);
CRM_CHECK(xml_top != NULL, return NULL);
CRM_CHECK(strlen(... | false | false | false | false | false | 0 |
maildir_set_uid( maildir_store_t *ctx, const char *name, int *uid )
{
int ret, uv[2];
if (uid)
*uid = ++ctx->nuid;
key.data = (void *)"UIDVALIDITY";
key.size = 11;
uv[0] = ctx->gen.uidvalidity;
uv[1] = ctx->nuid;
value.data = uv;
value.size = sizeof(uv);
if ((ret = ctx->db->put( ctx->db, 0, &key, &value, 0 ... | false | false | false | false | false | 0 |
MOVSB32_XbYb(bxInstruction_c *i)
{
Bit8u temp8;
Bit32u incr = 1;
#if (BX_SupportRepeatSpeedups) && (BX_DEBUGGER == 0)
/* If conditions are right, we can transfer IO to physical memory
* in a batch, rather than one instruction at a time */
if (i->repUsedL() && !BX_CPU_THIS_PTR async_event)
{
Bit32u by... | false | false | false | false | false | 0 |
wheelEvent(QWheelEvent *event)
{
if (event->modifiers() & Qt::ControlModifier) {
int numDegrees = event->delta() / 8;
int numSteps = numDegrees / 15;
m_currentZoom = m_currentZoom + numSteps * 10;
applyZoom();
event->accept();
return;
}
QWebView::wheelEvent(ev... | false | false | false | false | false | 0 |
ep_imp(acv) A acv;
{
A z;
if ( acv->t != Ct ) ERROUT(ERR_TYPE);
if ( acv->r > 1 ) ERROUT(ERR_RANK);
if ( acv->n < 4 ) ERROUT(ERR_DOMAIN);
if ((A)0==(z=ImportAObject((char *)acv->p, acv->n, (C *)0))) ERROUT(ERR_DOMAIN);
R z;
} | false | false | false | false | false | 0 |
prefixed_path (const char *path)
{
// based on incpath.c
size_t len;
if (cpp_relocated() && (len = cpp_PREFIX_len) != 0)
{
if (!strncmp (path, cpp_PREFIX, len))
{
static const char *relocated_prefix;
/* If this path starts with the configure-time prefix,
but the compiler has been relocated, rep... | false | false | false | false | false | 0 |
sink_sweep_ins(jit_State *J)
{
IRIns *ir, *irfirst = IR(J->cur.nk);
for (ir = IR(J->cur.nins-1) ; ir >= irfirst; ir--) {
switch (ir->o) {
case IR_ASTORE: case IR_HSTORE: case IR_FSTORE: case IR_XSTORE: {
IRIns *ira = sink_checkalloc(J, ir);
if (ira && !irt_ismarked(ira->t)) {
int delta = (int)(... | false | false | false | false | false | 0 |
recDependencies(set<ConstructedPtr>& dependencies)
{
ConstructedPtr constructed = ConstructedPtr::dynamicCast(_type);
if(constructed && dependencies.find(constructed) != dependencies.end())
{
dependencies.insert(constructed);
constructed->recDependencies(dependencies);
}
} | false | false | false | false | false | 0 |
next_line (struct CONFIG *cfg)
{
while (cfg->line_pos < cfg->file_len){
if (cfg->file[cfg->line_pos] == 10) {
cfg->line_pos++;
break;
}
cfg->line_pos++;
}
if (cfg->line_pos >= cfg->file_len)
return ERROR;
return E_OK;
} | false | false | false | false | false | 0 |
sprom_extract_antgain(const u16 *in, u16 offset, u16 mask, u16 shift)
{
u16 v;
u8 gain;
v = in[SPOFF(offset)];
gain = (v & mask) >> shift;
if (gain == 0xFF) {
gain = 8; /* If unset use 2dBm */
} else {
/* Q5.2 Fractional part is stored in 0xC0 */
gain = ((gain & 0xC0) >> 6) | ((gain & 0x3F) << 2);
}
ret... | false | false | false | false | false | 0 |
soc_remove_aux_dev(struct snd_soc_card *card, int num)
{
struct snd_soc_pcm_runtime *rtd = &card->rtd_aux[num];
struct snd_soc_component *component = rtd->component;
/* unregister the rtd device */
if (rtd->dev_registered) {
device_unregister(rtd->dev);
rtd->dev_registered = 0;
}
if (component)
soc_remove... | false | false | false | false | false | 0 |
ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* pInvoker, uint32 uiMiscValue) override
{
// start escort
if (eventType == AI_EVENT_START_ESCORT && pInvoker->GetTypeId() == TYPEID_PLAYER)
Start(false, (Player*)pInvoker, GetQuestTemplateStore(uiMiscValue), true);
} | false | false | false | false | false | 0 |
check_print_patch_set(PatchSet * ps)
{
if (ps->psid < 0)
return;
/* the funk_factor overrides the restrict_tag_start and end */
if (ps->funk_factor == FNK_SHOW_SOME || ps->funk_factor == FNK_SHOW_ALL)
goto ok;
if (ps->funk_factor == FNK_HIDE_ALL)
return;
if (ps->psid <= restrict_tag_ps_start)
... | false | false | false | false | false | 0 |
gst_rtp_h264_depay_class_init (GstRtpH264DepayClass * klass)
{
GObjectClass *gobject_class;
GstElementClass *gstelement_class;
GstBaseRTPDepayloadClass *gstbasertpdepayload_class;
gobject_class = (GObjectClass *) klass;
gstelement_class = (GstElementClass *) klass;
gstbasertpdepayload_class = (GstBaseRTPDe... | false | false | false | false | false | 0 |
o_square(void)
{
VALUE *vp;
NUMBER *q;
VALUE tmp;
vp = stack;
if (vp->v_type == V_ADDR)
vp = vp->v_addr;
if (vp->v_type == V_NUM) {
q = qsquare(vp->v_num);
if (stack->v_type == V_NUM)
qfree(stack->v_num);
stack->v_num = q;
stack->v_type = V_NUM;
stack->v_subtype = V_NOSUBTYPE;
return;
}
square... | false | false | false | false | false | 0 |
rtw_init_pwrctrl_priv(struct adapter *padapter)
{
struct pwrctrl_priv *pwrctrlpriv = &padapter->pwrctrlpriv;
_init_pwrlock(&pwrctrlpriv->lock);
pwrctrlpriv->rf_pwrstate = rf_on;
pwrctrlpriv->ips_enter_cnts = 0;
pwrctrlpriv->ips_leave_cnts = 0;
pwrctrlpriv->bips_processing = false;
pwrctrlpriv->ips_mode = padap... | false | false | false | false | false | 0 |
sys_sbrk(void)
{
int addr;
int n;
if(argint(0, &n) < 0)
return -1;
if((addr = growproc(n)) < 0)
return -1;
return addr;
} | false | false | false | false | false | 0 |
slapi_entry_vattrcache_merge_sv(Slapi_Entry *e, const char *type,
Slapi_ValueSet *valset, int buffer_flags)
{
Slapi_Value **vals = NULL;
Slapi_Vattr *vattr;
/* only attempt to merge if it's a cacheable attribute */
if ( slapi_vattrcache_iscacheable(type) || (buffer_flags & SLAPI_VIRTUALATTRS... | false | false | false | false | false | 0 |
attrval_to_str(uint8_t attr, uint8_t value)
{
switch (attr) {
case AVRCP_ATTRIBUTE_EQUALIZER:
switch (value) {
case AVRCP_EQUALIZER_ON:
return "on";
case AVRCP_EQUALIZER_OFF:
return "off";
}
break;
case AVRCP_ATTRIBUTE_REPEAT_MODE:
switch (value) {
case AVRCP_REPEAT_MODE_OFF:
return "off";
... | false | false | false | false | false | 0 |
wr(const std::shared_ptr<const void>& data,
uint64_t offset,
size_t len)
{
if(!this->is_open()) {
throw std::ios_base::failure("file is not open!");
}
if(seeko(this->fp, offset+this->header_size, SEEK_SET) < 0) {
throw std::ios_base::failure("seek failed!");
}
... | false | false | false | false | false | 0 |
ProcessEventNotification(MPT_ADAPTER *ioc, EventNotificationReply_t *pEventReply, int *evHandlers)
{
u16 evDataLen;
u32 evData0 = 0;
int ii;
u8 cb_idx;
int r = 0;
int handlers = 0;
u8 event;
/*
* Do platform normalization of values
*/
event = le32_to_cpu(pEventReply->Event) & 0xFF;
evDataLen = le16_to_c... | false | false | false | false | false | 0 |
bSave( SimnBase & roSimn )
{
wxString os1;
// Only proceed if this is an GNU-Cap simulation object
if( roSimn.eGetSimEng( ) != eSIMR_GNUCAP ) return( FALSE );
SimnGnuCap & roSimnGcp = (SimnGnuCap &) roSimn;
// Clear the error string
NbkSimrBase::m_osErrMsg.Empty( );
// Create the analysis command/s
... | false | false | false | false | false | 0 |
libmail_header_find(struct header *p, const char *n)
{
int l=strlen(n);
while (p)
{
if (p->header && strncasecmp(p->header, n, l) == 0)
return (p);
p=p->next;
}
return (p);
} | false | false | false | false | false | 0 |
smc_inquire (struct smc_ctrl_block *smc)
{
struct smc_scsi_req * sr = &smc->scsi_req;
unsigned char data[128];
int rc;
int i;
bzero (sr, sizeof *sr);
bzero (data, sizeof data);
sr->n_cmd = 6;
sr->cmd[0] = SCSI_CMD_INQUIRY;
sr->cmd[4] = sizeof data; /* allocation length */
sr->data = data;
sr->n_data... | false | false | false | false | false | 0 |
make_empty_dir(struct inode *inode,
struct inode *parent, struct page *page)
{
struct page *dentry_page;
struct f2fs_dentry_block *dentry_blk;
struct f2fs_dentry_ptr d;
if (f2fs_has_inline_dentry(inode))
return make_empty_inline_dir(inode, parent, page);
dentry_page = get_new_data_page(inode, page, 0, true);... | false | false | false | false | false | 0 |
zone_setrawdata(dns_zone_t *zone, dns_masterrawheader_t *header) {
if ((header->flags & DNS_MASTERRAW_SOURCESERIALSET) == 0)
return;
zone->sourceserial = header->sourceserial;
zone->sourceserialset = ISC_TRUE;
} | false | false | false | false | false | 0 |
childShouldCreateRenderer(Node* child) const
{
if (child->isTextNode()
#if ENABLE(SVG_FONTS)
|| child->hasTagName(SVGNames::altGlyphTag)
#endif
|| child->hasTagName(SVGNames::tspanTag) || child->hasTagName(SVGNames::trefTag) || child->hasTagName(SVGNames::textPathTag))
return true;
retu... | false | false | false | false | false | 0 |
val_int()
{
my_decimal tmp_buf, *tmp= val_decimal(&tmp_buf);
longlong res;
if (null_value)
return 0;
my_decimal2int(E_DEC_FATAL_ERROR, tmp, unsigned_flag, &res);
return res;
} | false | false | false | false | false | 0 |
php_iconv_output_conflict(const char *handler_name, size_t handler_name_len TSRMLS_DC)
{
if (php_output_get_level(TSRMLS_C)) {
if (php_output_handler_conflict(handler_name, handler_name_len, ZEND_STRL("ob_iconv_handler") TSRMLS_CC)
|| php_output_handler_conflict(handler_name, handler_name_len, ZEND_STRL("mb_output... | false | false | false | false | false | 0 |
fuse_send_msg(struct fuse_ll *f, struct fuse_chan *ch,
struct iovec *iov, int count)
{
struct fuse_out_header *out = iov[0].iov_base;
out->len = iov_length(iov, count);
if (f->debug) {
if (out->unique == 0) {
fprintf(stderr, "NOTIFY: code=%d length=%u\n",
out->error, out->len);
} else if (out->error)... | false | false | false | false | false | 0 |
do_migrate_pages(struct mm_struct *mm, const nodemask_t *from,
const nodemask_t *to, int flags)
{
int busy = 0;
int err;
nodemask_t tmp;
err = migrate_prep();
if (err)
return err;
down_read(&mm->mmap_sem);
/*
* Find a 'source' bit set in 'tmp' whose corresponding 'dest'
* bit in 'to' is not also ... | false | false | false | false | false | 0 |
fence_config_next_priority(struct fence_config *fc)
{
struct fence_device *prev, *next;
int d = fc->pos;
int i;
if (d >= FENCE_CONFIG_DEVS_MAX)
return -1;
prev = fc->dev[d];
for (i = d+1; i < FENCE_CONFIG_DEVS_MAX; i++) {
next = fc->dev[i];
if (!next)
return -1;
if (same_base_name(prev, next))
... | false | false | false | false | false | 0 |
filter_message_by_msginfo(GSList *flist, MsgInfo *info, PrefsAccount* ac_prefs,
FilteringInvocationType context, gchar *extra_info)
{
gboolean ret;
if (prefs_common.enable_filtering_debug) {
gchar *tmp = _("undetermined");
#ifndef G_OS_WIN32
switch (context) {
case FILTERING_INCORPORATION:
tmp = ... | false | false | false | false | false | 0 |
slotFilterEditorFinished( int result )
{
m_filterAction->setEnabled( true );
if( result && !m_sw->currentText().isEmpty() ) // result == QDialog::Accepted
addCompletion( m_sw->currentText() );
} | false | false | false | false | false | 0 |
QueueObjectMatchAction(
void *theEnv,
int type,
INSTANCE_TYPE *ins,
int slotNameID)
{
OBJECT_MATCH_ACTION *prv,*cur,*newMatch;
prv = NULL;
cur = ObjectReteData(theEnv)->ObjectMatchActionQueue;
while (cur != NULL)
{
/* ===========================================================
... | false | false | false | false | false | 0 |
object_common2(UNSERIALIZE_PARAMETER, long elements)
{
zval *retval_ptr = NULL;
zval fname;
if (!process_nested_data(UNSERIALIZE_PASSTHRU, Z_OBJPROP_PP(rval), elements, 1)) {
return 0;
}
if (Z_OBJCE_PP(rval) != PHP_IC_ENTRY &&
zend_hash_exists(&Z_OBJCE_PP(rval)->function_table, "__wakeup", sizeof("__wakeup")... | false | false | false | false | false | 0 |
init_local_com_names()
{
if (!link) return 1; /*** create and init local com structure ***/
if (aisc_create(link, AN_MAIN, com,
MAIN_LOCAL, AN_LOCAL, &locs,
LOCAL_WHOAMI, "i bin der arb_tree",
NULL)){
return 1;
... | false | false | false | false | false | 0 |
readFile(const char *fname, GWEN_BUFFER *dbuf) {
FILE *f;
f=fopen(fname, "rb");
if (f) {
while(!feof(f)) {
uint32_t l;
ssize_t s;
char *p;
GWEN_Buffer_AllocRoom(dbuf, 1024);
l=GWEN_Buffer_GetMaxUnsegmentedWrite(dbuf);
p=GWEN_Buffer_GetPosPointer(dbuf);
s=fread(p, 1,... | false | false | false | false | false | 0 |
_outConstraint(StringInfo str, Constraint *node)
{
WRITE_NODE_TYPE("CONSTRAINT");
WRITE_STRING_FIELD(conname);
WRITE_BOOL_FIELD(deferrable);
WRITE_BOOL_FIELD(initdeferred);
WRITE_LOCATION_FIELD(location);
appendStringInfo(str, " :contype ");
switch (node->contype)
{
case CONSTR_NULL:
appendStringInfo(str... | false | false | false | false | false | 0 |
transfer_transfer_track(TransferItdb *tri, ConvTrack *ctr) {
FileTransferStatus result = FILE_TRANSFER_ERROR;
gboolean copy_success;
const gchar *source_file = NULL;
gchar *dest_file = NULL;
gchar *mountpoint = NULL;
Conversion *conv;
GError *error = NULL;
g_return_val_if_fail (tri && t... | false | false | false | false | false | 0 |
tp_tests_backend_add_account (TpTestsBackend *self,
const gchar *protocol,
const gchar *user_id,
const gchar *cm_name,
const gchar *account)
{
TpTestsBackendPrivate *priv = self->priv;
TpSimpleClientFactory *factory;
AccountData *data;
gchar *conn_path;
GError *error = NULL;
data = g_slice_... | false | false | false | false | false | 0 |
ARTparse(CHANNEL *cp)
{
if (cp->State == CSgetheader)
ARTparseheader(cp);
else
ARTparsebody(cp);
ARTchecksize(cp);
if (cp->State == CSgotarticle || cp->State == CSgotlargearticle)
if (cp->Error[0] != '\0')
ARTlogreject(cp, NULL);
} | false | false | false | false | false | 0 |
AcquireContributionThreadSet(const size_t count)
{
register ssize_t
i;
ContributionInfo
**contribution;
size_t
number_threads;
number_threads=(size_t) GetMagickResourceLimit(ThreadResource);
contribution=(ContributionInfo **) AcquireQuantumMemory(number_threads,
sizeof(*contribution));
if... | false | false | false | false | false | 0 |
asus_acpi_get_sensor_info(struct acpi_device *adev,
struct i2c_client *client,
struct i2c_board_info *info)
{
struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
int i;
acpi_status status;
union acpi_object *cpm;
status = acpi_evaluate_object(adev->handle, "CNF0", NULL, &buffer);
if (ACPI... | false | false | false | false | false | 0 |
lgfs2_lang_result_next(struct lgfs2_lang_state *state,
struct gfs2_sbd *sbd)
{
struct lgfs2_lang_result *result;
if (state->ls_interp_curr == NULL) {
return NULL;
}
result = ast_interpret_node(state, state->ls_interp_curr, sbd);
if (result == NULL) {
r... | false | false | false | false | false | 0 |
lua_replace(lua_State *L, int idx)
{
api_checknelems(L, 1);
if (idx == LUA_GLOBALSINDEX) {
api_check(L, tvistab(L->top-1));
/* NOBARRIER: A thread (i.e. L) is never black. */
setgcref(L->env, obj2gco(tabV(L->top-1)));
} else if (idx == LUA_ENVIRONINDEX) {
GCfunc *fn = curr_func(L);
if (fn->c.g... | false | false | false | false | false | 0 |
slot_mult(int flag, int slot)
{
const struct object_flag *of_ptr = &object_flag_table[flag];
switch (slot) {
case INVEN_WIELD: return of_ptr->weapon;
case INVEN_BOW: return of_ptr->bow;
case INVEN_LEFT:
case INVEN_RIGHT: return of_ptr->ring;
case INVEN_NECK: return of_ptr->amulet;
case INVEN_LIGHT: ret... | false | false | false | false | false | 0 |
clean_dir(const char *dirname, const char *delete_pattern)
{
char subdir[PATH_MAX];
struct dirent *d;
DIR *dir;
dir = opendir(dirname);
if(!dir)
return 0;
while((d = readdir(dir))) {
if(!strcmp(d->d_name, "."))
continue;
if(!strcmp(d->d_name, ".."))
continue;
sprintf(subdir, "%s/%s", dirname, d->d... | true | true | true | false | false | 1 |
lock_torture_reader(void *arg)
{
struct lock_stress_stats *lrsp = arg;
static DEFINE_TORTURE_RANDOM(rand);
VERBOSE_TOROUT_STRING("lock_torture_reader task started");
set_user_nice(current, MAX_NICE);
do {
if ((torture_random(&rand) & 0xfffff) == 0)
schedule_timeout_uninterruptible(1);
cxt.cur_ops->readlo... | false | false | false | false | false | 0 |
wait_lpcurrent(struct pool *pool)
{
if (cnx_needed(pool))
return;
while (pool != current_pool() && pool_strategy != POOL_LOADBALANCE && pool_strategy != POOL_BALANCE) {
mutex_lock(&lp_lock);
pthread_cond_wait(&lp_cond, &lp_lock);
mutex_unlock(&lp_lock);
}
} | true | true | false | false | false | 1 |
brcms_world_regd(const char *regdom, int len)
{
const struct brcms_regd *regd = NULL;
int i;
for (i = 0; i < ARRAY_SIZE(cntry_locales); i++) {
if (!strncmp(regdom, cntry_locales[i].regdomain->alpha2, len)) {
regd = &cntry_locales[i];
break;
}
}
return regd;
} | false | false | false | false | false | 0 |
non_rewritable_mem_ref_base (tree ref)
{
tree base = ref;
/* A plain decl does not need it set. */
if (DECL_P (ref))
return NULL_TREE;
while (handled_component_p (base))
base = TREE_OPERAND (base, 0);
/* But watch out for MEM_REFs we cannot lower to a
VIEW_CONVERT_EXPR. */
if (TREE_CODE (b... | false | false | false | false | true | 1 |
hr222_manage_timecode(struct pcxhr_mgr *mgr, int enable)
{
if (enable)
mgr->dsp_reset |= PCXHR_DSP_RESET_SMPTE;
else
mgr->dsp_reset &= ~PCXHR_DSP_RESET_SMPTE;
PCXHR_OUTPB(mgr, PCXHR_DSP_RESET, mgr->dsp_reset);
return 0;
} | false | false | false | false | false | 0 |
kcm_ccache_remove_cred(krb5_context context,
kcm_ccache ccache,
krb5_flags whichfields,
const krb5_creds *mcreds)
{
krb5_error_code ret;
KCM_ASSERT_VALID(ccache);
HEIMDAL_MUTEX_lock(&ccache->mutex);
ret = kcm_ccache_remove_cred_internal(context, ccache, whichfields, mcreds);... | false | false | false | false | false | 0 |
supportedImageFormats()
{
static QString extensions;
if (extensions.isEmpty())
foreach (const QByteArray & format, QImageReader::supportedImageFormats())
extensions += "*." + format + " *." + format.toUpper() + " ";
return extensions;
} | false | false | false | false | false | 0 |
start_idle_timer (SoupConnection *conn)
{
SoupConnectionPrivate *priv = SOUP_CONNECTION_GET_PRIVATE (conn);
if (priv->idle_timeout > 0 && !priv->idle_timeout_src) {
priv->idle_timeout_src =
soup_add_timeout (priv->async_context,
priv->idle_timeout * 1000,
idle_timeout, conn);
}
} | false | false | false | false | false | 0 |
recalcListItems() const
{
NodeImpl* current = firstChild();
m_listItems.resize(0);
HTMLOptionElementImpl* foundSelected = 0;
m_length = 0;
while(current) {
if (current->id() == ID_OPTGROUP && current->firstChild()) {
// ### what if optgroup contains just comments? don't want one ... | false | false | false | false | false | 0 |
j2k_cp_destroy (opj_cp_t *p_cp)
{
OPJ_UINT32 l_nb_tiles;
opj_tcp_t * l_current_tile = 00;
OPJ_UINT32 i;
if
(p_cp == 00)
{
return;
}
if
(p_cp->tcps != 00)
{
l_current_tile = p_cp->tcps;
l_nb_tiles = p_cp->th * p_cp->tw;
for
(i = 0; i < l_nb_tiles; ++i)
{
j2k_tcp_... | false | false | false | false | false | 0 |
gtk_source_gutter_renderer_text_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec)
{
GtkSourceGutterRendererText *renderer;
renderer = GT... | false | false | false | false | false | 0 |
os_object_put(os_object_t o, const char *key, const void *val, os_type_t type) {
os_field_t osf;
nad_t nad;
log_debug(ZONE, "adding field %s (val %x type %d) to object", key, val, type);
osf = pmalloco(o->os->p, sizeof(struct os_field_st));
osf->key = pstrdup(o->os->p, key);
switch(type) {
... | false | false | false | false | false | 0 |
vtkPythonAppInitPrependPath(const char* self_dir)
{
// Try to put the VTK python module location in sys.path.
const char* build_dirs[] = {
"/../Wrapping/Python",
"/../VTK/Wrapping/Python",
0
};
int found_vtk = 0;
for (const char** build_dir = build_dirs; *build_dir && !found_vtk; ++build_dir)
... | false | false | false | false | false | 0 |
alphatreewidth(Outchoices *od, choice rep, Hashtable *tree,
unsigned int level, Strlist *partname) {
/* Calculate width needed for Organisation Report.
Constructing the name is basically the same code as printtree(). */
extern char *workspace;
char *name;
size_t need = (size_t)level + 3;
Strlist ... | false | true | true | false | false | 1 |
adv7511_set_isr(struct v4l2_subdev *sd, bool enable)
{
u8 irqs = MASK_ADV7511_HPD_INT | MASK_ADV7511_MSEN_INT;
u8 irqs_rd;
int retries = 100;
v4l2_dbg(2, debug, sd, "%s: %s\n", __func__, enable ? "enable" : "disable");
/* The datasheet says that the EDID ready interrupt should be
disabled if there is no hotp... | false | false | false | false | false | 0 |
hb_ot_old_tag_to_script (hb_tag_t tag)
{
if (unlikely (tag == HB_OT_TAG_DEFAULT_SCRIPT))
return HB_SCRIPT_INVALID;
/* This side of the conversion is fully algorithmic. */
/* Any spaces at the end of the tag are replaced by repeating the last
* letter. Eg 'nko ' -> 'Nkoo' */
if (unlikely ((tag & 0x0000... | false | false | false | false | false | 0 |
zRealloc (void *p, size_t size, const char *str) {
void *buffer;
zTrace3("zRealloc (%d) from %s", size, str);
if (p == NULL) {
buffer = zMalloc(size, "zRealloc redirection to zMalloc");
} else {
buffer = realloc(p, size);
if (buffer == NULL) zDie("realloc %s", str);
}
return buffer;
} | false | false | false | false | false | 0 |
send_cmdline_tail(struct telnet_client_t *cln, int corr)
{
if (telnet_send(cln, cln->cmdline + cln->cmdline_pos, cln->cmdline_len - cln->cmdline_pos))
return -1;
memset(temp_buf, '\b', cln->cmdline_len - cln->cmdline_pos - corr);
if (telnet_send(cln, temp_buf, cln->cmdline_len - cln->cmdline_pos - corr))
retu... | false | false | false | false | false | 0 |
select_dispatch(struct event_base *base, struct timeval *tv)
{
int res=0, i, j, nfds;
struct selectop *sop = base->evbase;
check_selectop(sop);
if (sop->resize_out_sets) {
fd_set *readset_out=NULL, *writeset_out=NULL;
size_t sz = sop->event_fdsz;
if (!(readset_out = mm_realloc(sop->event_readset_out, sz)))
... | 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.