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 |
|---|---|---|---|---|---|---|
opal_crs_base_metadata_read_token(FILE *metadata, char * token, char ***value) {
int exit_status = OPAL_SUCCESS;
char * loc_token = NULL;
char * loc_value = NULL;
int argc = 0;
/* Dummy check */
if( NULL == token ) {
exit_status = OPAL_ERROR;
goto cleanup;
}
if( NULL == ... | false | false | false | false | true | 1 |
HandleClientSphinx ( int iSock, const char * sClientIP, int iPipeFD )
{
bool bPersist = false;
int iTimeout = g_iReadTimeout;
NetInputBuffer_c tBuf ( iSock );
// send my version
DWORD uServer = htonl ( SPHINX_SEARCHD_PROTO );
if ( sphSockSend ( iSock, (char*)&uServer, sizeof(DWORD) )!=sizeof(DWORD) )
{
sphWar... | false | false | false | false | false | 0 |
v4l2_release(struct inode *inode, struct file *filp)
{
struct video_device *vdev = video_devdata(filp);
int ret = 0;
if (vdev->fops->release)
ret = vdev->fops->release(filp);
if (vdev->dev_debug & V4L2_DEV_DEBUG_FOP)
printk(KERN_DEBUG "%s: release\n",
video_device_node_name(vdev));
/* decrease the refcoun... | false | false | false | false | false | 0 |
fi_sources_remove(const void *unused_key, void *value, void *unused_udata)
{
GtkTreeIter *iter;
g_assert(value);
(void) unused_key;
(void) unused_udata;
iter = value;
WFREE(iter);
return TRUE; /* Remove the handle from the hashtable */
} | false | false | false | false | false | 0 |
requires(const String &n) const
{
if (!requirements)
return false;
else
return requirement_contains(requirements, n);
} | false | false | false | false | false | 0 |
mdb_iconv_init(MdbHandle *mdb)
{
const char *iconv_code;
/* check environment variable */
if (!(iconv_code=getenv("MDBICONV"))) {
iconv_code="UTF-8";
}
#ifdef HAVE_ICONV
if (IS_JET4(mdb)) {
mdb->iconv_out = iconv_open("UCS-2LE", iconv_code);
mdb->iconv_in = iconv_open(iconv_code, "UCS-2LE");
} else {
/*... | false | false | false | false | true | 1 |
remove_unused_cpusets(hwloc_obj_t obj)
{
hwloc_obj_t child, *temp;
if (obj->cpuset) {
hwloc_bitmap_and(obj->cpuset, obj->cpuset, obj->online_cpuset);
hwloc_bitmap_and(obj->cpuset, obj->cpuset, obj->allowed_cpuset);
}
for_each_child_safe(child, obj, temp)
remove_unused_cpusets(child);
} | false | false | false | false | false | 0 |
TRANS_is_end_function(bool is_proc, PATTERN *look)
{
if (PATTERN_is_newline(*look))
return TRUE;
if (is_proc)
return PATTERN_is(*look, RS_PROCEDURE) || PATTERN_is(*look, RS_SUB);
else
return PATTERN_is(*look, RS_FUNCTION);
} | false | false | false | false | false | 0 |
__ecereNameSpace__ecere__sys__UTF8Validate(char * source)
{
if(source)
{
int c;
for(c = 0; source[c]; )
{
unsigned char ch = source[c];
unsigned int codePoint = 0;
int numBytes = 1;
int i;
unsigned char mask = (unsigned char)0x7F;
if(ch & (unsigned char)0x80)
{
if(ch & (unsigned char)0x40)
{
mask >>= 2;
numBytes++;
i... | false | false | false | false | false | 0 |
DumpBearoff2(const TanBoard anBoard, char *szOutput, const bgvariation UNUSED(bgv))
{
g_assert(pbc2);
if (BearoffDump(pbc2, anBoard, szOutput))
return -1;
if (pbc1)
if (BearoffDump(pbc1, anBoard, szOutput))
return -1;
return 0;
} | false | false | false | false | false | 0 |
album_info_set_genre (AlbumInfo *album,
const char *genre)
{
if (album->genre == genre)
return;
g_free (album->genre);
album->genre = NULL;
if (genre != NULL)
album->genre = g_strdup (genre);
} | false | false | false | false | false | 0 |
ucspool_cmds (fjobid)
boolean fjobid;
{
struct sjob *qjob;
char *zjobid;
for (qjob = qCjobs; qjob != NULL; qjob = qjob->qnext)
{
ulog_system (qjob->qsys->uuconf_zname);
zjobid = zsysdep_spool_commands (qjob->qsys, bCgrade, qjob->ccmds,
qjob->pascmds, (boolean *) NULL);
if (z... | false | false | false | false | false | 0 |
event_log_add(TSS_PCR_EVENT *event, UINT32 *pNumber)
{
struct event_wrapper *new, *tmp;
TSS_RESULT result;
UINT32 i;
MUTEX_LOCK(tcs_event_log->lock);
new = calloc(1, sizeof(struct event_wrapper));
if (new == NULL) {
LogError("malloc of %zd bytes failed.", sizeof(struct event_wrapper));
MUTEX_UNLOCK(tcs_even... | false | false | false | false | false | 0 |
CountChips(bool checkupper, bool checklower) const {
wxUint16 mapchips = 0;
wxUint16 pos;
for(pos = 0; pos < 1024; ++pos) {
if(checkupper && upper[pos] == TILE_COMPUTERCHIP)
++mapchips;
if(checklower && lower[pos] == TILE_COMPUTERCHIP)
++mapchips;
}
return map... | false | false | false | false | false | 0 |
LimitVersions(RegExpCompiler* compiler,
Trace* trace) {
// If we are generating a greedy loop then don't stop and don't reuse code.
if (trace->stop_node() != NULL) {
return CONTINUE;
}
RegExpMacroAssembler* macro_assembler = compiler->macro_assembler();
i... | false | false | false | false | false | 0 |
editor_indicator_set_on_line(GeanyEditor *editor, gint indic, gint line)
{
gint start, end;
guint i = 0, len;
gchar *linebuf;
g_return_if_fail(editor != NULL);
g_return_if_fail(line >= 0);
start = sci_get_position_from_line(editor->sci, line);
end = sci_get_position_from_line(editor->sci, line + 1);
/* skip ... | false | false | false | false | false | 0 |
is_new_name (tree name)
{
unsigned ver = SSA_NAME_VERSION (name);
if (!new_ssa_names)
return false;
return (ver < SBITMAP_SIZE (new_ssa_names)
&& bitmap_bit_p (new_ssa_names, ver));
} | false | false | false | false | false | 0 |
engageMopDiceTensor(gageContext *gctx, Nrrd *nctenComp[7],
/* out/in */
airArray *mop, const Nrrd* ncten) {
static const char me[]="engageMopDiceTensor";
gagePerVolume *pvl;
unsigned int ci;
if (tenTensorCheck(ncten, nrrdTypeFloat, AIR_TRUE /* want4F */,
... | false | false | false | false | false | 0 |
ChangeSocketMode( eSocketMode mode, CString cert, CString key )
{
bool res = false;
m_pConnMutex->Lock();
if ( m_eState == estCONNECTED )
{
// flush all data
StateSend();
if ( m_eState == estCONNECTED )
{
res = CSocket::ChangeSocketMode(mode, cert, key );
if ( res && (mode != esmSOCKET) )
{
... | false | false | false | false | false | 0 |
au_sio_cpup_simple(struct au_cp_generic *cpg)
{
aufs_bindex_t bsrc, bend;
struct dentry *dentry, *h_dentry;
if (cpg->bsrc < 0) {
dentry = cpg->dentry;
bend = au_dbend(dentry);
for (bsrc = cpg->bdst + 1; bsrc <= bend; bsrc++) {
h_dentry = au_h_dptr(dentry, bsrc);
if (h_dentry) {
AuDebugOn(d_is_negati... | false | false | false | false | false | 0 |
load_ramdisk_raw(const char *devpath, FILE * wfd, off_t ramdisk_start,
unsigned long long fssize)
{
unsigned long long ramdisk_size, ramdisk_left;
int disk = 1;
ssize_t bytes;
unsigned char buf[BUF_SZ];
int rfd;
rfd = open(devpath, O_RDONLY);
if (rfd < 0)
return -1;
/* Set to the size of the medium, or "... | false | false | false | false | false | 0 |
getLimitOfLinearMatch(int32_t first, int32_t last, int32_t unitIndex) const {
const UCharsTrieElement &firstElement=elements[first];
const UCharsTrieElement &lastElement=elements[last];
int32_t minStringLength=firstElement.getStringLength(strings);
while(++unitIndex<minStringLength &&
firstE... | false | false | false | false | false | 0 |
operator==(const DcmStack& arg) const
{
if (cardinality_ != arg.cardinality_) return OFFalse;
DcmStackNode * thisPtr = topNode_;
DcmStackNode * argPtr = arg.topNode_;
while (thisPtr)
{
if (thisPtr->objNodeValue != argPtr->objNodeValue) return OFFalse;
thisPtr = thisPtr->link;
argPtr = argPt... | false | false | false | false | false | 0 |
ac3_New(u32 boxType)
{
ISOM_DECL_BOX_ALLOC(GF_AC3SampleEntryBox, GF_ISOM_BOX_TYPE_AC3);
gf_isom_audio_sample_entry_init((GF_AudioSampleEntryBox*)tmp);
if (boxType==GF_ISOM_BOX_TYPE_EC3)
tmp->is_ec3 = 1;
return (GF_Box *)tmp;
} | false | false | false | false | false | 0 |
zd_tx_watchdog_enable(struct zd_usb *usb)
{
struct zd_usb_tx *tx = &usb->tx;
if (!tx->watchdog_enabled) {
dev_dbg_f(zd_usb_dev(usb), "\n");
queue_delayed_work(zd_workqueue, &tx->watchdog_work,
ZD_TX_WATCHDOG_INTERVAL);
tx->watchdog_enabled = 1;
}
} | false | false | false | false | false | 0 |
main(int argc,char *argv[])
{
int i,cutoff_score = 200,minimum=0,arg;
char score[100],*DBS_NAME,c=' ';
ss_type P = NULL;
a_type A;
Boolean success=FALSE,DNA=FALSE,xnu=FALSE,query=FALSE;
if(argc < 3) print_error(PURGE_USAGE);
DBS_NAME = argv[1];
if(sscanf(argv[2],"%d",&i)!=1) print_error(PURGE_USAGE);
cutoff_... | true | true | false | false | false | 1 |
ssl3_read_internal(SSL *s, void *buf, int len, int peek)
{
int ret;
clear_sys_error();
if (s->s3->renegotiate) ssl3_renegotiate_check(s);
s->s3->in_read_app_data=1;
ret=s->method->ssl_read_bytes(s,SSL3_RT_APPLICATION_DATA,buf,len,peek);
if ((ret == -1) && (s->s3->in_read_app_data == 2))
{
/* ssl3_read_byte... | false | false | false | false | false | 0 |
cblas_dcopy(const int N, const double *X, const int incX,
double *Y, const int incY)
{
if (N > 0)
{
if (incX < 0)
{
if (incY < 0) ATL_dcopy(N, X, -incX, Y, -incY);
else ATL_dcopy(N, X+(1-N)*incX, incX, Y, incY);
}
else if (incY < 0) ATL_dcopy(N, X+(N... | false | false | false | false | false | 0 |
gen_binding_template (ostream &out, const char *jpname,
const BackEndProblems &bep) {
// later this will be passed as an argument
Binding &bind = binding ();
// no code generation if no context variables are expected
if (!bind._used)
return;
// generate the m... | false | false | false | false | false | 0 |
destroy_property(gpointer user_data)
{
struct property_change *property = user_data;
struct connman_service *service;
if (property == NULL)
return;
service = get_service(property->path);
if (service != NULL) {
if (property->error != 0)
service->to_error[property->index] = 0;
else
service->to_update[p... | false | false | false | false | false | 0 |
cl_thread_create_thread_condition(cl_thread_condition_t** condition ) {
cl_thread_condition_t* new_condition = NULL;
int ret_val;
if (condition == NULL) {
/* no condition pointer pointer */
return CL_RETVAL_PARAMS;
}
if (*condition != NULL) {
/* pointer pointer is already initialized (n... | false | false | false | false | false | 0 |
pm_button_press(GtkWidget *w, GdkEventButton *e, gpointer data) {
gint cell_nr;
GtkTreeModel *model;
GtkTreePath *path;
GtkTreeIter iter;
Playlist *pl;
ExtraiTunesDBData *eitdb;
g_return_val_if_fail (w && e, FALSE);
switch (e->button) {
case 1:
cell_nr = tree_view_get_cell_f... | false | false | false | false | false | 0 |
time_report(int n, const char *occupation, int move, double mintime)
{
double t;
double dt;
gg_assert(n >= 0 && n < NUMBER_OF_TIMERS);
if (!showtime)
return 0.0;
t = gg_cputime();
dt = t - timers[n];
if (dt > mintime) {
gprintf("%s", occupation);
if (move != NO_MOVE)
gprintf("%1m", mov... | false | false | false | false | false | 0 |
atk_component_add_focus_handler (AtkComponent *component,
AtkFocusHandler handler)
{
AtkComponentIface *iface = NULL;
g_return_val_if_fail (ATK_IS_COMPONENT (component), 0);
iface = ATK_COMPONENT_GET_IFACE (component);
if (iface->add_focus_handler)
return (iface->add_fo... | false | false | false | false | false | 0 |
dib7000m_set_output_mode(struct dib7000m_state *state, int mode)
{
int ret = 0;
u16 outreg, fifo_threshold, smo_mode,
sram = 0x0005; /* by default SRAM output is disabled */
outreg = 0;
fifo_threshold = 1792;
smo_mode = (dib7000m_read_word(state, 294 + state->reg_offs) & 0x0010) | (1 << 1);
dprintk( "setti... | false | false | false | false | false | 0 |
build_inode_path(struct inode *inode,
const char **ppath, int *ppathlen, u64 *pino,
int *pfreepath)
{
struct dentry *dentry;
char *path;
if (ceph_snap(inode) == CEPH_NOSNAP) {
*pino = ceph_ino(inode);
*ppathlen = 0;
return 0;
}
dentry = d_find_alias(inode);
path = ceph_mdsc_build_path(dentry,... | false | false | false | false | false | 0 |
_xyz_ev(double xyz[3], const double _ev[3]) {
double ev[3], tmp;
ELL_3V_COPY(ev, _ev);
ELL_SORT3(ev[0], ev[1], ev[2], tmp);
ELL_3MV_MUL(xyz, _xyzmat, ev);
} | false | false | false | false | false | 0 |
add_replace(char *optarg)
{
char *op_pos;
struct replace *r;
if((op_pos = strchr(optarg,'=')) == NULL)
{
panic("Replace expression must contain =-character",optarg,NULL);
}
*op_pos = 0;
r = replace;
if(r == NULL)
{
replace = xmalloc(sizeof(struct replace));
... | false | false | false | false | false | 0 |
dht_filter_loc_subvol_key (xlator_t *this, loc_t *loc, loc_t *new_loc,
xlator_t **subvol)
{
char *new_name = NULL;
char *new_path = NULL;
xlator_list_t *trav = NULL;
char key[1024] = {0,};
int ret = 0;... | true | true | false | false | false | 1 |
setData(const QModelIndex& index, const QVariant& value, int iRole)
{
bool fRet = false;
if (index.isValid())
{
if (iRole == Qt::EditRole)
{
switch (index.column())
{
case 0:
fRet = m_PppIpSettings.setRouteAddress(index.row(), value.toString());
... | false | false | false | false | false | 0 |
cell_draw_simplify_cb (PangoAttribute *attribute,
gboolean *recalc_height)
{
if ((attribute->klass->type == PANGO_ATTR_RISE) ||
(attribute->klass->type == PANGO_ATTR_SCALE)) {
*recalc_height = TRUE;
return TRUE;
}
return (attribute->klass->type == PANGO_ATTR_SHAPE);
} | false | false | false | false | false | 0 |
gst_ximagesink_ximage_put (GstXImageSink * ximagesink, GstXImageBuffer * ximage)
{
GstVideoRectangle src, dst, result;
gboolean draw_border = FALSE;
g_return_val_if_fail (GST_IS_XIMAGESINK (ximagesink), FALSE);
/* We take the flow_lock. If expose is in there we don't want to run
concurrently from the dat... | false | false | false | false | false | 0 |
spgRedoVacuumLeaf(XLogReaderState *record)
{
XLogRecPtr lsn = record->EndRecPtr;
char *ptr = XLogRecGetData(record);
spgxlogVacuumLeaf *xldata = (spgxlogVacuumLeaf *) ptr;
OffsetNumber *toDead;
OffsetNumber *toPlaceholder;
OffsetNumber *moveSrc;
OffsetNumber *moveDest;
OffsetNumber *chainSrc;
OffsetNumber *... | false | false | false | false | false | 0 |
attachInterface(as_object& obj)
{
GNASH_REPORT_FUNCTION;
Global_as& gl = getGlobal(obj);
obj.init_member("lirc_init", gl.createFunction(lirc_ext_init));
obj.init_member("lirc_getKey", gl.createFunction(lirc_ext_getkey));
obj.init_member("lirc_getButton", gl.createFunction(lirc_ext_getbutton));
} | false | false | false | false | false | 0 |
R_BeginFrame( float camera_separation )
{
gl_state.camera_separation = camera_separation;
if (con_font->modified)
RefreshFont ();
/*
** change modes if necessary
*/
if ( gl_mode->modified || vid_fullscreen->modified )
{ // FIXME: only restart if CDS is required
cvar_t *ref;
ref = Cvar_Ge... | false | false | false | false | false | 0 |
gkrellm_draw_decal_internal(GkrellmPanel *p, GkrellmDecal *d, gchar *s,
gint value)
{
GkrellmText *tx;
GList *list;
if (!s || !d || d->state == DS_INVISIBLE)
return;
if (!d->text_list)
d->text_list = g_list_append(d->text_list, g_new0(GkrellmText, 1));
list = d->text_list;
tx = (GkrellmText *) list-... | false | false | false | false | false | 0 |
CacheRecordRmv(mDNS *const m, CacheRecord *rr)
{
if (m->CurrentQuestion) LogMsg("CacheRecordRmv ERROR m->CurrentQuestion already set");
m->CurrentQuestion = m->Questions;
while (m->CurrentQuestion && m->CurrentQuestion != m->NewQuestions)
{
DNSQuestion *q = m->CurrentQuestion;
m->CurrentQuestion = q->next;
... | false | false | false | false | false | 0 |
plot_option_index()
{
if (df_binary_file && df_matrix_file)
int_error(c_token, "Binary matrix file format does not allow more than one surface per file");
++c_token;
/* Check for named index */
if ((indexname = try_to_get_string())) {
index_found = FALSE;
return;
}
/* Numerical index list *... | false | false | false | false | false | 0 |
_e_entry_cb_paste(void *data, E_Menu *m __UNUSED__, E_Menu_Item *mi __UNUSED__)
{
E_Entry_Smart_Data *sd;
Ecore_X_Window xwin;
E_Win *win;
sd = data;
if (!sd) return;
if ((!sd->enabled) || (sd->noedit)) return;
win = e_win_evas_object_win_get(sd->entry_object);
if (win) xwin = win->evas_win;
... | false | false | false | false | false | 0 |
GammaBuilder_clear(CTX ctx, knh_gint_t offset, kStmtExpr *stmt)
{
size_t i;
knh_gamma2_t *gf = DP(ctx->gma)->gf;
if(stmt != NULL) {
while(DP(stmt)->nextNULL != NULL) {
stmt = DP(stmt)->nextNULL;
}
}
for(i = offset; i < DP(ctx->gma)->gsize; i++) {
gf[i].flag = 0;
gf[i].type = TYPE_void;
gf[i].fn =... | false | false | false | false | false | 0 |
renameGenericCommand(redisClient *c, int nx) {
robj *o;
/* To use the same key as src and dst is probably an error */
if (sdscmp(c->argv[1]->ptr,c->argv[2]->ptr) == 0) {
addReply(c,shared.sameobjecterr);
return;
}
o = lookupKeyWrite(c->db,c->argv[1]);
if (o == NULL) {
a... | false | false | false | false | false | 0 |
mmc_spi_skip(struct mmc_spi_host *host, unsigned long timeout,
unsigned n, u8 byte)
{
u8 *cp = host->data->status;
unsigned long start = jiffies;
while (1) {
int status;
unsigned i;
status = mmc_spi_readbytes(host, n);
if (status < 0)
return status;
for (i = 0; i < n; i++) {
if (cp[i] != byte... | false | false | false | false | false | 0 |
clist_writer_push_no_cropping(gx_device_clist_writer *cdev)
{
clist_writer_cropping_buffer_t *buf = gs_alloc_struct(cdev->memory,
clist_writer_cropping_buffer_t,
&st_clist_writer_cropping_buffer, "clist_writer_transparency_push");
if (buf == NULL)
return_error(gs_error_V... | false | false | false | false | false | 0 |
append_check(const char *name,
struct auth_state *auth_state,
long aclcheck, quota_t quotacheck)
{
struct mailbox *mailbox = NULL;
int myrights;
int r;
struct quota q;
r = mailbox_open_irl(name, &mailbox);
if (r) return r;
myrights = cyrus_acl_myrights(auth_state, mailbox->acl);
... | false | false | false | false | false | 0 |
doneBits() {
if(verbose)
cout << name() << " Setting dsState\n";
(this->*dsState)();
} | false | false | false | false | false | 0 |
eina_list_accessor_get_at(Eina_Accessor_List *it, unsigned int idx, void **data)
{
const Eina_List *over;
unsigned int middle;
unsigned int i;
EINA_MAGIC_CHECK_LIST_ACCESSOR(it, EINA_FALSE);
if (idx >= eina_list_count(it->head))
return EINA_FALSE;
if (it->index == idx)
over = it->current;... | false | false | false | false | false | 0 |
si_construct_voltage_tables(struct radeon_device *rdev)
{
struct rv7xx_power_info *pi = rv770_get_pi(rdev);
struct evergreen_power_info *eg_pi = evergreen_get_pi(rdev);
struct si_power_info *si_pi = si_get_pi(rdev);
int ret;
if (pi->voltage_control) {
ret = radeon_atom_get_voltage_table(rdev, VOLTAGE_TYPE_VDDC,... | false | false | false | false | false | 0 |
pop(void)
{
int x;
if (sp>=STKSIZE)
runerror("stack underflow");
x=(*((int *)&stack[sp]));
sp+=sizeof(int);
return(x);
} | false | false | false | false | false | 0 |
sb_message (char *msg, gboolean serious)
{
if (!state_gui_active)
fprintf (stderr, "%s\n", msg);
else
{
if (serious)
//sb_error (msg, serious);
sb_message_dialog_show (msg, FALSE);
else
sb_messagebar_message (msg);
}
} | false | false | false | false | false | 0 |
isl_ast_expr_neg(__isl_take isl_ast_expr *arg)
{
isl_ctx *ctx;
isl_ast_expr *expr = NULL;
if (!arg)
return NULL;
ctx = isl_ast_expr_get_ctx(arg);
expr = isl_ast_expr_alloc_op(ctx, isl_ast_op_minus, 1);
if (!expr)
goto error;
expr->u.op.args[0] = arg;
return expr;
error:
isl_ast_expr_free(arg);
return ... | false | false | false | false | false | 0 |
keyctl_get_keyring_ID(key_serial_t id, int create)
{
key_ref_t key_ref;
unsigned long lflags;
long ret;
lflags = create ? KEY_LOOKUP_CREATE : 0;
key_ref = lookup_user_key(id, lflags, KEY_NEED_SEARCH);
if (IS_ERR(key_ref)) {
ret = PTR_ERR(key_ref);
goto error;
}
ret = key_ref_to_ptr(key_ref)->serial;
key_... | false | false | false | false | false | 0 |
activation_message(object_type *o_ptr, const char *message)
{
char buf[1024] = "\0";
const char *next;
const char *s;
const char *tag;
const char *in_cursor;
size_t end = 0;
in_cursor = message;
next = strchr(in_cursor, '{');
while (next)
{
/* Copy the text leading up to this { */
strnfcat(buf, 1024, &e... | false | false | false | false | false | 0 |
asoc_simple_card_dai_init(struct snd_soc_pcm_runtime *rtd)
{
struct simple_card_data *priv = snd_soc_card_get_drvdata(rtd->card);
struct snd_soc_dai *codec = rtd->codec_dai;
struct snd_soc_dai *cpu = rtd->cpu_dai;
struct simple_dai_props *dai_props;
int num, ret;
num = rtd - rtd->card->rtd;
dai_props = &priv->d... | false | false | false | false | false | 0 |
ifcontrol(ifcase)
sym_pt ifcase;
{
bool_t iftrue;
struct symstruct *symptr;
if (iflevel >= MAX_IF)
{
limiterror("#if's nested too deeply (33 levels)");
return;
}
{
register struct ifstruct *ifptr;
ifptr = &ifstack[(int)iflevel++];
ifptr->elseflag = ifstate.elseflag;
ifptr->ifflag = ifsta... | false | false | false | false | false | 0 |
lj_gc_closeuv(global_State *g, GCupval *uv)
{
GCobj *o = obj2gco(uv);
/* Copy stack slot to upvalue itself and point to the copy. */
copyTV(mainthread(g), &uv->tv, uvval(uv));
setmref(uv->v, &uv->tv);
uv->closed = 1;
setgcrefr(o->gch.nextgc, g->gc.root);
setgcref(g->gc.root, o);
if (isgray(o)) { /* A c... | false | false | false | false | false | 0 |
set(MSAttrValueList& avList_)
{
MSManager::set(avList_);
MSIndexVector index;
for (unsigned i=0;i<avList_.length();i++)
{
if (avList_[i].attribute()=="viewHeight") viewHeight(avList_[i].value().asInt()),index<<i;
else if (avList_[i].attribute()=="viewWidth") viewWidth(avList_[i].value().asInt()) ,i... | false | false | false | false | false | 0 |
findDefaultLocation(bool) const
{
// notify user that they must give a new dir such
// as "Favourites" as otherwise it'll just place
// lots of .url files in the given dir and gui
// stuff in the exporter is ugly so that exclues
// the possibility of just writing to Favourites
// and checking if... | false | false | false | false | false | 0 |
kvm_get_ioapic(struct kvm *kvm, struct kvm_ioapic_state *state)
{
struct kvm_ioapic *ioapic = ioapic_irqchip(kvm);
if (!ioapic)
return -EINVAL;
spin_lock(&ioapic->lock);
memcpy(state, ioapic, sizeof(struct kvm_ioapic_state));
state->irr &= ~ioapic->irr_delivered;
spin_unlock(&ioapic->lock);
return 0;
} | false | true | false | false | false | 1 |
bfa_fcs_rport_create_by_wwn(struct bfa_fcs_lport_s *port, wwn_t rpwwn)
{
struct bfa_fcs_rport_s *rport;
bfa_trc(port->fcs, rpwwn);
rport = bfa_fcs_rport_alloc(port, rpwwn, 0);
if (!rport)
return NULL;
bfa_sm_send_event(rport, RPSM_EVENT_ADDRESS_DISC);
return rport;
} | false | false | false | false | false | 0 |
chainprefix(pretype, sufftype)
struct typestruct *pretype;
struct typestruct *sufftype;
{
if (pretype->nexttype != NULL)
{
sufftype = chainprefix(pretype->nexttype, sufftype);
if (pretype->constructor != ARRAY)
return prefix(pretype->constructor, pretype->typesize, sufftype);
else
return prefix(ARR... | false | false | false | false | false | 0 |
is_af_unix_keeper(const int fd)
{
struct timeval tval = { READABLE_UNIX_FD_DROP_DEAD_TIMEVAL };
fd_set read_fds;
FD_ZERO(&read_fds);
FD_SET(fd, &read_fds);
return select(fd + 1, &read_fds, NULL, NULL, &tval) >= 0 && FD_ISSET(fd, &read_fds);
} | false | false | false | false | false | 0 |
CloseEventHandler( wxCloseEvent &WXUNUSED(event) )
{
delete bitmap_;
Destroy();
} | false | false | false | false | false | 0 |
upload_progress_child_init(apr_pool_t *p, server_rec *s)
{
/**/up_log(APLOG_MARK, APLOG_DEBUG, 0, s, "upload_progress_child_init()");
apr_status_t rv;
ServerConfig *config = get_server_config(s);
if (!config->cache_lock) {
ap_log_error(APLOG_MARK, APLOG_CRIT, 0, s, "Global mutex not set.");
... | false | false | false | false | false | 0 |
nand_fill_oob(struct mtd_info *mtd, uint8_t *oob, size_t len,
struct mtd_oob_ops *ops)
{
struct nand_chip *chip = mtd->priv;
/*
* Initialise to all 0xFF, to avoid the possibility of left over OOB
* data from a previous OOB read.
*/
memset(chip->oob_poi, 0xff, mtd->oobsize);
switch (ops->mode) {
c... | false | false | false | false | false | 0 |
Copy(const wxSheetCellEditor& other)
{
wxCHECK_MSG(other.Ok(), false, wxT("wxSheetCellEditor not created"));
UnRef();
m_refData = ((wxSheetCellEditorRefData*)other.m_refData)->Clone();
return true;
} | false | false | false | false | false | 0 |
ezdfile_get_metadata(GPtrArray *ezdfile,
G_GNUC_UNUSED gint idx)
{
EZDSection *section;
GwyContainer *meta;
guint i;
meta = gwy_container_new();
for (i = 0; i < ezdfile->len; i++) {
section = (EZDSection*)g_ptr_array_index(ezdfile, i);
if (gwy_strequal(section-... | false | false | false | false | false | 0 |
Swig_find_module(const char *name) {
Module *m = modules;
while (m) {
if (strcmp(m->name, name) == 0) {
return m->fac;
}
m = m->next;
}
return 0;
} | false | false | false | false | false | 0 |
mimeData( const QList<CollectionTreeItem*> &items ) const
{
if ( items.isEmpty() )
return 0;
Meta::TrackList tracks;
QList<Collections::QueryMaker*> queries;
foreach( CollectionTreeItem *item, items )
{
if( item->allDescendentTracksLoaded() ) {
tracks << item->descenden... | false | false | false | false | false | 0 |
pt_RecvFrom(PRFileDesc *fd, void *buf, PRInt32 amount,
PRIntn flags, PRNetAddr *addr, PRIntervalTime timeout)
{
PRBool fNeedContinue = PR_FALSE;
PRInt32 syserrno, bytes = -1;
pt_SockLen addr_len = sizeof(PRNetAddr);
if (pt_TestAbort()) return bytes;
bytes = recvfrom(
fd->secret->md.osf... | false | false | false | false | false | 0 |
format(int32_t number, UnicodeString& appendTo) const
{
FieldPosition pos(0);
return format(number, appendTo, pos);
} | false | false | false | false | false | 0 |
tile_get_info_text(const struct tile *ptile, int linebreaks)
{
static char s[256];
bool pollution;
bool lb = FALSE;
int bufsz = sizeof(s);
sz_strlcpy(s, terrain_name_translation(tile_terrain(ptile)));
if (linebreaks & TILE_LB_TERRAIN_RIVER) {
/* Linebreak needed before next text */
lb = TRUE;
}
... | false | false | false | false | false | 0 |
Log(Logger* info_log, const char* format, ...) {
if (info_log != NULL) {
va_list ap;
va_start(ap, format);
info_log->Logv(format, ap);
va_end(ap);
}
} | false | false | false | false | false | 0 |
smp_fetch_res_comp_algo(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
const struct arg *args, struct sample *smp, const char *kw)
{
if (!l4->comp_algo)
return 0;
smp->type = SMP_T_STR;
smp->flags = SMP_F_CONST;
smp->data.str.str = l4->comp_algo->name;
smp->data.str.len = l4-... | false | false | false | false | false | 0 |
ErrorsAtLine(int nLine, int * piperrFirst)
{
int iperrFirst = 0;
while (iperrFirst < signed(m_vperr.size()) && m_vperr[iperrFirst]->PreProcessedLine() < nLine)
iperrFirst++;
if (iperrFirst >= signed(m_vperr.size()) || nLine < m_vperr[iperrFirst]->PreProcessedLine())
{
*piperrFirst = -1;
return 0;
}
int cp... | false | false | false | false | false | 0 |
dump_enable_all (int flags)
{
int ir_dump_type = (flags & (TDF_TREE | TDF_RTL | TDF_IPA));
int n = 0;
size_t i;
for (i = TDI_none + 1; i < (size_t) TDI_end; i++)
if ((dump_files[i].flags & ir_dump_type))
{
dump_files[i].state = -1;
dump_files[i].flags |= flags;
n++;
}
... | false | false | false | false | false | 0 |
uListSet (ULIST *ul, int x, void *data)
{
if (x >= ul->num)
return nerr_raise(NERR_OUTOFRANGE, "uListSet: past end (%d > %d)",
x, ul->num);
ul->items[x] = data;
return STATUS_OK;
} | false | false | false | false | false | 0 |
main(int argc, char *argv[])
{
pe_data_t pedata ;
int ProblemNumber = 0;
if (argc != 2)
{
printf("Not enough arguments, or too many arguments.\n");
printf("Proper usage is: ./ProjectEuler #, where # is the problem number to run\n");
}
else
{... | false | false | false | false | false | 0 |
shm32read__read_file(struct b43_wldev *dev,
char *buf, size_t bufsize)
{
ssize_t count = 0;
unsigned int routing, addr;
u32 val;
routing = dev->dfsentry->shm32read_routing_next;
addr = dev->dfsentry->shm32read_addr_next;
if ((routing > B43_MAX_SHM_ROUTING) ||
(addr > B43_MAX_SHM_ADDR))
return -EDE... | false | false | false | false | false | 0 |
midi_gm_volume(guint8 volume)
{
byte data[MIDI_MASTER_VOLUME_LEN] = {
0xf0,
0x7f,
0x7f,
0x04,
0x01,
volume,
volume,
0xf7};
writer->write(writer, data, MIDI_MASTER_VOLUME_LEN);
if (writer->flush)
writer->flush(writer);
return SFX_OK;
} | false | false | false | false | false | 0 |
np_uint(char *p, PyObject *v, const formatdef *f)
{
unsigned long x;
unsigned int y;
if (get_ulong(v, &x) < 0)
return -1;
y = (unsigned int)x;
#if (SIZEOF_LONG > SIZEOF_INT)
if (x > ((unsigned long)UINT_MAX))
RANGE_ERROR(y, f, 1, -1);
#endif
memcpy(p, (char *)&y, sizeof y);
r... | false | false | false | false | false | 0 |
Taugment(Table *target, Table *source)
{
long test;
TableWalker tw;
PyObject *d1, *d2;
/* walk through the source */
(void) InitAll(&tw, source);
while (tw.valid == 1) {
Dprint(("taug: TableGet1\n"));
test = TableGet1(target, tw.key, tw.map, tw.hash, FORCE, &d1, &d2);
if (test!=0) { return -1; }... | false | false | false | false | false | 0 |
restore_loop(void)
{
if (restr_loop->prev != NULL) {
restr_loop->prev->next = fuse_loop;
} else {
restr_loop->outer->inner = fuse_loop;
}
if (restr_loop->next != NULL) {
restr_loop->next->prev = target_loop;
}
fit_link_block_outer_and_inner(fuse_loop, fuse_loop->inner);... | false | false | false | false | false | 0 |
box_child_set_expand (ClutterBoxChild *self,
gboolean expand)
{
if (self->expand != expand)
{
ClutterLayoutManager *layout;
self->expand = expand;
layout = clutter_layout_meta_get_manager (CLUTTER_LAYOUT_META (self));
clutter_layout_manager_layout_changed (... | false | false | false | false | false | 0 |
brasero_project_switch (BraseroProject *project, BraseroProjectType type)
{
GtkAction *action;
if (type == BRASERO_PROJECT_TYPE_AUDIO) {
project->priv->current = BRASERO_DISC (project->priv->audio);
gtk_notebook_set_current_page (GTK_NOTEBOOK (project->priv->discs), 0);
brasero_medium_selection_show_media_type... | false | false | false | false | false | 0 |
update_ebb_live_info (rtx head, rtx tail)
{
unsigned int j;
int regno;
bool live_p;
rtx prev_insn, set;
bool remove_p;
basic_block last_bb, prev_bb, curr_bb;
bitmap_iterator bi;
struct lra_insn_reg *reg;
edge e;
edge_iterator ei;
last_bb = BLOCK_FOR_INSN (tail);
prev_bb = NULL;
for (curr_insn... | false | false | false | false | false | 0 |
isNode(const string &dir, const string &name) {
struct stat buf;
string fullpath = dir + "/" + name;
return !stat(fullpath.c_str(), &buf) && S_ISDIR(buf.st_mode);
} | false | false | false | false | false | 0 |
destroy()
{
devlock *rwl = this;
int stat, stat1, stat2;
if (rwl->valid != DEVLOCK_VALID) {
return EINVAL;
}
if ((stat = pthread_mutex_lock(&rwl->mutex)) != 0) {
return stat;
}
/*
* If any threads are active, report EBUSY
*/
if (rwl->r_active > 0 || rwl->w_active) {
p... | false | false | false | false | false | 0 |
store_progressive_read(png_store *ps, png_structp pp, png_infop pi)
{
/* Notice that a call to store_read will cause this function to fail because
* readpos will be set.
*/
if (ps->pread != pp || ps->current == NULL || ps->next == NULL)
png_error(pp, "store state damaged (progressive)");
do
{... | false | false | false | false | false | 0 |
rb_warn(const char *fmt, ...)
#else
rb_warn(fmt, va_alist)
const char *fmt;
va_dcl
#endif
{
char buf[BUFSIZ];
va_list args;
if (NIL_P(ruby_verbose)) return;
snprintf(buf, BUFSIZ, "warning: %s", fmt);
va_init_list(args, fmt);
warn_print(buf, args);
va_end(args);
} | false | false | false | false | false | 0 |
gribEncode(int *isec0, int *isec1, int *isec2, double *fsec2, int *isec3,
double *fsec3, int *isec4, double *fsec4, int klenp, int *kgrib,
int kleng, int *kword, int efunc, int *kret)
{
long gribLen = 0; /* Counter of GRIB length for output */
long isLen, pdsLen;
GRIBPACK *lpds;
unsigned char *CGrib;
long... | 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.