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 |
|---|---|---|---|---|---|---|
load_pixbuf_for_gicon (GIcon *icon)
{
GtkIconTheme *theme;
GtkIconInfo *icon_info;
GdkPixbuf *pixbuf = NULL;
GError *err = NULL;
if (icon == NULL)
return NULL;
theme = gtk_icon_theme_get_default ();
icon_info = gtk_icon_theme_lookup_by_gicon (theme, icon,
... | false | false | false | false | false | 0 |
PyCurses_Delay_Output(PyObject *self, PyObject *args)
{
int ms;
PyCursesInitialised;
if (!PyArg_ParseTuple(args, "i:delay_output", &ms)) return NULL;
return PyCursesCheckERR(delay_output(ms), "delay_output");
} | false | false | false | false | false | 0 |
cl_statchkdir(const struct cl_stat *dbstat)
{
DIR *dd;
struct dirent *dent;
#if defined(HAVE_READDIR_R_3) || defined(HAVE_READDIR_R_2)
union {
struct dirent d;
char b[offsetof(struct dirent, d_name) + NAME_MAX + 1];
} result;
#endif
STATBUF sb;
unsigned int i, found;
char *fname;
if(!dbstat || !d... | false | false | false | false | false | 0 |
_dxf_ExNeedsWriting(void)
{
int res;
if (tmpbufferused == NULL)
return 0;
DXlock(tmpbufferlock, 0);
res = (*tmpbufferused > 0);
DXunlock(tmpbufferlock, 0);
return res;
} | false | false | false | false | false | 0 |
template_setup (GuTemplate* t) {
const gchar *filename;
char *filepath = NULL;
GError *error = NULL;
GtkTreeIter iter;
gchar *dirpath = g_build_filename (g_get_user_config_dir (), "gummi",
"templates" , NULL);
GDir* dir = g_dir_open (dirpath, 0, &error... | false | false | false | false | false | 0 |
digest_md5_encode (const char *input, size_t input_len,
char **output, size_t * output_len,
digest_md5_qop qop,
unsigned long sendseqnum, char key[DIGEST_MD5_LENGTH])
{
int res;
if (qop & DIGEST_MD5_QOP_AUTH_CONF)
{
return -1;
}
else if (qop & DIGEST_MD5_QOP_AUTH_INT)
{
cha... | false | false | false | false | false | 0 |
tty_ldisc_lock(struct tty_struct *tty, unsigned long timeout)
{
int ret;
ret = __tty_ldisc_lock(tty, timeout);
if (!ret)
return -EBUSY;
set_bit(TTY_LDISC_HALTED, &tty->flags);
return 0;
} | false | false | false | false | false | 0 |
fsi_seek_i(InStream *is, off_t pos)
{
if (lseek(is->file.fd, pos, SEEK_SET) < 0) {
RAISE(IO_ERROR, "seeking pos %"OFF_T_PFX"d: <%s>",
pos, strerror(errno));
}
} | false | false | false | false | false | 0 |
sb_write_res_just(String_buf sb, Just g, I3list map)
{
Ilist q;
Ilist p = g->u.lst;
sb_append(sb, jstring(g));
sb_append(sb, "(");
sb_append_id(sb, p->i, map);
for (q = p->next; q != NULL; q = q->next->next->next) {
int nuc_lit = q->i;
int sat_id = q->next->i;
int sat_lit = q->next->next->i;
... | false | false | false | false | false | 0 |
xmlSecGnuTLSX509StoreFinalize(xmlSecKeyDataStorePtr store) {
xmlSecGnuTLSX509StoreCtxPtr ctx;
xmlSecAssert(xmlSecKeyDataStoreCheckId(store, xmlSecGnuTLSX509StoreId));
ctx = xmlSecGnuTLSX509StoreGetCtx(store);
xmlSecAssert(ctx != NULL);
xmlSecPtrListFinalize(&(ctx->certsTrusted));
xmlSecPtrList... | false | false | false | false | false | 0 |
test_getsecret(sasl_conn_t *conn __attribute__((unused)),
void *context __attribute__((unused)), int id,
sasl_secret_t **psecret)
{
if(id != SASL_CB_PASS) fatal("test_getsecret not looking for pass");
if(!psecret) return SASL_BADPARAM;
*psecret = g_secret;
return SASL_OK;
} | false | false | false | false | false | 0 |
GetInternalType( char *pName, STABCOFFMAP *pMap ){
int n, found, i;
if ( !pName ) {
return(False);
}
found = False;
n = strlen(pName);
/* Find out if it is a local type */
for (i = 0; FundamentalTypes[i].pString != 0; i++) {
if ( !strncmp(pName, FundamentalTypes[i].pString... | false | false | false | false | false | 0 |
ve_is_string_in_list (const GList *list, const char *string)
{
g_return_val_if_fail (string != NULL, FALSE);
while (list != NULL) {
if (list->data != NULL &&
strcmp (string, list->data) == 0)
return TRUE;
list = list->next;
}
return FALSE;
} | false | false | false | false | false | 0 |
aem_exit(void)
{
struct aem_data *p1, *next1;
ipmi_smi_watcher_unregister(&driver_data.bmc_events);
driver_unregister(&aem_driver.driver);
list_for_each_entry_safe(p1, next1, &driver_data.aem_devices, list)
aem_delete(p1);
} | false | false | false | false | false | 0 |
__gsi_delete_mad_batch_context(
IN ibis_gsi_mad_batch_context_t *p_batch_ctx)
{
ibis_gsi_mad_batch_context_t *p_rem_res;
/* find the context in the map or assert */
cl_spinlock_acquire( &g_ibis_batch_contexts_map_lock );
p_rem_res =
cl_map_remove( &g_ibis_active_batch_contexts_map, p_batch_ctx->id );
c... | false | false | false | false | false | 0 |
paramGetIntegral(OfxParamHandle paramHandle,
OfxTime time1, OfxTime time2,
...)
{
# ifdef OFX_DEBUG_PARAMETERS
std::cout << "OFX: paramGetIntegral - " << paramHandle << ' ' << time1 << ' ' << time2 << " ...";
# en... | false | false | false | false | false | 0 |
pquo(io *f, char *s)
{
pchr(f, '\'');
for(;*s;s++)
if(*s=='\'')
pfmt(f, "''");
else pchr(f, *s);
pchr(f, '\'');
} | false | false | false | false | false | 0 |
sighandler( int signum )
{
#if ((defined(__INTEL_COMPILER) || defined(__ICC)) && defined(DO_PGO_DUMP))
_PGOPTI_Prof_Dump();
#endif
signal( signum, sighandler );
if( signum == SIGQUIT )
clean_exit( SUCCESS );
// _exit( SUCCESS );
if( signum == SIGTERM )
clean_exit( FAILURE );
// _exit( FAILURE );
if( s... | false | false | false | false | false | 0 |
grl_registry_add_directory (GrlRegistry *registry,
const gchar *path)
{
g_return_if_fail (GRL_IS_REGISTRY (registry));
g_return_if_fail (path);
/* Use append instead of prepend so plugins are loaded in the same order as
they were added */
registry->priv->plugins_dir = g_slist_a... | false | false | false | false | false | 0 |
ex_folddo(eap)
exarg_T *eap;
{
linenr_T lnum;
/* First set the marks for all lines closed/open. */
for (lnum = eap->line1; lnum <= eap->line2; ++lnum)
if (hasFolding(lnum, NULL, NULL) == (eap->cmdidx == CMD_folddoclosed))
ml_setmarked(lnum);
/* Execute the command on the marked lines. */
... | false | false | false | false | false | 0 |
logimevents(std::vector<struct imevent> &imevents)
{
char buffer[BUFFER_SIZE];
class Socket loggingsock(AF_UNIX, SOCK_STREAM);
/* Complete the connection. */
if (!(loggingsock.connectsocket(LOGGING_SOCKET, ""))) return false;
memset(buffer, 0, BUFFER_SIZE);
snprintf(buffer, BUFFER_SIZE - 1, "%ld\n", (lo... | false | false | false | false | false | 0 |
maildir_shared_fparse(char *p, char **name, char **dir)
{
char *q;
*name=0;
*dir=0;
if ((q=strchr(p, '\n')) != 0) *q=0;
if ((q=strchr(p, '#')) != 0) *q=0;
for (q=p; *q; q++)
if (isspace((int)(unsigned char)*q)) break;
if (!*q) return;
*q++=0;
while (*q && isspace((int)(unsigned char)*q))
++q;
if (*q)
{... | false | true | false | false | false | 1 |
mch_total_mem(special)
int special;
{
# ifdef __EMX__
return ulimit(3, 0L) >> 10; /* always 32MB? */
# else
long_u mem = 0;
long_u shiftright = 10; /* how much to shift "mem" right for Kbyte */
# ifdef HAVE_SYSCTL
int mib[2], physmem;
size_t len;
/* BSD way of getting the amount of RA... | false | false | false | false | false | 0 |
utf8_to_imaputf7 (const std::string str)
{
gchar *buffer = utf8_to_imaputf7 (str.c_str(), -1);
if (!buffer)
return std::string ("");
std::string result = std::string (buffer);
g_free(buffer);
return result;
} | false | false | false | false | false | 0 |
sigar_fs_type_get(sigar_file_system_t *fsp)
{
if (!(fsp->type || /* already set */
sigar_os_fs_type_get(fsp) || /* try os specifics first */
sigar_common_fs_type_get(fsp))) /* try common ones last */
{
fsp->type = SIGAR_FSTYPE_NONE;
}
if (fsp->type >= S... | false | false | false | false | false | 0 |
S_with_queued_errors(pTHX_ SV *ex)
{
PERL_ARGS_ASSERT_WITH_QUEUED_ERRORS;
if (PL_errors && SvCUR(PL_errors) && !SvROK(ex)) {
sv_catsv(PL_errors, ex);
ex = sv_mortalcopy(PL_errors);
SvCUR_set(PL_errors, 0);
}
return ex;
} | false | false | false | false | false | 0 |
corsair_probe(struct hid_device *dev, const struct hid_device_id *id)
{
int ret;
unsigned long quirks = id->driver_data;
struct corsair_drvdata *drvdata;
struct usb_interface *usbif = to_usb_interface(dev->dev.parent);
drvdata = devm_kzalloc(&dev->dev, sizeof(struct corsair_drvdata),
GFP_KERNEL);
if (d... | false | false | false | false | false | 0 |
ServerRefresh(CServer* NOT_ON_DAEMON(server))
{
#ifndef AMULE_DAEMON
if (theApp->amuledlg->m_serverwnd && theApp->amuledlg->m_serverwnd->serverlistctrl) {
theApp->amuledlg->m_serverwnd->serverlistctrl->RefreshServer(server);
}
#endif
} | false | false | false | false | false | 0 |
_ppdLocalizedAttr(ppd_file_t *ppd, /* I - PPD file */
const char *keyword, /* I - Main keyword */
const char *spec, /* I - Option keyword */
const char *ll_CC) /* I - Language + country locale */
{
char lkeyword[PPD_MAX_NAME]; /* Localization keyword */
ppd_attr_t *attr; /* Current attribute */
D... | false | false | false | false | false | 0 |
get_pa_object_name(Pa_object *obj)
{
char *name;
Array_table *a;
Var_table *v;
Iv_table *i;
Heap_table *h;
switch(obj->kind) {
case KIND_ARRAY :
a = obj->tbl.a;
name = a->name;
break;
case KIND_VAR :
v = obj->tbl.v;
name = v->name;
break;
... | false | false | false | false | false | 0 |
GdipCreateImageAttributes (GpImageAttributes **imageattr)
{
GpImageAttributes *result;
if (!imageattr)
return InvalidParameter;
result = (GpImageAttributes *) GdipAlloc (sizeof (GpImageAttributes));
if (!result) {
*imageattr = NULL;
return OutOfMemory;
}
gdip_init_image_attribute (&result->def);
gdip_in... | false | false | false | false | false | 0 |
sanei_rts88xx_get_mem (SANE_Int devnum, SANE_Byte ctrl1,
SANE_Byte ctrl2, SANE_Int length, SANE_Byte * value)
{
SANE_Status status;
SANE_Byte regs[2];
regs[0] = ctrl1;
regs[1] = ctrl2;
status = sanei_rts88xx_write_regs (devnum, 0x91, regs, 2);
if (status != SANE_STATUS_GOOD)
{
... | false | false | false | false | false | 0 |
eet_data_encode(Eet_Dictionary *ed,
Eet_Data_Stream *ds,
void *data,
const char *name,
int size,
int type,
int group_type)
{
Eet_Data_Chunk *echnk;
if (!data)
... | false | false | false | false | false | 0 |
printone(i)
int i;
{
if (i >= 0) {
exprintln();
printch(mbuffer[i].token);
mvcur(-1,3);
if (movemap[(unsigned int)(mbuffer[i].token)] == INSMACRO)
prints("!= ");
else
prints(" = ");
prints(mbuffer[i].m_text);
}
} | false | false | false | false | false | 0 |
gtk_plot_pc_draw_string (GtkPlotPC *pc,
gint x, gint y,
gint angle,
const GdkColor *fg,
... | false | false | false | false | false | 0 |
HTMLGetFont(li, env)
HTMLInfo li;
HTMLEnv env;
{
int i;
HTMLClass lc = li->lc;
HTMLFont lfi;
HTMLFontList fl;
lfi = env->fi;
if (lfi == NULL)
{
lfi = HTMLDupFont(li,li->cfi);
env->fi = lfi;
}
/*
* Check spacing
*/
if (lfi->fixed) fl = lc->fixed;
else fl = lc->prop;
/*
* Check... | false | false | false | false | false | 0 |
wl18xx_lnk_high_prio(struct wl1271 *wl, u8 hlid,
struct wl1271_link *lnk)
{
u8 thold;
struct wl18xx_fw_status_priv *status_priv =
(struct wl18xx_fw_status_priv *)wl->fw_status->priv;
unsigned long suspend_bitmap;
/* if we don't have the link map yet, assume they all low prio */
if (!status_priv)
return f... | false | false | false | false | false | 0 |
CbInsert(void *data,std::vector<PlayItem> & items, unsigned position) {
PlaylistWindow *playlist_window = (PlaylistWindow *)data;
pthread_mutex_lock(&playlist_window->playlist_list_mutex);
GDK_THREADS_ENTER();
std::vector<PlayItem> item_copy = items;
GtkListStore *list = GTK_LIST_STORE(gtk_tree_view_get_model... | false | false | false | false | false | 0 |
gss_inquire_mechs_for_name (OM_uint32 * minor_status,
const gss_name_t input_name,
gss_OID_set * mech_types)
{
OM_uint32 maj_stat;
if (input_name == GSS_C_NO_NAME)
{
if (minor_status)
*minor_status = 0;
return GSS_S_BAD_NAME | GSS_S_CALL_INACCESSIBLE_READ;
}
maj_stat = gss_cre... | false | false | false | false | false | 0 |
vmci_host_get_version(struct vmci_host_dev *vmci_host_dev,
unsigned int cmd, void __user *uptr)
{
if (cmd == IOCTL_VMCI_VERSION2) {
int __user *vptr = uptr;
if (get_user(vmci_host_dev->user_version, vptr))
return -EFAULT;
}
/*
* The basic logic here is:
*
* If the user sends in a version of 0 tell... | false | false | false | false | false | 0 |
isl_basic_map_plain_is_empty(__isl_keep isl_basic_map *bmap)
{
if (!bmap)
return -1;
return ISL_F_ISSET(bmap, ISL_BASIC_MAP_EMPTY);
} | false | false | false | false | false | 0 |
loopcxt_is_autoclear(struct loopdev_cxt *lc)
{
struct sysfs_cxt *sysfs = loopcxt_get_sysfs(lc);
if (sysfs) {
int fl;
if (sysfs_read_int(sysfs, "loop/autoclear", &fl) == 0)
return fl;
}
if (loopcxt_ioctl_enabled(lc)) {
struct loop_info64 *lo = loopcxt_get_info(lc);
if (lo)
return lo->lo_flags & LO_FL... | false | false | false | false | false | 0 |
gnm_style_get_align_h (GnmStyle const *style)
{
g_return_val_if_fail (style != NULL, GNM_HALIGN_LEFT);
g_return_val_if_fail (elem_is_set (style, MSTYLE_ALIGN_H), GNM_HALIGN_LEFT);
return style->h_align;
} | false | false | false | false | false | 0 |
vstop( b, flag )
register bptr b;
char *flag;
{
register int i;
if( *flag == '+' )
b->traced |= STOPVECCHANGE;
else
{
for( i = 0; i < b->nbits; i += 1 )
b->nodes[i]->nflags &= ~STOPVECCHANGE;
b->traced &= ~STOPVECCHANGE;
}
return( 1 );
} | false | false | false | false | false | 0 |
restore(const char *filename)
{
static char *path;
static size_t path_size;
FILE *file;
char *l;
int line = 0, backup_line, status = 0;
if (strcmp(filename, "-") == 0)
file = stdin;
else {
file = fopen(filename, "r");
if (file == NULL) {
fprintf(stderr, "%s: %s: %s\n",
progname, filename, strerr... | false | false | true | false | true | 1 |
qla4xxx_create_ipv6_iface(struct scsi_qla_host *ha)
{
if (!ha->iface_ipv6_0)
/* IPv6 iface-0 */
ha->iface_ipv6_0 = iscsi_create_iface(ha->host,
&qla4xxx_iscsi_transport,
ISCSI_IFACE_TYPE_IPV6, 0,
0);
if (!ha->iface_ipv6_0)
ql4_printk(KERN_ERR, ha, "Could not create IPv6 iSCSI... | false | false | false | false | false | 0 |
withTildeHomePath(const QString &path)
{
#ifdef Q_OS_WIN
QString outPath = path;
#else
static const QString homePath = QDir::homePath();
QFileInfo fi(QDir::cleanPath(path));
QString outPath = fi.absoluteFilePath();
if (outPath.startsWith(homePath))
outPath = QLatin1Char('~') + outPath.mid(h... | false | false | false | false | false | 0 |
OnProjectOpened(CodeBlocksEvent& event)
// ----------------------------------------------------------------------------
{
// NB: EVT_PROJECT_ACTIVATE is occuring before EVT_PROJECT_OPEN
// NB: EVT_EDITOR_ACTIVATE events occur before EVT_PROJECT_ACTIVATE or EVT_PROJECT_OPEN
// Currently, this event is a hack... | false | false | false | false | false | 0 |
_dxf_ExGQCurrent ()
{
if (*gq_curr == NULL)
return (NULL);
return((*gq_curr)->func);
} | false | false | false | false | false | 0 |
find_first_table_item (ETableGroup *group)
{
GnomeCanvasGroup *cgroup;
GList *l;
cgroup = GNOME_CANVAS_GROUP (group);
for (l = cgroup->item_list; l; l = l->next) {
GnomeCanvasItem *i;
i = GNOME_CANVAS_ITEM (l->data);
if (E_IS_TABLE_GROUP (i))
return find_first_table_item (E_TABLE_GROUP (i));
else if ... | false | false | false | false | false | 0 |
focusIn(void)
{
if (checkBox())
checkBox()->selectedItem(checkBox()->buttons().indexOf((unsigned long)(MSWidget *)this));
MSCheckButton::focusIn();
} | false | false | false | false | false | 0 |
read_attr_from_file(const char *path, int macro_ok)
{
FILE *fp = fopen(path, "r");
struct attr_stack *res;
char buf[2048];
int lineno = 0;
if (!fp)
return NULL;
res = xcalloc(1, sizeof(*res));
while (fgets(buf, sizeof(buf), fp))
handle_attr_line(res, buf, path, ++lineno, macro_ok);
fclose(fp);
return res;... | false | false | false | false | false | 0 |
ad_read(ad1848_info * devc, int reg)
{
int x;
int timeout = 900000;
while (timeout > 0 && inb(devc->base) == 0x80) /*Are we initializing */
timeout--;
if(reg < 32)
{
outb(((unsigned char) (reg & 0xff) | devc->MCE_bit), io_Index_Addr(devc));
x = inb(io_Indexed_Data(devc));
}
else
{
int xreg, xra;
xr... | false | false | false | false | false | 0 |
VisitLiteral(Literal* expr) {
HConstant* instr = new HConstant(expr->handle(), Representation::Tagged());
ast_context()->ReturnInstruction(instr, expr->id());
} | false | false | false | false | false | 0 |
nilfs_free_incomplete_logs(struct list_head *logs,
struct the_nilfs *nilfs)
{
struct nilfs_segment_buffer *segbuf, *prev;
struct inode *sufile = nilfs->ns_sufile;
int ret;
segbuf = NILFS_FIRST_SEGBUF(logs);
if (nilfs->ns_nextnum != segbuf->sb_nextnum) {
ret = nilfs_sufile_free(sufile, segbuf->sb_next... | false | false | false | false | false | 0 |
vflsh(void)
{
VPAGE *vp;
VPAGE *vlowest;
long addr;
long last;
VFILE *vfile;
int x;
for (vfile = vfiles.link.next; vfile != &vfiles; vfile = vfile->link.next) {
last = -1;
loop:
addr = MAXLONG;
vlowest = NULL;
for (x = 0; x != HTSIZE; x++)
for (vp = htab[x]; vp; vp = vp->next)
if (vp->addr... | false | false | false | false | false | 0 |
accelCalReset()
{
for (int i = 0; i < 3; i++) {
if (m_accelCalEnable[i]) {
m_accelMin.setData(i, RTIMUCALDEFS_DEFAULT_MIN);
m_accelMax.setData(i, RTIMUCALDEFS_DEFAULT_MAX);
}
}
} | false | false | false | false | false | 0 |
efopen(const char* name, const char* mode)
{
FILE* f=fopen(name,mode);
if (f==NULL)
{
fprintf(stderr,"luac: cannot open %sput file ",*mode=='r' ? "in" : "out");
perror(name);
exit(1);
}
return f;
} | false | false | false | false | false | 0 |
unchanged(buf, ff)
buf_T *buf;
int ff; /* also reset 'fileformat' */
{
if (buf->b_changed || (ff && file_ff_differs(buf, FALSE)))
{
buf->b_changed = 0;
ml_setflags(buf);
if (ff)
save_file_ff(buf);
#ifdef FEAT_WINDOWS
check_status(buf);
redraw_tabline = TRUE;
#endif
#ifdef FEAT_TITLE
need_mak... | false | false | false | false | false | 0 |
ewma( float *d, float *s, float w )
{
for( int i = 0; i < ( m_num / 2 ); i++, d++, s++ )
*d = *d * w + *s * ( 1 - w );
} | false | false | false | false | false | 0 |
writeTimeoutCbk (TimeoutId id, void *data)
{
Connection cxn = (Connection) data ;
const char *peerName ;
ASSERT (id == cxn->writeBlockedTimerId) ;
ASSERT (cxn->state == cxnConnectingS ||
cxn->state == cxnFeedingS ||
cxn->state == cxnFlushingS ||
cxn->state == cxnClosingS) ;
VALI... | false | false | false | false | false | 0 |
var_find_add_submap(const string& name, bool* isnew) {
*isnew = false;
GLEVarSubMap* sub = m_SubMap.back();
int idx = sub->var_get(name);
if (idx == -1) {
idx = addVarIdx(name);
sub->var_add(name, idx);
*isnew = true;
}
return idx;
} | false | false | false | false | false | 0 |
is_start_code(uint8_t * data, int * type, uint32_t * length)
{
if(memcmp(data, startcode, 5))
return 0;
if(memcmp(data + 10, endcode, 6))
return 0;
*type = data[5];
*length = BGAV_PTR_2_32BE(&data[6]);
return 1;
} | false | false | false | false | false | 0 |
mem_copy(void *dest, const void *src, size_t size)
{
size_t count;
if (dest == src)
{
return ((u8 *) dest) + size;
}
if (ADDR_IS_ALIGN(src, 8) && ADDR_IS_ALIGN(dest, 8))
{
count = size >> 3;
dest = mem_copy64(dest, src, count);
src = ((const u64 *) src) + count;
count = size & 0x07;
}
else if (ADDR_... | false | false | false | false | false | 0 |
IssueLocateRequest() {
OMNIORB_ASSERT(pd_state == IOP_C::Idle);
OMNIORB_ASSERT(pd_ior);
pd_state = IOP_C::RequestInProgress;
impl()->sendLocateRequest(this);
pd_state = IOP_C::WaitingForReply;
impl()->inputMessageBegin(this,impl()->unmarshalLocateReply);
pd_state = IOP_C::ReplyIsBeingProcessed;
GIO... | false | false | false | false | false | 0 |
ata_eh_qc_retry(struct ata_queued_cmd *qc)
{
struct scsi_cmnd *scmd = qc->scsicmd;
if (!qc->err_mask)
scmd->allowed++;
__ata_eh_qc_complete(qc);
} | false | false | false | false | false | 0 |
markWeakPtrList ( void )
{
StgWeak *w, **last_w;
last_w = &weak_ptr_list;
for (w = weak_ptr_list; w; w = w->link) {
// w might be WEAK, EVACUATED, or DEAD_WEAK (actually CON_STATIC) here
#ifdef DEBUG
{ // careful to do this assertion only reading the info ptr
// once, because during para... | false | false | false | false | false | 0 |
peer_connect_fics(gpointer data) {
mainw->openServer("freechess.org",5000,new FicsProtocol(),"timeseal");
if (global.FicsAutoLogin)
if (global.network)
if (global.network->isConnected())
new ScriptInstance("autofics.pl");
} | false | false | false | false | false | 0 |
s_wsue(cilist *a)
#endif
{
int n;
if(!f__init) f_init();
if(n=c_sue(a)) return(n);
f__reading=0;
f__reclen=0;
if(f__curunit->uwrt != 1 && f__nowwriting(f__curunit))
err(a->cierr, errno, "write start");
f__recloc=FTELL(f__cf);
FSEEK(f__cf,(OFF_T)sizeof(uiolen),SEEK_CUR);
return(0);
} | false | false | false | false | false | 0 |
config_renumber_one( Operation *op, SlapReply *rs, CfEntryInfo *parent,
Entry *e, int idx, int tailindex, int use_ldif )
{
struct berval ival, newrdn, nnewrdn;
struct berval rdn;
Attribute *a;
char ibuf[32], *ptr1, *ptr2 = NULL;
int rc = 0;
rc = config_rename_attr( rs, e, &rdn, &a );
if ( rc ) return rc;
iv... | true | true | false | false | true | 1 |
getCalleeSavedRegs(const MachineFunction *MF) const {
const ARMSubtarget &STI = MF->getSubtarget<ARMSubtarget>();
const MCPhysReg *RegList =
STI.isTargetDarwin() ? CSR_iOS_SaveList : CSR_AAPCS_SaveList;
const Function *F = MF->getFunction();
if (F->getCallingConv() == CallingConv::GHC) {
// GHC set o... | false | false | false | false | false | 0 |
mma8452_write_raw(struct iio_dev *indio_dev,
struct iio_chan_spec const *chan,
int val, int val2, long mask)
{
struct mma8452_data *data = iio_priv(indio_dev);
int i, ret;
if (iio_buffer_enabled(indio_dev))
return -EBUSY;
switch (mask) {
case IIO_CHAN_INFO_SAMP_FREQ:
i = mma8452_get_samp_freq... | false | false | false | false | false | 0 |
posix_group_task_add(Slapi_PBlock *pb, Slapi_Entry *e, Slapi_Entry *eAfter, int *returncode,
char *returntext, void *arg)
{
PRThread *thread = NULL;
int rv = SLAPI_DSE_CALLBACK_OK;
task_data *mytaskdata = NULL;
Slapi_Task *task = NULL;
const char *filter;
const char *dn = 0;
*returncode... | false | false | false | false | false | 0 |
nm_system_compat_get_iface_type (int ifindex, const char *name)
{
int res = NM_IFACE_TYPE_UNSPEC;
char *ifname = NULL, *path = NULL;
struct vlan_ioctl_args ifv;
struct ifreq ifr;
struct ifbond ifb;
struct stat st;
int fd;
g_return_val_if_fail (ifindex > 0 || name, NM_IFACE_TYPE_UNSPEC);
if ((fd = socket (AF_... | false | true | false | false | false | 1 |
AdCreateTableHeader (
char *Filename,
ACPI_TABLE_HEADER *Table)
{
char *NewFilename;
UINT8 Checksum;
/*
* Print file header and dump original table header
*/
AdDisassemblerHeader (Filename);
AcpiOsPrintf (" * Original... | false | true | false | false | false | 1 |
create_valid_preview(guchar **preview_data)
{
if (adjusted_thumbnail_data)
{
gint bpp = (print_mode_is_color(pv->v)) ? 3 : 1;
gint v_denominator = preview_h > 1 ? preview_h - 1 : 1;
gint v_numerator = (preview_thumbnail_h - 1) % v_denominator;
gint v_whole = (preview_thumbnail_h - 1) / v_d... | false | false | false | false | false | 0 |
getRawTexChar(void)
/***************************************************************************
purpose: get the next character from the input stream with minimal
filtering (CRLF or CR or LF -> \n) and '\t' -> ' '
it also keeps track of the line number
should only be u... | false | false | false | false | false | 0 |
dpcm_fe_dai_shutdown(struct snd_pcm_substream *substream)
{
struct snd_soc_pcm_runtime *fe = substream->private_data;
int stream = substream->stream;
dpcm_set_fe_update_state(fe, stream, SND_SOC_DPCM_UPDATE_FE);
/* shutdown the BEs */
dpcm_be_dai_shutdown(fe, substream->stream);
dev_dbg(fe->dev, "ASoC: close F... | false | false | false | false | false | 0 |
print_nested_var_list(__isl_take isl_printer *p,
__isl_keep isl_space *global_dim, enum isl_dim_type global_type,
__isl_keep isl_space *local_dim, enum isl_dim_type local_type,
int latex, __isl_keep isl_basic_map *eq,
__isl_keep isl_multi_aff *maff, int offset)
{
int i, j;
if (global_dim != local_dim && local_ty... | false | false | false | false | false | 0 |
logical_rewrite_heap_tuple(RewriteState state, ItemPointerData old_tid,
HeapTuple new_tuple)
{
ItemPointerData new_tid = new_tuple->t_self;
TransactionId cutoff = state->rs_logical_xmin;
TransactionId xmin;
TransactionId xmax;
bool do_log_xmin = false;
bool do_log_xmax = false;
LogicalRewriteMappingDa... | false | false | false | false | false | 0 |
gt_encseq_has_twobitencoding(const GtEncseq *encseq)
{
gt_assert(encseq != NULL);
return (encseq->accesstype_via_utables ||
encseq->sat >= GT_ACCESS_TYPE_EQUALLENGTH ||
encseq->sat == GT_ACCESS_TYPE_BITACCESS) ? true : false;
} | false | false | false | false | false | 0 |
parse_commit(struct commit *item)
{
enum object_type type;
void *buffer;
unsigned long size;
int ret;
if (item->object.parsed)
return 0;
buffer = read_sha1_file(item->object.sha1, &type, &size);
if (!buffer)
return error("Could not read %s",
sha1_to_hex(item->object.sha1));
if (type != OBJ_COMMIT) ... | false | false | false | false | false | 0 |
apm_prtn_intxn(cli_ctx *ctx, struct apm_partition_info *aptable, size_t sectorsize, int old_school)
{
prtn_intxn_list_t prtncheck;
struct apm_partition_info apentry;
unsigned i, pitxn;
int ret = CL_CLEAN, tmp = CL_CLEAN;
off_t pos;
uint32_t max_prtns = 0;
prtn_intxn_list_init(&prtncheck);
... | false | false | false | false | false | 0 |
qed_ptt_set_win(struct qed_hwfn *p_hwfn,
struct qed_ptt *p_ptt,
u32 new_hw_addr)
{
u32 prev_hw_addr;
prev_hw_addr = qed_ptt_get_hw_addr(p_hwfn, p_ptt);
if (new_hw_addr == prev_hw_addr)
return;
/* Update PTT entery in admin window */
DP_VERBOSE(p_hwfn, NETIF_MSG_HW,
"Updating PTT entry %d to... | false | false | false | false | false | 0 |
kvm_iommu_unmap_memslots(struct kvm *kvm)
{
int idx;
struct kvm_memslots *slots;
struct kvm_memory_slot *memslot;
idx = srcu_read_lock(&kvm->srcu);
slots = kvm_memslots(kvm);
kvm_for_each_memslot(memslot, slots)
kvm_iommu_unmap_pages(kvm, memslot);
srcu_read_unlock(&kvm->srcu, idx);
if (kvm->arch.iommu_no... | false | false | false | false | false | 0 |
homebank_save_xml(gchar *filename)
{
GIOChannel *io;
char buf1[G_ASCII_DTOSTR_BUF_SIZE];
gchar *outstr;
gint retval = XML_OK;
io = g_io_channel_new_file(filename, "w", NULL);
if(io == NULL)
{
g_message("file error on: %s", filename);
retval = XML_IO_ERROR;
}
else
{
g_io_channel_write_chars(io, "<?xml versi... | true | true | false | false | false | 1 |
aeMain(aeEventLoop *eventLoop) {
eventLoop->stop = 0;
while (!eventLoop->stop) {
if (eventLoop->beforesleep != NULL)
eventLoop->beforesleep(eventLoop);
aeProcessEvents(eventLoop, AE_ALL_EVENTS);
}
} | false | false | false | false | false | 0 |
dir_rewind(VALUE dir)
{
struct dir_data *dirp;
if (rb_safe_level() >= 4 && !OBJ_UNTRUSTED(dir)) {
rb_raise(rb_eSecurityError, "Insecure: can't close");
}
GetDIR(dir, dirp);
rewinddir(dirp->dir);
return dir;
} | false | false | false | false | false | 0 |
FAR_pos(int FAR_row, int FAR_major, int FAR_minor)
{
int result, i;
if (FAR_row < 0 || FAR_major < 0 || FAR_minor < 0)
return -1;
if (FAR_row > 3 || FAR_major > 17
|| FAR_minor >= get_major_minors(XC6SLX9, FAR_major))
return -1;
result = FAR_row * 505*130;
for (i = 0; i < FAR_major; i++)
result += get_... | false | false | false | false | false | 0 |
main (int argc, char * argv[])
{
long int array[] = { 10, 3, 4, 8, 2, 9, 7, 1, 2, 6, 5 };
Heap * heap = heap_new_with_data ((void**)array, 11, 0, NULL, NULL);
heap_remove(heap, (void *)2);
while (heap_size(heap) > 0) {
printf ("%li\n", (long int)heap_pop(heap));
}
return 0;
} | false | false | false | false | false | 0 |
mCreate( const char * pszFilename,
int nXSize, int nYSize, int nBands,
GDALDataType eType,
char ** papszOptions )
{
/*if( !SupportsInstr(INSTR_Create) )
{
CPLError(CE_Failure, CPLE_NotSupported, "Create() not supported b... | false | false | false | false | false | 0 |
zzn2_from_big(_MIPD_ big x, zzn2 *w)
{
#ifdef MR_OS_THREADS
miracl *mr_mip=get_mip();
#endif
if (mr_mip->ERNUM) return;
MR_IN(167)
nres(_MIPP_ x,w->a);
zero(w->b);
MR_OUT
} | false | false | false | false | false | 0 |
focusblur_brush_render_oversamp (gfloat *dlp,
gsize rowstride,
gint width,
FblurBrush *brush,
gfloat factor,
gflo... | false | false | false | false | false | 0 |
alloc_data(bam1_t *b, int size)
{
if (b->m_data < size) {
b->m_data = size;
kroundup32(b->m_data);
b->data = (uint8_t*)realloc(b->data, b->m_data);
}
return b->data;
} | false | false | false | false | false | 0 |
string2operator(string)
const char *string;
{
if (strcmp(string, "eq") == 0 || strcmp(string, "=") == 0)
return eq;
if (strcmp(string, "neq") == 0 || strcmp(string, "!=") == 0)
return neq;
if (strcmp(string, "ge") == 0 || strcmp(string, ">=") == 0)
return ge;
if (strcmp(string, "le") == 0 || strcmp(strin... | false | false | false | false | false | 0 |
umount_all1(char *devs[], size_t count, int flags)
{
size_t i;
int ret, ret_tmp;
for (i = 0, ret = 0; i < count; i++)
{
if (devs[i] == NULL)
{
continue;
}
ret_tmp = umount_main(devs[i], flags);
if (ret_tmp < 0)
{
if (errno == EPERM)
{
return ret_tmp;
}
ret = ret_tmp;
}
}
retur... | false | false | false | false | false | 0 |
refresh()
{
if(brightness_)
{
bar_draw_=bar_brightness_;
back_draw_=back_brightness_;
}
else
{
bar_draw_=bar_;
back_draw_=back_;
}
} | false | false | false | false | false | 0 |
FixFeatureTestsInRules(GrcFont *pfont)
{
GdlLookupExpression * pexplookFeature =
dynamic_cast<GdlLookupExpression *>(m_pexpOperand1);
if (m_psymOperator->IsComparativeOp() && pexplookFeature &&
pexplookFeature->NameFitsSymbolType(ksymtFeature))
{
GdlFeatureDefn * pfeat = pexplookFeature->Name()->FeatureDefnD... | false | false | false | false | false | 0 |
fli_set_form_icon_data( FL_FORM * form,
char ** data )
{
Pixmap p,
s = None;
unsigned int j;
p = fl_create_from_pixmapdata( fl_root, data, &j, &j, &s, NULL, NULL, 0 );
if ( p != None )
{
fl_set_form_icon( form, p, s );
fl_free( xpmattrib );
... | false | false | false | false | false | 0 |
parse_xml_make_state(Parse_xml_acs_state_code code, void *object)
{
Parse_xml_acs_state *s;
s = ALLOC(Parse_xml_acs_state);
s->code = code;
switch (code) {
case ACS_PARSE_ACL_INDEX:
s->object.acl_index = (Acl_index *) object;
break;
case ACS_PARSE_ACL_MAP:
s->object.acl_map = (Acl_map *) object;
break... | 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.