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 |
|---|---|---|---|---|---|---|
cmd_analyze(void)
{
/*
* "analyze" mode is similar to force, hard and post together
* in that it produces a text output like post, but must
* think indefinitely like ponder.
*
* Some additional output is expected in command ".\n" but if ignored
* this should not be sent any more
*/
/* TODO corre... | false | false | false | false | false | 0 |
test_image (void)
{
GESTimeline *timeline;
GESLayer *layer;
GESUriClipAsset *asset1, *asset2;
get_asset (test_image_filename, asset1);
get_asset (testfilename1, asset2);
layer = ges_layer_new ();
timeline = ges_timeline_new_audio_video ();
fail_unless (ges_timeline_add_layer (timeline, layer));
ges... | false | false | false | false | false | 0 |
indexToLabel(int index, GooString *label)
{
char buffer[32];
int i, base, number;
Interval *interval;
GooString number_string;
base = 0;
interval = NULL;
for (i = 0; i < intervals.getLength(); i++) {
interval = (Interval *) intervals.get(i);
if (base <= index && index < base + interval->length)
... | false | false | false | true | false | 1 |
main_draw(struct view *view, struct line *line, unsigned int lineno)
{
struct commit *commit = line->data;
if (!commit->author)
return FALSE;
if (opt_line_number && draw_lineno(view, lineno))
return TRUE;
if (draw_date(view, &commit->time))
return TRUE;
if (draw_author(view, commit->author))
return TRU... | false | false | false | false | false | 0 |
ParseTraditionalInclude(char *file)
{
char *fullname; /* full pathname of file */
char *cp; /* current position in file spec */
/*
* Skip over whitespace
*/
while (*file == ' ' || *file == '\t') {
file++;
}
if (*file == '\0') {
Parse_Error(PARSE_FATAL, "Filename missing from \"include\"");
return;
}... | false | false | false | false | false | 0 |
cg_plugin_add_to_repository (AnjutaClassGenPlugin *plugin,
GFile *header_file,
GFile *source_file)
{
IAnjutaVcs *vcs;
vcs = anjuta_shell_get_interface (ANJUTA_PLUGIN (plugin)->shell,
IAnjutaVcs, NULL);
if(vcs != NULL)
{
... | false | false | false | false | false | 0 |
readMixerInputMode(void)
{
int input_mode = 0;
if (inmixerfd != -1) {
if (ioctl(inmixerfd,MIXER_READ(SOUND_MIXER_RECSRC),&input_mode) == -1) {
osLogMsg("readMixerInputMode: "
"%s: ioctl(%d, MIXER_READ(SOUND_MIXER_RECSRC)) failed: "
"%s\n", sndStatIn... | false | false | false | false | false | 0 |
indentOrUnindent(bool doIndent)
{
QTextCursor cursor = textCursor();
cursor.beginEditBlock();
int pos = cursor.position();
QTextDocument *doc = document();
if(!cursor.hasSelection() || (doc->findBlock(cursor.selectionStart()) == doc->findBlock(cursor.selectionEnd()) ))
{
cursor.removeSelectedText();
... | false | false | false | false | false | 0 |
mesh_embed_k33(graph *g, mesh *m, int x, int y){
/* same disclaimers as k5 */
/* the k3,3 embedding works with the standard walk algorithm only
because an edge with an endpoint exactly on another edge is
considered an intersection. */
/* the way it is added, the walk/population can add additional edges... | false | false | false | false | false | 0 |
SortSV(DiagonalMatrix& D, Matrix& U, bool ascending)
{
REPORT
Tracer trace("SortSV_DU");
int m = U.Nrows(); int n = U.Ncols();
if (n != D.Nrows()) Throw(IncompatibleDimensionsException(D,U));
Real* u = U.Store();
for (int i=0; i<n; i++)
{
int k = i; Real p = D.element(i);
if (ascending)... | false | false | false | false | false | 0 |
encode_html_chars(struct strbuf *p)
{
int i;
for (i = 0; i < p->len; i++) {
if (p->buf[i] == '&')
strbuf_splice(p, i, 1, "&", 5);
if (p->buf[i] == '<')
strbuf_splice(p, i, 1, "<", 4);
if (p->buf[i] == '>')
strbuf_splice(p, i, 1, ">", 4);
if (p->buf[i] == '"')
strbuf_splice(p, i, 1, "&quo... | false | false | false | false | false | 0 |
tour2d_speed_set_display(gfloat slidepos, displayd *dsp)
{
cpaneld *cpanel;
if (dsp) {
cpanel = &dsp->cpanel;
if (cpanel) {
cpanel->t2d.slidepos = slidepos;
speed_set(slidepos, &cpanel->t2d.step, &dsp->t2d.delta);
}
}
} | false | false | false | false | false | 0 |
slot_default()
{
m_entry.set_text( MISC::itostr( m_defaultval ) );
} | false | false | false | false | false | 0 |
skipDR(VolInfo* volInfo)
{
unsigned char dRLen;
int rc;
rc = read711(volInfo, &dRLen);
if(rc <= 0)
return BKERROR_READ_GENERIC;
readSeekSet(volInfo, dRLen - 1, SEEK_CUR);
return dRLen;
} | false | false | false | false | false | 0 |
delete_project_owned_file_aux(const char* path) {
#ifdef _WIN32
if (DeleteFile(path)) return 0;
int error = GetLastError();
if (error == ERROR_ACCESS_DENIED) {
SetFileAttributes(path, FILE_ATTRIBUTE_NORMAL);
if (DeleteFile(path)) return 0;
}
return ERR_UNLINK;
#else
int retval = ... | false | false | false | false | false | 0 |
cros_ec_cmd_xfer(struct cros_ec_device *ec_dev,
struct cros_ec_command *msg)
{
int ret;
mutex_lock(&ec_dev->lock);
if (ec_dev->proto_version == EC_PROTO_VERSION_UNKNOWN) {
ret = cros_ec_query_all(ec_dev);
if (ret) {
dev_err(ec_dev->dev,
"EC version unknown and query failed; aborting command\n");
... | false | false | false | false | false | 0 |
it8712f_wdt_ping(void)
{
if (wdt_control_reg & WDT_RESET_GAME)
inb(address);
} | false | false | false | false | false | 0 |
remove_device(DBusConnection *conn, DBusMessage *msg,
void *data)
{
struct btd_adapter *adapter = data;
struct btd_device *device;
const char *path;
GSList *l;
if (dbus_message_get_args(msg, NULL, DBUS_TYPE_OBJECT_PATH, &path,
DBUS_TYPE_INVALID) == FALSE)
return btd_error_invalid_args(msg);
l = ... | false | false | false | false | false | 0 |
yconnection_check_useless(const Vector<int> &x, bool isoutput)
{
for (const int *it = x.begin(); it != x.end(); it += 3 + it[1] + it[2])
if (it[isoutput ? 2 : 1] > 0) {
lerror(isoutput ? "output ports ignored at end of chain" : "input ports ignored at start of chain");
break;
}
} | false | false | false | false | false | 0 |
search_rtp_by_mtno (Rearrange_table *rtp_head,
int target_mt_no)
{
Rearrange_table *rtp = rtp_head;
while (rtp) {
if (rtp->block->no == target_mt_no)
break;
rtp = rtp->next;
}
return rtp;
} | false | false | false | false | false | 0 |
logged_inode_size(struct btrfs_root *log, struct inode *inode,
struct btrfs_path *path, u64 *size_ret)
{
struct btrfs_key key;
int ret;
key.objectid = btrfs_ino(inode);
key.type = BTRFS_INODE_ITEM_KEY;
key.offset = 0;
ret = btrfs_search_slot(NULL, log, &key, path, 0, 0);
if (ret < 0) {
return ret;
}... | false | false | false | false | false | 0 |
run_checks()
{
u_int i, t, result;
u_int final_wait, time_passed;
/* this loop might actually violate the pkt_interval or target_interval
* settings, but only if there aren't any packets on the wire which
* indicates that the target can handle an increased packet rate */
for(i = 0; i < packets; i++) {
for(t ... | false | false | false | false | false | 0 |
_decodePath( const char *cipherPath, uint64_t *iv ) const
{
// if chaining is not enabled, then the iv pointer is not used..
if(!chainedNameIV)
iv = 0;
return recodePath( cipherPath,
&NameIO::maxDecodedNameLen, &NameIO::decodeName, iv);
} | false | false | false | false | false | 0 |
CompareNameMask(const TCHAR * szMpqName, const TCHAR * szNameMask)
{
for(;;)
{
// Compare character
switch(*szNameMask)
{
case 0: // End of the mask
return (*szMpqName == 0) ? true : false;
case _T('#'): // We are expecting a n... | false | false | false | false | false | 0 |
rad_check_nas_pack(struct rad_packet_t *pack)
{
struct rad_attr_t *attr;
const char *ident = NULL;
in_addr_t ipaddr = 0;
list_for_each_entry(attr, &pack->attrs, entry) {
if (!strcmp(attr->attr->name, "NAS-Identifier"))
ident = attr->val.string;
else if (!strcmp(attr->attr->name, "NAS-IP-Address"))
ipadd... | false | false | false | false | false | 0 |
stats_tklines(struct Client *source_p)
{
const char *host, *pass, *user, *oper_reason;
struct ConfItem *aconf;
/* Oper only, if unopered, return ERR_NOPRIVS */
if((ConfigFileEntry.stats_k_oper_only == 2) && !IsOper(source_p))
sendto_one_numeric(source_p, ERR_NOPRIVILEGES, "%s", form_str(ERR_NOPRIVILEGES));
/* ... | false | false | false | false | false | 0 |
Itcl_EquivArgLists(arg1, arg1c, arg2, arg2c)
CompiledLocal* arg1; /* prototype argument list */
int arg1c; /* number of args in prototype arg list */
CompiledLocal* arg2; /* another argument list to match against */
int arg2c; /* number of args in matching list */
{
char ... | false | false | false | false | false | 0 |
enable_chip(struct hfi1_devdata *dd)
{
u32 rcvmask;
u32 i;
/* enable PIO send */
pio_send_control(dd, PSC_GLOBAL_ENABLE);
/*
* Enable kernel ctxts' receive and receive interrupt.
* Other ctxts done as user opens and initializes them.
*/
rcvmask = HFI1_RCVCTRL_CTXT_ENB | HFI1_RCVCTRL_INTRAVAIL_ENB;
for (i... | false | false | false | false | false | 0 |
incrByU32(U64 * pu64, unsigned int u32)
{
unsigned int tmp;
tmp = pu64->low;
pu64->low += u32;
#if SIZEOF_LONG != 4
pu64->low &= 0xffffffff;
#endif
if (pu64->low < tmp) {
pu64->high++;
#if SIZEOF_LONG != 4
pu64->high &= 0xffffffff;
#endif
}
} | false | false | false | false | false | 0 |
look_for_codec_id(const struct ac97_codec_id *table,
unsigned int id)
{
const struct ac97_codec_id *pid;
for (pid = table; pid->id; pid++)
if (pid->id == (id & pid->mask))
return pid;
return NULL;
} | false | false | false | false | false | 0 |
snd_pcm_oss_set_channels(struct snd_pcm_oss_file *pcm_oss_file, unsigned int channels)
{
int idx;
if (channels < 1)
channels = 1;
if (channels > 128)
return -EINVAL;
for (idx = 1; idx >= 0; --idx) {
struct snd_pcm_substream *substream = pcm_oss_file->streams[idx];
struct snd_pcm_runtime *runtime;
if (subs... | false | false | false | false | false | 0 |
logview_window_finalize (GObject *object)
{
LogviewWindow *logview = LOGVIEW_WINDOW (object);
if (logview->priv->read_cancellable != NULL) {
g_cancellable_cancel (logview->priv->read_cancellable);
g_clear_object (&logview->priv->read_cancellable);
}
g_clear_object (&logview->priv->filters_placeholder)... | false | false | false | false | false | 0 |
explain_buffer_unimapdesc(explain_string_buffer_t *sb,
const struct unimapdesc *value, int extra)
{
if (explain_is_efault_pointer(value, sizeof(*value)))
explain_buffer_pointer(sb, value);
else
{
explain_string_buffer_printf
(
sb,
"{ entry_ct = %d, entries... | false | false | false | false | false | 0 |
camlidl_abstract1_ap_abstract1_forget_array(
value _v_man,
value _v_a,
value _v_v1,
value _v_v3)
{
ap_manager_ptr man; /*in*/
struct ap_abstract1_t *a; /*in*/
ap_var_t *v1; /*in*/
unsigned int v2; /*in*/
int v3; /*in*/
struct ap_abstract1_t _res;
struct ap_abstract1_t _c1;
mlsize_t _c2;
mlsize_t _... | false | false | false | false | false | 0 |
ast_channel_reason2str(int reason)
{
switch (reason) /* the following appear to be the only ones actually returned by request_and_dial */
{
case 0:
return "Call Failure (not BUSY, and not NO_ANSWER, maybe Circuit busy or down?)";
case AST_CONTROL_HANGUP:
return "Hangup";
case AST_CONTROL_RING:
return "Local ... | false | false | false | false | false | 0 |
pvr2_dvb_stream_end(struct pvr2_dvb_adapter *adap)
{
unsigned int idx;
struct pvr2_stream *stream;
if (adap->thread) {
kthread_stop(adap->thread);
adap->thread = NULL;
}
if (adap->channel.stream) {
stream = adap->channel.stream->stream;
} else {
stream = NULL;
}
if (stream) {
pvr2_hdw_set_streaming(... | false | false | false | false | false | 0 |
GetStatScore(const Point& param) const
{
vector<unsigned> bests;
Get1bests(param, bests);
statscore_t score = GetStatScore(bests);
return score;
} | false | false | false | false | false | 0 |
git_reference_delete(git_reference *ref)
{
const git_oid *old_id = NULL;
const char *old_target = NULL;
if (ref->type == GIT_REF_OID)
old_id = &ref->target.oid;
else
old_target = ref->target.symbolic;
return git_refdb_delete(ref->db, ref->name, old_id, old_target);
} | false | false | false | false | false | 0 |
get (char *l, char *n)
{
vaul_design_unit *du = vaul_pool::get (l, n);
if (du == NULL)
{
char *fn = mapper->find_design_file (l, n);
if (fn == NULL)
return NULL;
if (codegen_options.get_verbose ())
fprintf (stderr, "reading %s.%s from %s\n", l, n, fn);
// We are only interested in p... | false | false | false | false | false | 0 |
clear() {
unsigned int i;
for (i=0; i<projects.size(); i++) {
delete projects[i];
}
projects.clear();
d_free = 0;
d_total = 0;
d_boinc = 0;
d_allowed = 0;
} | false | false | false | false | false | 0 |
setInlinePreviewShown(bool show)
{
if (d->native) {
return;
}
d->w->setInlinePreviewShown(show);
} | false | false | false | false | false | 0 |
mlx4_en_deactivate_cq(struct mlx4_en_priv *priv, struct mlx4_en_cq *cq)
{
napi_disable(&cq->napi);
if (!cq->is_tx) {
napi_hash_del(&cq->napi);
synchronize_rcu();
}
netif_napi_del(&cq->napi);
mlx4_cq_free(priv->mdev->dev, &cq->mcq);
} | false | false | false | false | false | 0 |
toAbstractView() const
{
KHTMLPart *part = ::qobject_cast<KHTMLPart *>(m_frame->m_part);
if (!part || !part->xmlDocImpl())
return 0;
return part->xmlDocImpl()->defaultView();
} | false | false | false | false | false | 0 |
GTKStatPageCube(const rolloutstat * prs, const int cGames)
{
GtkWidget *pw;
GtkWidget *pwLabel;
GtkWidget *treeview;
GtkTreeModel *model;
const char *headers[] = { N_("Double, take\n"), N_("Double, pass\n") };
int anTotal[4];
char sz[100];
pw = gtk_vbox_new(FALSE, 0);
pwLabel = gtk... | false | false | false | false | false | 0 |
pardoline(int &lexpos, int &lineno, int &nindex, int indexarray[],
int in_flag[])
{
int i;
nindex=0;
for (i = 0; i < mx_array_dim; i++)
in_flag[i] = 0;
while (!endofoutArray&& id==outArray[lexpos])
{
if (nindex<mx_array_dim)
indexarray[nindex]=idnosyn;
... | false | false | false | false | false | 0 |
symmetry (FttCellFace * f, GfsBc * b)
{
if (b->v->component == f->d/2)
GFS_VARIABLE (f->cell, b->v->i) = - GFS_VARIABLE (f->neighbor, b->v->i);
else
GFS_VARIABLE (f->cell, b->v->i) = GFS_VARIABLE (f->neighbor, b->v->i);
} | false | false | false | false | false | 0 |
buf_incrwritepos(buffer* buf, unsigned int incr) {
if (incr > BUF_MAX_INCR || buf->pos + incr > buf->size) {
dropbear_exit("bad buf_incrwritepos");
}
buf->pos += incr;
if (buf->pos > buf->len) {
buf->len = buf->pos;
}
} | false | false | false | false | false | 0 |
ompi_proc_set_locality(ompi_proc_t *proc)
{
opal_hwloc_locality_t *hwlocale, locality;
ompi_vpid_t vpid, *vptr;
int ret;
/* get the locality information - do not use modex recv for
* this request as that will automatically cause the hostname
* to be loaded as well
*/
hwlocale = &(pro... | false | false | false | false | false | 0 |
daemon_signal(int signo)
{
int tmperr = errno; /* Save errno for later */
pid_t pid;
int i, status;
CLIENT *clp;
#if defined(HAVE_WAITPID)
while ((pid = waitpid(-1, &status, WNOHANG)) > 0)
#elif defined(HAVE_WAIT3)
while ((pid = wait3(&status, WNOHANG, NULL)) > 0)
#else
if ((pid = wait(&status)) > 0)
#endif
{... | false | false | false | false | false | 0 |
setTime(int value)
{
QChar zero = QLatin1Char ( '0' );
QString time = QString("%1:%2:%3").arg(value/3600,2,10,zero)
.arg(value%3600/60,2,10,zero)
.arg(value%60,2,10,zero);
timeLabel->setText(time);
scatterPlot->showTime(&s... | false | false | false | false | false | 0 |
cmd_show_c3600_list(registry_entry_t *entry,void *opt,int *err)
{
hypervisor_conn_t *conn = opt;
vm_instance_t *vm = entry->data;
if (vm->platform == conn->cur_module->opt)
hypervisor_send_reply(conn,HSC_INFO_MSG,0,"%s",entry->name);
} | false | false | false | false | false | 0 |
amdgpu_uvd_send_msg(struct amdgpu_ring *ring,
struct amdgpu_bo *bo,
struct fence **fence)
{
struct ttm_validate_buffer tv;
struct ww_acquire_ctx ticket;
struct list_head head;
struct amdgpu_ib *ib = NULL;
struct fence *f = NULL;
struct amdgpu_device *adev = ring->adev;
uint64_t addr;
int i, ... | false | false | false | false | false | 0 |
matchesCertificate(SiCertificate& cert)
{
X509 *x509 = cert.getRawCertificate();
if ((x509 == NULL)||(pkey == NULL)) return OFFalse;
if (X509_check_private_key(x509, pkey)) return OFTrue;
return OFFalse;
} | false | false | false | false | false | 0 |
nextToken (statementInfo *const st)
{
tokenInfo *token;
do
{
int c = skipToNonWhite ();
switch (c)
{
case EOF: longjmp (Exception, (int) ExceptionEOF); break;
/* analyze functions and co */
case '(': analyzeParens (st); break;
case '<': processAngleBracket (); break;
case... | false | false | false | false | false | 0 |
gen_split_3449 (rtx curr_insn ATTRIBUTE_UNUSED, rtx *operands)
{
rtx operand0;
rtx operand1;
rtx _val = 0;
start_sequence ();
#line 11620 "../../src/gcc/config/i386/sse.md"
{
rtx op0 = operands[0], op1 = operands[1];
int elt = INTVAL (operands[3]);
if (REG_P (op1))
{
int mask;
/* Shuffle... | false | false | false | false | false | 0 |
cm_tdbusm_set_sasasasnas(DBusMessage *msg, const char *s,
const char **as1, const char **as2,
const char **as3, long n, const char **as4)
{
int64_t i = n;
if (s == NULL) {
s = empty_string;
}
if (as1 == NULL) {
as1 = empty_string_array;
}
if (as2 == NULL) {
as2 = empty_string_array;
}
if (as3 == N... | false | false | false | false | false | 0 |
handle_spreadsheet_params (const char *rem, CMD *cmd)
{
int err = 0;
if (cmd->opt & OPT_O) {
/* odbc: spreadsheet-specific options not acceptable */
err = incompatible_options(cmd->opt, OPT_O | OPT_C |
OPT_R | OPT_S);
} else if (cmd->opt & OPT_W) {
/* web database: ditto */
err = incompatible_op... | false | false | false | false | false | 0 |
NChead(CHANNEL *cp)
{
TOKEN token;
ARTHANDLE *art;
char *buff = NULL;
cp->Start = cp->Next;
/* No argument given, or an article number. */
if (cp->ac == 1 || IsValidArticleNumber(cp->av[1])) {
xasprintf(&buff, "%d Not in a newsgroup", NNTP_FAIL_NO_GROUP);
NCwri... | false | false | false | false | false | 0 |
wrap_shmctl(int shmid, int cmd, struct shmid_ds *data)
{
if (shmctl(shmid, cmd, data) >= 0)
return 0;
if (errno == EACCES || errno == EPERM)
{
/*
* Note that shmctl(IPC_STAT) requires read permission, so if we
* get EACCES that means we know we have no read permission, but
... | false | false | false | false | false | 0 |
_equal_to(v0, v1)
point_t *v0;
point_t *v1;
{
return (FP_EQUAL(v0->y, v1->y) && FP_EQUAL(v0->x, v1->x));
} | false | false | false | false | false | 0 |
AddButton(ButtonArray *array, char *title, int up)
{
Button *new;
new=(Button *)safemalloc(sizeof(Button));
new->title=safemalloc(strlen(title)+1);
strcpy(new->title,title);
new->up=up;
new->tw=XTextWidth(ButtonFont,title,strlen(title));
new->next=NULL;
new->needsupdate=1;
if (array->head==NULL) array-... | false | false | false | false | false | 0 |
resLookup(struct SResource* res, const char* key){
struct SResource *current = NULL;
struct SResTable *list;
if (res == res_none()) {
return NULL;
}
list = &(res->u.fTable);
current = list->fFirst;
while (current != NULL) {
if (uprv_strcmp(((list->fRoot->fKeys) + (current->... | false | false | false | false | false | 0 |
ComputeShape(register Shape* box) {
register BoxElement* e;
register Shape* s;
register int hmin, hmax;
box->width = 0;
box->height = 0;
box->Rigid(hfil, hfil, 0, 0);
hmin = -hfil;
hmax = hfil;
for (e = Head(); e != nil; e = e->next) {
s = e->child->GetShape();
box->width = Math::... | false | false | false | false | false | 0 |
ebml_parse_nest(MatroskaDemuxContext *matroska, EbmlSyntax *syntax,
void *data)
{
int i, res = 0;
for (i=0; syntax[i].id; i++)
switch (syntax[i].type) {
case EBML_UINT:
*(uint64_t *)((char *)data+syntax[i].data_offset) = syntax[i].def.u;
break;... | false | false | false | false | false | 0 |
default_baseband_attenuation(struct b43_wldev *dev,
struct b43_bbatt *bb)
{
struct b43_phy *phy = &dev->phy;
if (phy->radio_ver == 0x2050 && phy->radio_rev < 6)
bb->att = 0;
else
bb->att = 2;
} | false | false | false | false | false | 0 |
testrealloc(void* p,yy_size_t n)
{
int i;
for (i=0; i < arrsz; i++)
if ( ptrs[i].p == p){
total_mem -= ptrs[i].sz;
total_mem += n;
ptrs[i].p = (void*)realloc(p,n);
ptrs[i].sz = n;
printf("yyflex_realloc(%#10lx,%8ld) total=%8ld return=%8lx\n",
... | false | false | false | false | false | 0 |
ldm_setup_plugin() {
log_entry("ldm",7,"setting up plugin: %s", current_plugin);
LdmBackend *desc = (LdmBackend*) g_tree_lookup(plugin_list, current_plugin);
if(desc->init_cb)
desc->init_cb();
} | false | false | false | false | false | 0 |
push(UndoElement const & v) {
c_.push_front(v);
if (c_.size() > limit_) {
// remove a whole group at once.
const size_t gid = c_.back().group_id;
while (!c_.empty() && c_.back().group_id == gid)
c_.pop_back();
}
} | false | false | false | false | false | 0 |
ColorConflict(Renderer* r, const yy::location& w)
{
if (r)
r->colorConflict(w);
else
CfdgError::Warning(w, "Conflicting color change");
} | false | false | false | false | false | 0 |
vsp1_entity_is_streaming(struct vsp1_entity *entity)
{
unsigned long flags;
bool streaming;
spin_lock_irqsave(&entity->lock, flags);
streaming = entity->streaming;
spin_unlock_irqrestore(&entity->lock, flags);
return streaming;
} | false | false | false | false | false | 0 |
gcisblocked(void) {
assert(gcblocked >= 0);
return gcblocked != 0;
} | false | false | false | false | false | 0 |
in_irq_stack(unsigned long *stack, unsigned long *irq_stack,
unsigned long *irq_stack_end)
{
return (stack >= irq_stack && stack < irq_stack_end);
} | false | false | false | false | false | 0 |
install_sighandler(int signum,void (*handler) (int))
{
struct sigaction act;
memset(&act,0,sizeof(struct sigaction));
act.sa_handler=handler;
sigemptyset(&act.sa_mask);
act.sa_flags=SA_RESTART|SA_NOCLDSTOP;
if (sigaction(signum,&act,NULL)!=0)
{
log_log(LOG_ERR,"error installing signal handler for '%s'... | false | false | false | false | false | 0 |
io_reserve_memtype(resource_size_t start, resource_size_t end,
enum page_cache_mode *type)
{
resource_size_t size = end - start;
enum page_cache_mode req_type = *type;
enum page_cache_mode new_type;
int ret;
WARN_ON_ONCE(iomem_map_sanity_check(start, size));
ret = reserve_memtype(start, end, req_type, &new_t... | false | false | false | false | false | 0 |
delete_one_address_conf(const char *address, struct ConfItem *aconf)
{
int masktype, bits;
uint32_t hv;
struct AddressRec *arec, *arecl = NULL;
struct rb_sockaddr_storage addr;
masktype = parse_netmask(address, (struct sockaddr *)&addr, &bits);
#ifdef RB_IPV6
if(masktype == HM_IPV6)
{
/* We have to do this, si... | false | false | false | false | false | 0 |
MV_SetReverb
(
int reverb
)
{
MV_ReverbLevel = MIX_VOLUME( reverb );
MV_ReverbTable = &MV_VolumeTable[ MV_ReverbLevel ];
} | false | false | false | false | false | 0 |
decode_channel_map(enum ChannelPosition *cpe_map,
enum ChannelPosition *sce_map, enum ChannelPosition type, GetBitContext * gb, int n) {
while(n--) {
enum ChannelPosition *map = cpe_map && get_bits1(gb) ? cpe_map : sce_map; // stereo or mono map
map[get_bits(gb, 4)] = type;
}
} | false | false | false | false | false | 0 |
run_io_fg(const char **argv, const char *dir)
{
struct io io = {};
init_io(&io, dir, IO_FG);
if (!format_argv(io.argv, argv, FORMAT_NONE))
return FALSE;
return run_io_do(&io);
} | false | false | false | false | false | 0 |
handle_player_diplstate(const struct packet_player_diplstate *packet)
{
struct player *plr1 = player_by_number(packet->plr1);
struct player *plr2 = player_by_number(packet->plr2);
struct player *my_player = client_player();
struct player_diplstate *ds = player_diplstate_get(plr1, plr2);
bool need_players_dial... | false | false | false | false | false | 0 |
create_tunnel(struct l2tp_parm *p)
{
uint32_t local_attr = L2TP_ATTR_IP_SADDR;
uint32_t peer_attr = L2TP_ATTR_IP_DADDR;
GENL_REQUEST(req, 1024, genl_family, 0, L2TP_GENL_VERSION,
L2TP_CMD_TUNNEL_CREATE, NLM_F_REQUEST | NLM_F_ACK);
addattr32(&req.n, 1024, L2TP_ATTR_CONN_ID, p->tunnel_id);
addattr32(&req.n,... | false | false | false | false | false | 0 |
GetTimeValues()
{
if (this->Readers->GetNumberOfItems() <= 0)
{
return NULL;
}
vtkOpenFOAMReaderPrivate *reader =
vtkOpenFOAMReaderPrivate::SafeDownCast(this->Readers->GetItemAsObject(0));
return reader != NULL ? reader->GetTimeValues() : NULL;
} | false | false | false | false | false | 0 |
flashPitData(BridgeManager *bridgeManager, const PitData *pitData)
{
Interface::Print("Uploading PIT\n");
if (bridgeManager->SendPitData(pitData))
{
Interface::Print("PIT upload successful\n\n");
return (true);
}
else
{
Interface::PrintError("PIT upload failed!\n\n");
return (false);
}
} | false | false | false | false | false | 0 |
layout_lua_get_height(lua_State *L)
{
GtLayout **layout;
GtError *err;
int had_err = 0;
unsigned long height;
layout = check_layout(L, 1);
err = gt_error_new();
had_err = gt_layout_get_height(*layout, &height, err);
lua_pushnumber(L, height);
if (had_err < 0)
return gt_lua_error(L, err);
gt_erro... | false | false | false | false | false | 0 |
scintilla_modified (GtkWidget *scintilla, gpointer user_data)
{
Document_Scintilla *doc = DOCUMENT_SCINTILLA(user_data);
g_return_if_fail(doc);
GtkScintilla *sci = GTK_SCINTILLA(scintilla);
gint current_pos = gtk_scintilla_get_current_pos(sci);
g_signal_emit (G_OBJECT (doc), signals[POS_CHANGED], 0, gtk_scint... | false | false | false | false | false | 0 |
EndWindowLevel()
{
if (this->State != VTKIS_WINDOW_LEVEL)
{
return;
}
if (this->HandleObservers)
{
this->InvokeEvent(vtkCommand::EndWindowLevelEvent, this);
}
this->StopState();
} | false | false | false | false | false | 0 |
DeleteInstructionInBlock(BasicBlock *BB) {
DEBUG(dbgs() << " BasicBlock Dead:" << *BB);
++NumDeadBlocks;
// Delete the instructions backwards, as it has a reduced likelihood of
// having to update as many def-use and use-def chains.
while (!isa<TerminatorInst>(BB->begin())) {
Instruction *I = --BasicB... | false | false | false | false | false | 0 |
ipa_clone_references (struct cgraph_node *dest_node,
struct varpool_node *dest_varpool_node,
struct ipa_ref_list *src)
{
struct ipa_ref *ref;
int i;
for (i = 0; ipa_ref_list_reference_iterate (src, i, ref); i++)
ipa_record_reference (dest_node, dest_varpool_node,
ref->refered_type == IPA_... | false | false | false | false | false | 0 |
tab_completion_popup_pos_cb(GtkMenu *menu, gint *x, gint *y, gboolean *push_in, gpointer data)
{
TabCompData *td = data;
gint height;
PangoLayout *layout;
PangoRectangle strong_pos, weak_pos;
gint length;
gint xoffset, yoffset;
GtkRequisition req;
GdkScreen *screen;
gint monitor_num;
GdkRectangle monitor;
g... | false | false | false | false | false | 0 |
ICountFloats(unsigned int vertsLeft, const unsigned char* src,
float quant, unsigned int stride, float& lo,
bool& allSame, unsigned short& count) {
lo = floor(((*(float*)src) * quant) + 0.5f) / quant;
float hi = lo;
allSame = false;
unsigned ... | false | false | false | false | false | 0 |
print_double(FILE *inptr,unsigned long count,unsigned short byteorder,
unsigned long offset)
{
int i,j;
double data;
int chpr = 0;
if(count)
{
data = read_double(inptr,byteorder,offset);
if(feof(inptr) || ferror(inptr))
{
clearerr(inptr);
... | false | false | false | false | false | 0 |
gar_free_node(struct node *n)
{
if (n->arcs)
free(n->arcs);
if (n->cpoint)
gar_put_cpoint(n->cpoint);
list_remove_init(&n->l);
list_remove_init(&n->lc);
free(n);
} | false | false | false | false | false | 0 |
enqueue_super(struct layer2 *l2, struct sk_buff *skb)
{
if (l2down(l2, PH_DATA_REQ, l2_newid(l2), skb))
dev_kfree_skb(skb);
} | false | false | false | false | false | 0 |
gotdata(void *vctx, const char *pathname, const STRUCT_STAT *st)
{
struct ctx *ctx = (struct ctx *)vctx;
struct trie_file file;
time_t t;
int i, include;
const char *filename;
/*
* Filter out our own data file.
*/
if (st->st_dev == ctx->datafile_dev && st->st_ino == ctx->datafile_... | false | false | false | false | false | 0 |
test_octet_string_set_as_bytes (void)
{
GBytes *bytes;
GNode *asn;
asn = egg_asn1x_create (test_asn1_tab, "TestOctetString");
g_assert (asn != NULL);
bytes = g_bytes_new_static ("farnsworth", 10);
egg_asn1x_set_string_as_bytes (asn, bytes);
g_bytes_unref (bytes);
bytes = egg_asn1x_encode (asn, NULL);
g_asse... | false | false | false | false | false | 0 |
_grid_place(Elm_Map_Smart_Data *sd)
{
Eina_List *l;
Grid *g;
EINA_SAFETY_ON_NULL_RETURN(sd);
EINA_LIST_FOREACH (sd->grids, l, g)
{
if (sd->zoom == g->zoom) _grid_load(g);
else _grid_unload(g);
}
if (!sd->download_idler)
sd->download_idler = ecore_idler_add(_download_job, ... | false | false | false | false | false | 0 |
CalculateIndexwidth(struct FemType *data,int indxis,int *indx)
{
int i,ind,nonodes,indexwidth;
int imax,imin,element;
/* Calculate the maximum bandwidth */
indexwidth = 0;
for(element=1; element <= data->noelements; element++) {
imin = data->noknots;
imax = 0;
nonodes = data->elementtypes[ele... | false | false | false | false | false | 0 |
smb347_battery_get_property(struct power_supply *psy,
enum power_supply_property prop,
union power_supply_propval *val)
{
struct smb347_charger *smb = power_supply_get_drvdata(psy);
const struct smb347_charger_platform_data *pdata = smb->pdata;
int ret;
ret = smb347_update_ps_status(smb);
if... | false | false | false | false | false | 0 |
mono_ldstr_metadata_sig (MonoDomain *domain, const char* sig)
{
const char *str = sig;
MonoString *o, *interned;
size_t len2;
len2 = mono_metadata_decode_blob_size (str, &str);
len2 >>= 1;
o = mono_string_new_utf16 (domain, (guint16*)str, len2);
#if G_BYTE_ORDER != G_LITTLE_ENDIAN
{
int i;
guint16 *p2 = (g... | false | false | false | false | false | 0 |
gdata_documents_service_get_upload_uri (GDataDocumentsFolder *folder)
{
g_return_val_if_fail (folder == NULL || GDATA_IS_DOCUMENTS_FOLDER (folder), NULL);
return _get_upload_uri_for_query_and_folder (NULL, folder);
} | false | false | false | false | false | 0 |
ucnvsel_next_encoding(UEnumeration* enumerator,
int32_t* resultLength,
UErrorCode* status) {
// check if already failed
if (U_FAILURE(*status)) {
return NULL;
}
int16_t cur = ((Enumerator*)(enumerator->context... | 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.