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 |
|---|---|---|---|---|---|---|
libevalvm_get_stack_trace_lite(ScmObj *SCM_FP, int SCM_ARGCNT, void *data_)
{
ScmObj vm_scm;
ScmVM* vm;
ScmObj SCM_SUBRARGS[2];
int SCM_i;
SCM_ENTER_SUBR("vm-get-stack-trace-lite");
if (SCM_ARGCNT >= 2
&& !SCM_NULLP(SCM_ARGREF(SCM_ARGCNT-1)))
Scm_Error("too many arguments: up to 1 is expected, %d ... | false | false | false | false | false | 0 |
igb_ptp_overflow_check(struct work_struct *work)
{
struct igb_adapter *igb =
container_of(work, struct igb_adapter, ptp_overflow_work.work);
struct timespec64 ts;
igb->ptp_caps.gettime64(&igb->ptp_caps, &ts);
pr_debug("igb overflow check at %lld.%09lu\n",
(long long) ts.tv_sec, ts.tv_nsec);
schedule_delaye... | false | false | false | false | false | 0 |
lp872x_buck_get_mode(struct regulator_dev *rdev)
{
struct lp872x *lp = rdev_get_drvdata(rdev);
enum lp872x_regulator_id buck = rdev_get_id(rdev);
u8 addr, mask, val;
int ret;
switch (buck) {
case LP8720_ID_BUCK:
addr = LP8720_BUCK_VOUT2;
mask = LP8720_BUCK_FPWM_M;
break;
case LP8725_ID_BUCK1:
addr = LP8... | false | false | false | false | false | 0 |
ecore_imf_context_add(const char *id)
{
Ecore_IMF_Context *ctx;
if (!id) return NULL;
ctx = ecore_imf_module_context_create(id);
if (!ctx || !ctx->klass) return NULL;
if (ctx->klass->add) ctx->klass->add(ctx);
/* default use_preedit is EINA_TRUE, so let's make sure it's
* set on the immodule */
... | false | false | false | false | false | 0 |
extract_mc_block (word_t *mcblock, unsigned width, unsigned height,
const word_t *reference, unsigned ref_width,
bool_t half_pixel, unsigned xo, unsigned yo,
unsigned mx, unsigned my)
/*
* Extract motion compensation image 'mcblock' of size 'width'x'height'
* from 'reference' image (width is given by 'r... | false | false | false | false | false | 0 |
ranges_overlap(AW_pos p1, AW_pos p2, int r1, int r2) {
// return true if ranges p1..p2 and r1..r2 overlap
e4_assert(p1 <= p2);
e4_assert(r1 <= r2);
return !((r2 <= p1) || (p2 <= r1)); // "exactly adjacent" means "not overlapping"
} | false | false | false | false | false | 0 |
gog_color_polar_plot_axis_get_bounds (GogPlot *plot, GogAxisType axis,
GogPlotBoundInfo * bounds)
{
GogRTPlot *rt = GOG_RT_PLOT (plot);
switch (axis) {
case GOG_AXIS_CIRCULAR:
bounds->val.minima = bounds->logical.minima= -G_MAXDOUBLE;
bounds->val.maxima = bounds->logical.maxima= G_MAXDOUBLE;
bounds->is_d... | false | false | false | false | false | 0 |
SetJpegQualityF(float q){
if (q>0) info.fQuality = q;
else info.fQuality = 0.0f;
} | false | false | false | false | false | 0 |
start_preview (unsigned channels, unsigned samplerate, unsigned bits_per_sample)
{
yield = true;
PWaitAndSignal m(core_mutex);
PTRACE(4, "AudioInputCore\tStarting preview " << channels << "x" << samplerate << "/" << bits_per_sample);
if (preview_config.active || stream_config.active) {
PTRACE(1, "AudioInp... | false | false | false | false | false | 0 |
trackNumber() const
{
int result = 0;
foreach( const Meta::TrackPtr &track, m_tracks )
{
if( ( !result && track->trackNumber() ) || ( result && result == track->trackNumber() ) )
{
result = track->trackNumber();
}
else if( result && result != track->trackNumber() ... | false | false | false | false | false | 0 |
spawn_thread(time_t now)
{
int rcode;
THREAD_HANDLE *handle;
pthread_attr_t attr;
/*
* Ensure that we don't spawn too many threads.
*/
if (thread_pool.total_threads >= thread_pool.max_threads) {
DEBUG2("Thread spawn failed. Maximum number of threads (%d) already running.", thread_pool.max_threads);
retur... | false | false | false | false | false | 0 |
make_token() {
logParseToken *ret = malloc(sizeof(logParseToken));
if (ret == NULL) return NULL;
ret->type = 0;
ret->optional = 0;
ret->deterministic = 1;
ret->logdatafield = 0;
ret->string_before = "";
ret->string_after = "";
ret->string_len_before = 0;
ret->string_len_after = 0;
ret->parser = N... | false | false | false | false | false | 0 |
addInDegree()
{
if(inDeg>=2) // maximum indegree is 2
{
return false; // cannot be added any more
}
inDeg++;
return true;
} | false | false | false | false | false | 0 |
soap_instantiate_SOAP_ENV__Code(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size)
{
DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_SOAP_ENV__Code(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:""));
struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_SOAP_ENV__Code,... | false | false | false | false | false | 0 |
getAbsolute(const ContainedPtr& cont,
const string& package,
const string& prefix,
const string& suffix) const
{
string name = cont->name();
if(prefix == "" && suffix == "")
{
name = fixKwd(name);
... | false | false | false | false | false | 0 |
_table_att__famille_en_groupe(size_t n_elts,
const int *elt_fam,
const ecs_table_t *table_def)
{
ecs_table_t *table_rep_new;
size_t cpt_val_rep;
size_t ielt_rep;
size_t ipos_def;
size_t nbr_elt_... | false | false | false | false | false | 0 |
assemble_jump_offsets(struct assembler *a, struct compiler *c)
{
basicblock *b;
int bsize, totsize, extended_arg_count = 0, last_extended_arg_count;
int i;
/* Compute the size of each block and fixup jump args.
Replace block pointer with position in bytecode. */
do {
totsize = 0;
... | false | false | false | false | false | 0 |
gst_rdt_manager_src_activate_mode (GstPad * pad, GstObject * parent,
GstPadMode mode, gboolean active)
{
gboolean result;
GstRDTManager *rdtmanager;
GstRDTManagerSession *session;
session = gst_pad_get_element_private (pad);
rdtmanager = session->dec;
switch (mode) {
case GST_PAD_MODE_PUSH:
... | false | false | false | false | false | 0 |
do_attr_changes(struct inode *inode, const struct iattr *attr)
{
if (attr->ia_valid & ATTR_UID)
inode->i_uid = attr->ia_uid;
if (attr->ia_valid & ATTR_GID)
inode->i_gid = attr->ia_gid;
if (attr->ia_valid & ATTR_ATIME)
inode->i_atime = timespec_trunc(attr->ia_atime,
inode->i_sb->s_time_gran);
if (attr->i... | false | false | false | false | false | 0 |
cmp( statinfos *a, statinfos *b ) {
int delta = a->totaltime - b->totaltime;
if( delta == 0 ) return b->ncalls - a->ncalls;
return delta;
} | false | false | false | false | false | 0 |
_clutter_actor_apply_relative_transformation_matrix (ClutterActor *self,
ClutterActor *ancestor,
CoglMatrix *matrix)
{
ClutterActor *parent;
/* Note we terminate before ever calling stage->apply_transform()
... | false | false | false | false | false | 0 |
copy_decl_for_inlining (decl, from_fn, to_fn)
tree decl;
tree from_fn;
tree to_fn;
{
tree copy;
/* Copy the declaration. */
if (TREE_CODE (decl) == PARM_DECL || TREE_CODE (decl) == RESULT_DECL)
{
tree type;
int invisiref = 0;
/* See if the frontend wants to pass this by inv... | false | false | false | false | false | 0 |
GetArgAsVTKObject(
PyObject *o, const char *classname, bool &valid)
{
vtkObjectBase *r = vtkPythonUtil::GetPointerFromObject(o, classname);
valid = (r || o == Py_None);
return r;
} | false | false | false | false | false | 0 |
removeFirstNotTalking()
{
t_running::iterator end = m_running.end();
for (t_running::iterator i = m_running.begin(); i != end; ++i) {
if (!(*i)->isTalking()) {
releaseDialog(*i);
m_running.erase(i);
return;
}
}
} | false | false | false | false | false | 0 |
ap_rxplus_exec(apr_pool_t *pool, ap_rxplus_t *rx,
const char *pattern, char **newpattern)
{
int ret = 1;
int startl, oldl, newl, diffsz;
const char *remainder;
char *subs;
/* snrf process_regexp from mod_headers */
if (ap_regexec(&rx->rx, pattern, rx->nmatch, rx->pmatc... | false | false | false | false | true | 1 |
write_service_token_cache(server_rec *server, struct server_config *sconf,
MWA_SERVICE_TOKEN *token)
{
struct webauth_was_token_cache cache;
int status;
/* Convert to the data structure that the library expects. */
memset(&cache, 0, sizeof(cache));
cache.token = token->tok... | false | false | false | false | false | 0 |
print_amp_caps(struct snd_info_buffer *buffer,
struct hda_codec *codec, hda_nid_t nid, int dir)
{
unsigned int caps;
caps = param_read(codec, nid, dir == HDA_OUTPUT ?
AC_PAR_AMP_OUT_CAP : AC_PAR_AMP_IN_CAP);
if (caps == -1 || caps == 0) {
snd_iprintf(buffer, "N/A\n");
return;
}
snd_iprintf(buffer, "... | false | false | false | false | false | 0 |
Delete(std::string s)
{
ZThread::Guard<ZThread::FastMutex> g(mutex);
uint32 *refcount = refs.GetNoCreate(s);
if(!refcount)
{
logerror("MemoryDataHolder:Delete(\"%s\"): no refcount", s.c_str());
return false;
}
else
{
if(*ref... | false | false | false | false | false | 0 |
snd_atiixp_resume(struct device *dev)
{
struct snd_card *card = dev_get_drvdata(dev);
struct atiixp *chip = card->private_data;
int i;
snd_atiixp_aclink_reset(chip);
snd_atiixp_chip_start(chip);
for (i = 0; i < NUM_ATI_CODECS; i++)
snd_ac97_resume(chip->ac97[i]);
for (i = 0; i < NUM_ATI_PCMDEVS; i++)
if (... | false | false | false | false | false | 0 |
krb5int_fast_as_armor(krb5_context context,
struct krb5int_fast_request_state *state,
krb5_gic_opt_ext *opte,
krb5_kdc_req *request)
{
krb5_error_code retval = 0;
krb5_ccache ccache = NULL;
krb5_principal target_principal = NULL;
krb5_dat... | false | false | false | false | false | 0 |
_opinfo_op_registry_update_status(Instance *inst)
{
int cnt;
char buf[256];
cnt = e_fm2_op_registry_count();
if (cnt)
{
snprintf(buf, sizeof(buf), P_("Processing %d operation", "Processing %d operations", cnt), cnt);
edje_object_part_text_set(inst->o_status, "e.text.info", buf);
... | false | false | false | false | false | 0 |
wordlist_confirm_word(u8* text) {
u32 tlen, i, dcnt = 0, too_many_dots = 0;
s32 ppos = -1;
if (dont_add_words) return;
/* Good keywords are expected to consist of A-Za-z 0-9_-~().:!^$ only.
We expect at least one non-'.' character, at most one '.', and not more
than four digits.
If they do con... | false | false | false | false | false | 0 |
ternary_return_node (NODE *n, parser *p)
{
NODE *ret = NULL;
if (n->t == NUM) {
ret = aux_scalar_node(p);
if (ret != NULL) {
ret->v.xval = n->v.xval;
}
} else if (n->t == VEC) {
int t, T = p->dset->n;
ret = aux_vec_node(p, T);
if (ret != NULL) {
for (t=0; t<T; t++) {
ret->v.xvec[t] = n->... | false | false | false | false | false | 0 |
is_set_item_help (char *s, char *word, PRN *prn)
{
if (!strncmp(s, "set ", 4)) {
if (sscanf(s + 4, "%31s", word) == 1) {
if (!strcmp(word, "stopwatch")) {
strcpy(s, "$stopwatch");
*word = '\0';
} else if (is_libset_var(word)) {
s[3] = '\0';
return 1;
} else {
pprintf(prn, "'%s' is not a se... | false | false | false | false | false | 0 |
gt_seqorder_arguments_check(GT_UNUSED int rest_argc,
void *tool_arguments,
GT_UNUSED GtError *err)
{
GtSeqorderArguments *arguments = tool_arguments;
int had_err = 0;
gt_error_check(err);
gt_assert(arguments != NULL);
if (!(argumen... | false | false | false | false | false | 0 |
PrintSelf(ostream& os, vtkIndent indent)
{
this->Superclass::PrintSelf(os,indent);
os << indent << "Position: (" << this->Position[0] << ", "
<< this->Position[1] << ")\n";
os << indent << "Position: (" << this->Axis[0] << ", "
<< this->Axis[1] << ", " << this->Axis[1] << ")\n";
os << indent << "Wipe:... | false | false | false | false | false | 0 |
compareTo(const Object *obj) const
{
uint a = number;
uint b = ((ht_app_window_entry*)obj)->number;
if (a > b) return 1; else if (a < b) return -1;
return 0;
} | false | false | false | false | false | 0 |
ch_util_get_fake_device (ChCcmxPrivate *priv)
{
GPtrArray *array;
GUsbDevice *device = NULL;
/* just return the first device */
array = g_usb_device_list_get_devices (priv->device_list);
if (array->len == 0)
goto out;
device = g_object_ref (g_ptr_array_index (array, 0));
out:
g_ptr_array_unref (array);
retur... | false | false | false | false | false | 0 |
spanLeftPart(const vector<int> &array){
for(size_t i=0; i<array.size()-1; ++i){
if(array[i+1]<array[i])
return i;
}
return -1;
} | false | false | false | false | false | 0 |
getOperandLatency(const InstrItineraryData *ItinData,
const MachineInstr *DefMI, unsigned DefIdx,
const MachineInstr *UseMI, unsigned UseIdx) const {
if (!ItinData || ItinData->isEmpty())
return -1;
unsigned DefClass = DefMI->getDesc().getSchedClass();
... | false | false | false | false | false | 0 |
get_proc_cmdline(gchar **p_command, gchar **p_args, const gchar *p_proc_path)
{
// Get process cmdline
gchar *proc_cmdline = g_strdup_printf("%s/cmdline", p_proc_path);
#ifdef DEBUG_VERBOSE
purple_debug_misc("gfire", "get_proc_cmdline: Reading command line from \"%s\"\n", proc_cmdline);
#endif // DEBUG_VERBOSE
FIL... | false | false | false | false | true | 1 |
H5SM_table_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5SM_master_table_t *table)
{
H5WB_t *wb = NULL; /* Wrapped buffer for table data */
uint8_t tbl_buf[H5SM_TBL_BUF_SIZE]; /* Buffer for table */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOIN... | false | false | false | false | false | 0 |
ppmDataAvailable(radioInstance_t *r) {
int i;
if (ppmData.frameParsed) {
ppmData.frameParsed = 0;
for (i = 0; i < ppmData.numberChannels; ++i) {
if (&RADIO_THROT == &r->channels[i]) {
r->channels[i] = constrainInt((int)((ppmData.channels[i] - p[PPM_THROT_LOW])*5 / p[PPM_SCALER]), PPM_THROT_MIN, PPM_THROT... | false | false | false | false | false | 0 |
__ecereMethod___ecereNameSpace__ecere__gui__controls__Button_OnMouseOver(struct __ecereNameSpace__ecere__com__Instance * this, int x, int y, unsigned int mods)
{
struct __ecereNameSpace__ecere__gui__controls__Button * __ecerePointer___ecereNameSpace__ecere__gui__controls__Button = (struct __ecereNameSpace__ecere__gui__... | false | false | false | true | false | 1 |
ldraw_library_cleanup(LDrawLibrary *lib)
{
GSList *item;
LDrawPart *part;
item = lib->partlist;
while(item != NULL) {
part = item->data;
item = g_slist_remove(item, part);
ldraw_part_free(part);
}
g_hash_table_destroy(lib->partdb);
ldraw_color_cleanup(lib);
g_free(lib);
} | false | false | false | false | false | 0 |
_mesa_PopDebugGroup()
{
const char *callerstr = "glPopDebugGroup";
struct gl_debug_msg *gdmessage;
GLint prevStackDepth;
GET_CURRENT_CONTEXT(ctx);
if (ctx->Debug.GroupStackDepth <= 0) {
_mesa_error(ctx, GL_STACK_UNDERFLOW, "%s", callerstr);
return;
}
prevStackDepth = ctx->Debug.Group... | false | false | false | false | false | 0 |
__save_sm_root(struct dm_cache_metadata *cmd)
{
int r;
size_t metadata_len;
r = dm_sm_root_size(cmd->metadata_sm, &metadata_len);
if (r < 0)
return r;
return dm_sm_copy_root(cmd->metadata_sm, &cmd->metadata_space_map_root,
metadata_len);
} | false | false | false | false | false | 0 |
set_refspecs(const char **refs, int nr)
{
int i;
for (i = 0; i < nr; i++) {
const char *ref = refs[i];
if (!strcmp("tag", ref)) {
char *tag;
int len;
if (nr <= ++i)
die("tag shorthand without <tag>");
len = strlen(refs[i]) + 11;
if (deleterefs) {
tag = xmalloc(len+1);
strcpy(tag, ":refs... | false | false | false | false | false | 0 |
applyPreferences()
{
// kDebug() << "Update settings based on changed configuration...";
m_gameScene->showLabels(Preferences::showBoardLabels());
ThemeRenderer::self()->loadTheme(Preferences::theme());
if (!isBackendWorking()) {
backendError();
} else if (m_game->engineCommand() != Prefere... | false | false | false | false | false | 0 |
nr_directory_units (struct uae_prefs *p)
{
int i, cnt = 0;
if (p) {
for (i = 0; i < p->mountitems; i++) {
if (p->mountconfig[i].controller == 0)
cnt++;
}
} else {
for (i = 0; i < MAX_FILESYSTEM_UNITS; i++) {
if (mountinfo.ui[i].open && mountinfo.ui[i].controller == 0)
cnt++;
}
}
return cnt;
} | false | false | false | false | false | 0 |
scsi_register(struct scsi_host_template *sht, int privsize)
{
struct Scsi_Host *shost = scsi_host_alloc(sht, privsize);
if (!sht->detect) {
printk(KERN_WARNING "scsi_register() called on new-style "
"template for driver %s\n", sht->name);
dump_stack();
}
if (shost)
list_add_tail(&shost->sht_legacy_l... | false | false | false | false | false | 0 |
function_section_1 (tree decl, bool force_cold)
{
section *section = NULL;
enum node_frequency freq = NODE_FREQUENCY_NORMAL;
bool startup = false, exit = false;
if (decl)
{
struct cgraph_node *node = cgraph_get_node (decl);
if (node)
{
freq = node->frequency;
startup = node->only_called... | false | false | false | false | false | 0 |
asn1PE_H245UserInputIndication (OOCTXT* pctxt, H245UserInputIndication* pvalue)
{
int stat = ASN_OK;
OOCTXT lctxt;
ASN1OpenType openType;
ASN1BOOL extbit;
/* extension bit */
extbit = (ASN1BOOL)(pvalue->t > 2);
encodeBit (pctxt, extbit);
if (!extbit) {
/* Encode choice index value */
... | false | false | false | false | true | 1 |
inet_pton2(family, string, address, interface)
int family;
const char *string;
VOID *address;
char *interface;
{
if (family == AF_INET6)
return inet_pton2_ipv6(string, address, interface);
else if (family == AF_INET)
return inet_pton2_ipv4(string, address, interface);
#ifdef EAFNOSUPPORT
... | false | false | false | false | false | 0 |
isGrammarLoaded(void) const
{
XAP_Module * pGrammar = m_pApp->getPlugin("abigrammar");
if(pGrammar == NULL)
{
return false;
}
return true;
} | false | false | false | false | false | 0 |
irtty_chars_in_buffer(struct sir_dev *dev)
{
struct sirtty_cb *priv = dev->priv;
IRDA_ASSERT(priv != NULL, return -1;);
IRDA_ASSERT(priv->magic == IRTTY_MAGIC, return -1;);
return tty_chars_in_buffer(priv->tty);
} | false | false | false | false | false | 0 |
byteaout(PG_FUNCTION_ARGS)
{
bytea *vlena = PG_GETARG_BYTEA_PP(0);
char *result;
char *vp;
char *rp;
int val; /* holds unprintable chars */
int i;
int len;
len = 1; /* empty string has 1 char */
vp = VARDATA_ANY(vlena);
for (i = VARSIZE_ANY_EXHDR(vlena); i != 0; i--, vp++)
{
if (*v... | false | false | false | false | true | 1 |
check_compatible(const struct gl_context *ctx,
const struct gl_framebuffer *buffer)
{
const struct gl_config *ctxvis = &ctx->Visual;
const struct gl_config *bufvis = &buffer->Visual;
if (buffer == _mesa_get_incomplete_framebuffer())
return GL_TRUE;
#if 0
/* disabling this fixes the ... | false | false | false | false | false | 0 |
s_rename_all_lowlevel(NETLIST * netlist_head, char *src, char *dest)
{
NETLIST *nl_current = NULL;
CPINLIST *pl_current;
nl_current = netlist_head;
while (nl_current != NULL) {
if (nl_current->cpins) {
pl_current = nl_current->cpins;
while (pl_current != NULL) {
if (pl_current->net_name ... | false | false | false | false | false | 0 |
getletter( const char * s)
{
const char* c = s;
while ( *c && (*c != 126 ))
c++;
if (*c == '~' ) {
c++;
return *c;
} else {
return 0;
} /* endif */
} | false | false | false | false | false | 0 |
ObjectLiteralMapFromCache(Handle<Context> context,
Handle<FixedArray> keys) {
if (context->map_cache()->IsUndefined()) {
// Allocate the new map cache for the global context.
Handle<MapCache> new_cache = NewMapCache(24);
context->set_map_cache(*new_cache);
... | false | false | false | false | false | 0 |
gda_data_proxy_describe_column (GdaDataModel *model, gint col)
{
GdaDataProxy *proxy;
g_return_val_if_fail (GDA_IS_DATA_PROXY (model), NULL);
proxy = GDA_DATA_PROXY (model);
g_return_val_if_fail (proxy->priv, NULL);
gda_mutex_lock (proxy->priv->mutex);
if (!proxy->priv->columns)
create_columns (proxy);
gda_mu... | false | false | false | false | false | 0 |
bad_buf_count(unsigned buf_count, unsigned max_entry_count)
{
unsigned max_buf_count = max_entry_count *
sizeof(efx_qword_t) / EFX_BUF_SIZE;
return ((buf_count & (buf_count - 1)) || buf_count > max_buf_count);
} | false | false | false | false | false | 0 |
Mono_Posix_ToFcntlCommand (int x, int *r)
{
*r = 0;
if (x == 0)
return 0;
#ifdef F_DUPFD
if (x == F_DUPFD)
{*r = Mono_Posix_FcntlCommand_F_DUPFD; return 0;}
#endif /* ndef F_DUPFD */
#ifdef F_GETFD
if (x == F_GETFD)
{*r = Mono_Posix_FcntlCommand_F_GETFD; return 0;}
#endif /* ndef F_GETFD */
#ifdef F_GETFL
if... | false | false | false | false | false | 0 |
fadeOutOldLine()
{
int count = mRemovedLine.size();
mFadeOutItems.clear();
for(int i = 0; i < count; i++)
{
for(int j = 0; j < mFieldWidth; j++)
{
maFreezeCells[j + mRemovedLine[i] * mFieldWidth]->startOpAnim();
mFadeOutItems.append(maFreezeCells[j + mRemoved... | false | false | false | false | false | 0 |
opt_process(int argc, char **argv, Options *options, char *msgbuf, size_t bufsize)
{
option *long_options;
char *optstring;
if (!(long_options = opt_convert(options)))
return optind;
if (!(optstring = opt_optstring(options)))
{
mem_release(long_options);
return optind;
}
for (;;)
{
int longindex = -1... | false | false | false | false | false | 0 |
get_gtk_image ( GtkWidget *widget, gchar** xpm )
{
GdkPixbuf *pixbuf = NULL;
GtkWidget *gtkimage = NULL;
pixbuf = gdk_pixbuf_new_from_xpm_data (xpm);
if(!gdk_pixbuf_get_has_alpha (pixbuf))
{
GdkPixbuf *tmp;
tmp = gdk_pixbuf_add_alpha (pixbuf, FALSE, 0, 0, 0);
if(GDK_IS_PIXBUF(tmp)){ g_object_unref(pi... | false | false | false | false | false | 0 |
mediacontrol_restart(GF_ObjectManager *odm)
{
GF_List *to_restart;
GF_ObjectManager *ctrl_od;
GF_Clock *ck, *scene_ck;
u32 i;
u32 current_seg;
#ifndef GPAC_DISABLE_VRML
MediaControlStack *ctrl;
#endif
if (!odm || (odm->flags & GF_ODM_NO_TIME_CTRL) ) return;
#ifndef GPAC_DISABLE_VRML
ctrl = gf_odm_get_mediacon... | false | false | false | false | false | 0 |
rinoo_http_init(t_socket *socket, t_http *http)
{
memset(http, 0, sizeof(*http));
http->socket = socket;
http->request.buffer = buffer_create(NULL);
if (http->request.buffer == NULL) {
return -1;
}
http->response.buffer = buffer_create(NULL);
if (http->response.buffer == NULL) {
buffer_destroy(http->request.... | false | false | false | false | false | 0 |
incrbyfloatCommand(redisClient *c) {
long double incr, value;
robj *o, *new, *aux;
o = lookupKeyWrite(c->db,c->argv[1]);
if (o != NULL && checkType(c,o,REDIS_STRING)) return;
if (getLongDoubleFromObjectOrReply(c,o,&value,NULL) != REDIS_OK ||
getLongDoubleFromObjectOrReply(c,c->argv[2],&incr... | false | false | false | false | false | 0 |
result()
{
Side side(sideToMove());
if (pieceAt(kingSquare(side)).isEmpty())
{
Side winner = side.opposite();
QString str = QObject::tr("%1's king exploded").arg(side.toString());
return Result(Result::Win, winner, str);
}
return WesternBoard::result();
}
} | false | false | false | false | false | 0 |
gog_xy_dropbar_get_property (GObject *obj, guint param_id,
GValue *value, GParamSpec *pspec)
{
GogPlot *plot = GOG_PLOT (obj);
GogXYDropBarPlot *dropbar = GOG_XY_DROPBAR_PLOT (obj);
switch (param_id) {
case XY_DROPBAR_PROP_FILL_BEFORE_GRID:
g_value_set_boolean (value, plot->rendering_order == GOG_PLOT_REN... | false | false | false | false | false | 0 |
stdout_lfun (SRunner * sr, FILE * file, enum print_output printmode,
void *obj, enum cl_event evt)
{
Suite *s;
if (printmode == CK_ENV) {
printmode = get_env_printmode ();
}
switch (evt) {
case CLINITLOG_SR:
break;
case CLENDLOG_SR:
break;
case CLSTART_SR:
if (printmode >... | false | false | false | false | false | 0 |
decode_sbn_mode(const unsigned char *mode)
{
static const fix_type fixes[8] = {
fix_none, /* 000 No Nav */
fix_none, /* 001 1 SV solution */
fix_none, /* 010 2 SV solution */
fix_2d, /* 011 3 SV solution (2D) */
fix_3d, /* 100 4 or more SV solution (3D) */
fix_2d, ... | false | false | false | false | false | 0 |
Ns_CacheKey(Ns_Entry *entry)
{
Entry *ePtr = (Entry *) entry;
return Tcl_GetHashKey(&ePtr->cachePtr->entriesTable, ePtr->hPtr);
} | false | false | false | false | false | 0 |
canvas_addtemplatesforlist(t_gobj *y,
int *p_ntemplates, t_symbol ***p_templatevec)
{
for (; y; y = y->g_next)
{
if (pd_class(&y->g_pd) == scalar_class)
{
canvas_addtemplatesforscalar(((t_scalar *)y)->sc_template,
((t_scalar *)y)->sc_vec, p_ntemplates, p_template... | false | false | false | false | false | 0 |
alu_op_slot_flags() {
assert(is_alu_inst());
alu_node *c = static_cast<alu_node*>(this);
return c->bc.slot_flags;
} | false | false | false | false | false | 0 |
ena_update_tx_rings_intr_moderation(struct ena_adapter *adapter)
{
unsigned int val;
int i;
val = ena_com_get_nonadaptive_moderation_interval_tx(adapter->ena_dev);
for (i = 0; i < adapter->num_queues; i++)
adapter->tx_ring[i].smoothed_interval = val;
} | false | false | false | false | false | 0 |
paint_slice (cairo_t *cr,
double x,
double y,
double radius,
double percent_start,
double percent_width,
const GdkRGBA *fill,
const GdkRGBA *stroke)
{
double angle1;
double angle2;
gboolean full;
double offset = G_PI / 2.0;
if... | false | false | false | false | false | 0 |
totp_validate(char *otp_value, char *digest_name, unsigned char *key,
unsigned int keylen, unsigned int time_step,
int clock_delta, unsigned int drift_window, unsigned int ndigits,
unsigned int base, int *driftp)
{
int i;
char *hval;
time_t now;
time(&now);
/* Adjust for clock skew. */
now ... | false | false | false | false | false | 0 |
uncprop_enter_block (struct dom_walk_data *walk_data ATTRIBUTE_UNUSED,
basic_block bb)
{
basic_block parent;
edge e;
bool recorded = false;
/* If this block is dominated by a single incoming edge and that edge
has an equivalency, then record the equivalency and push the
VALUE onto EQUIV_STACK.... | false | false | false | false | false | 0 |
clearXinerama() {
fbdbg<<"BScreen::initXinerama(): dont have Xinerama"<<endl;
m_xinerama_avail = false;
if (m_xinerama_headinfo)
delete [] m_xinerama_headinfo;
m_xinerama_headinfo = 0;
m_xinerama_num_heads = 0;
} | false | false | false | false | false | 0 |
table_MOD (struct GMTMATH_INFO *info, double **stack[], GMT_LONG *constant, double *factor, GMT_LONG last, GMT_LONG col, GMT_LONG n_row)
/*OPERATOR: MOD 2 1 A mod B (remainder after floored division). */
{
GMT_LONG i, prev;
double a, b;
prev = last - 1;
if (gmtdefs.verbose && constant[last] && factor[last] == 0.0... | false | false | false | false | false | 0 |
scsi_cdb_readcapacity10(int lba, int pmi)
{
struct scsi_task *task;
task = malloc(sizeof(struct scsi_task));
if (task == NULL) {
printf("Failed to allocate scsi task structure\n");
return NULL;
}
bzero(task, sizeof(struct scsi_task));
task->cdb[0] = SCSI_OPCODE_READCAPACITY10;
*(uint32_t *)&task->cdb[2]... | false | false | false | false | false | 0 |
lookup_map_id(char *kind, int *dst, const char *file)
{
int err = -EINVAL;
char buf[512];
FILE *fd = fopen(file, "r");
if (fd == NULL)
return -errno;
while (fgets(buf, sizeof(buf), fd)) {
char namebuf[512], *p = buf;
int id;
while (*p == ' ' || *p == '\t')
p++;
if (*p == '#' || *p == '\n' || *p == ... | false | false | false | false | false | 0 |
nrep(void)
{
Symtab *sym;
Word *w;
sym = symlook("NREP", S_VAR, 0);
if(sym){
w = sym->u.ptr;
if (w && w->s && *w->s)
nreps = atoi(w->s);
}
if(nreps < 1)
nreps = 1;
if(DEBUG(D_GRAPH))
Bprint(&bout, "nreps = %d\n", nreps);
} | false | false | false | false | false | 0 |
_copyCreateForeignTableStmt(CreateForeignTableStmt *from)
{
CreateForeignTableStmt *newnode = makeNode(CreateForeignTableStmt);
CopyCreateStmtFields((CreateStmt *) from, (CreateStmt *) newnode);
COPY_STRING_FIELD(servername);
COPY_NODE_FIELD(options);
return newnode;
} | false | false | false | false | false | 0 |
LibUninstallProtocolInterfaces (
IN EFI_HANDLE Handle,
...
)
{
va_list args;
EFI_STATUS Status;
EFI_GUID *Protocol;
VOID *Interface;
va_start (args, Handle);
for (; ;) {
//
// If protocol is NULL, then it's the end of th... | false | false | false | false | false | 0 |
oss_driver_detach (oss_driver_t *driver, jack_engine_t *engine)
{
JSList *node;
if (driver->engine == NULL)
return -1;
/*jack_deactivate(driver->client);*/ /* ? */
node = driver->capture_ports;
while (node != NULL)
{
jack_port_unregister(driver->client,
((jack_port_t *) node->data));
node = jack_slis... | false | false | false | false | false | 0 |
findFromFileName(const QString &fileName, QString *pMatchingExtension)
{
m_mutex.lockForWrite();
parseGlobs();
m_mutex.unlock();
QReadLocker lock(&m_mutex);
// First try the high weight matches (>50), if any.
QStringList matchingMimeTypes;
QString foundExt;
findFromOtherPatternList(matc... | false | false | false | false | false | 0 |
usbhid_lookup_quirk(const u16 idVendor, const u16 idProduct)
{
u32 quirks = 0;
const struct hid_blacklist *bl_entry = NULL;
/* NCR devices must not be queried for reports */
if (idVendor == USB_VENDOR_ID_NCR &&
idProduct >= USB_DEVICE_ID_NCR_FIRST &&
idProduct <= USB_DEVICE_ID_NCR_LAST)
return HID_QUIRK_N... | false | false | false | false | false | 0 |
iconv_try(iconv_t cd, const char **inptr, size_t *inlen, char **outptr, size_t *outlen)
{
#ifdef ICONV_INPTR_CONST
#define ICONV_INPTR_CAST
#else
#define ICONV_INPTR_CAST (char **)
#endif
size_t ret;
errno = 0;
ret = iconv(cd, ICONV_INPTR_CAST inptr, inlen, outptr, outlen);
if (ret == (size_t)-1) {
if... | false | false | false | false | false | 0 |
_e_wid_update(E_Widget_Data *wd)
{
Evas_Coord x, y, w, h;
Eina_Bool changed = EINA_FALSE;
evas_object_geometry_get(wd->o_event, &x, &y, &w, &h);
if (x != wd->x || y != wd->y || w != wd->w || h != wd->h)
changed = EINA_TRUE;
if (memcmp(wd->color, wd->prev, sizeof (E_Color)))
changed = EINA_TRU... | false | true | false | false | false | 1 |
internalConnectSim(void)
{
lockDevice();
double offset = myOffsetAmount;
double increment = myIncrementAmount;
unlockDevice();
myRobot->lock();
// return true if we could send all the commands
if (myRobot->comInt(36, -ArMath::roundInt(offset)) && // Start angle
myRobot->comInt(37, ArMath::roundIn... | false | false | false | false | false | 0 |
screenclear2()
{
if (starting || Nextscreen == NULL)
return;
outstr(T_ED); /* clear the display */
/* blank out Nextscreen */
#ifdef KANJI
{
int i;
for (i = 0; i < Rows; i++)
{
memset(&Nextscreen[i * Columns * 2], ' ', Columns);
memset(&Nextscreen[i * Columns * 2 + Columns], 0, Columns);... | false | false | false | false | false | 0 |
filtering_changed_callback (gpointer callback_data)
{
GList *dirs, *l;
NautilusDirectory *directory;
g_assert (callback_data == NULL);
dirs = NULL;
g_hash_table_foreach (directories, collect_all_directories, &dirs);
/* Preference about which items to show has changed, so we
* can't trust any of our precomput... | false | false | false | false | false | 0 |
orte_util_comm_report_event(orte_comm_event_t ev)
{
int rc, i;
opal_buffer_t *buf;
orte_node_t *node;
struct timeval tv;
/* if nothing is connected, ignore this */
if (!tool_connected) {
return ORTE_SUCCESS;
}
/* init a buffer for the data */
buf = OBJ_NEW(opal_buffer_t... | false | false | false | false | false | 0 |
draw()
{
// superclass draw:
draw_box();
draw_label();
if (spectrum != 0) {
int xa, ya, xb, yb;
int realwidth = w() - WIDTHMARGIN;
int realheight = h() - HEIGHTMARGIN;
fl_clip(x(),y(),w(),h());
fl_color(FL_BLACK);
for (int i = 1 ; i < nbSpectrumValues ; i++) {
xa = ((i-1)*realwidth)/(nbSpec... | false | false | false | false | false | 0 |
EncodeInstruction(const MCInst &MI, raw_ostream &OS,
SmallVectorImpl<MCFixup> &Fixups) const {
// Pseudo instructions don't get encoded.
const MCInstrDesc &Desc = MCII.get(MI.getOpcode());
uint64_t TSFlags = Desc.TSFlags;
if ((TSFlags & ARMII::FormMask) == ARMII::Pseudo)
return;
int Siz... | false | false | false | false | false | 0 |
multiple_tones_cb (TpCallContent *self,
const GError *error,
gpointer user_data,
GObject *weak_object)
{
if (error != NULL)
complete_sending_tones (self, error);
} | 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.