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 |
|---|---|---|---|---|---|---|
data_hub_main (gchar** args, int args_length1) {
gint result = 0;
DataHub* hub = NULL;
DataHub* _tmp0_ = NULL;
gint _tmp6_ = 0;
GError * _inner_error_ = NULL;
g_set_prgname ("zeitgeist-datahub");
_tmp0_ = data_hub_new ();
hub = _tmp0_;
{
data_hub_run (hub, &_inner_error_);
if (_inner_error_ != NULL) {
g... | false | false | false | false | false | 0 |
musb_alloc_request(struct usb_ep *ep, gfp_t gfp_flags)
{
struct musb_ep *musb_ep = to_musb_ep(ep);
struct musb *musb = musb_ep->musb;
struct musb_request *request = NULL;
request = kzalloc(sizeof *request, gfp_flags);
if (!request) {
dev_dbg(musb->controller, "not enough memory\n");
return NULL;
}
reques... | false | false | false | false | false | 0 |
prune_tmp_object(const char *path, const char *filename)
{
const char *fullpath = mkpath("%s/%s", path, filename);
struct stat st;
if (lstat(fullpath, &st))
return error("Could not stat '%s'", fullpath);
if (st.st_mtime > expire)
return 0;
printf("Removing stale temporary file %s\n", fullpath);
if (!show_only... | false | false | false | false | false | 0 |
totem_plugin_write_ready (NPP instance,
NPStream *stream)
{
if (!instance)
return -1;
totemPlugin *plugin = reinterpret_cast<totemPlugin*> (instance->pdata);
if (!plugin)
return -1;
return plugin->WriteReady (stream);
} | false | false | false | false | false | 0 |
ADDON_Destroy()
{
XVDR::MutexLock lock(&addonMutex);
delete mClient;
mClient = NULL;
ADDON_Cleanup();
} | false | false | false | false | false | 0 |
variable_position_write (GtsObject * o, FILE * fp)
{
GfsVariablePosition * v = GFS_VARIABLE_POSITION (o);
(* GTS_OBJECT_CLASS (gfs_variable_position_class ())->parent_class->write) (o, fp);
fprintf (fp, " %s", v->c == FTT_X ? "x" : v->c == FTT_Y ? "y" : "z");
if (v->ref != 0.)
fprintf (fp, " %g", v->ref);... | false | false | false | false | false | 0 |
init()
{
#ifdef HAVE_MOD_DB_MYSQL
addModule(new db::MysqlModule);
#endif
#ifdef HAVE_MOD_DB_SQLITE3
addModule(new db::SQLite3Module);
#endif
} | false | false | false | false | false | 0 |
amdlibMergeP2vmFromFiles(const int nbFiles,
const char **p2vmFile,
const char *outputFile)
{
static amdlibP2VM_MATRIX p2vm1;
static amdlibP2VM_MATRIX p2vm2;
static amdlibP2VM_MATRIX p2vmRes;
amdlibERROR_MSG ... | false | false | false | false | false | 0 |
name_length(const unsigned char *encoded, const unsigned char *abuf,
int alen)
{
int n = 0, offset, indir = 0;
/* Allow the caller to pass us abuf + alen and have us check for it. */
if (encoded == abuf + alen)
return -1;
while (*encoded)
{
if ((*encoded & INDIR_MASK) == I... | false | false | false | false | false | 0 |
propagate_tree_value (tree *op_p, tree val)
{
gcc_checking_assert (!(TREE_CODE (val) == SSA_NAME
&& *op_p
&& TREE_CODE (*op_p) == SSA_NAME
&& !may_propagate_copy (*op_p, val)));
if (TREE_CODE (val) == SSA_NAME)
*op_p = val;
else
*op_p = unsave_expr_now (val);
} | false | false | false | false | false | 0 |
gst_queue2_chain_list (GstPad * pad, GstBufferList * buffer_list)
{
GstQueue2 *queue;
queue = GST_QUEUE2 (GST_OBJECT_PARENT (pad));
GST_CAT_LOG_OBJECT (queue_dataflow, queue,
"received buffer list %p", buffer_list);
return gst_queue2_chain_buffer_or_buffer_list (queue,
GST_MINI_OBJECT_CAST (buffe... | false | false | false | false | false | 0 |
analyze_ziv_subscript (tree chrec_a,
tree chrec_b,
conflict_function **overlaps_a,
conflict_function **overlaps_b,
tree *last_conflicts)
{
tree type, difference;
dependence_stats.num_ziv++;
if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, "(analyze_ziv_subs... | false | false | false | false | false | 0 |
word_at_point(char *text, int point)
{
int front = point;
int back = point;
char * ret;// = (char*)malloc(back-front+1);
if (text[point] == ' ')
return " ";
while (text[front] != ' ' && front >= 0) {
front--;
}
front++;
while (text[back] != ' ' && text[back] != '\0') {
back++;
}
back--;
ret = (char... | false | false | false | false | false | 0 |
fdsclr(register fd_set *p,register int fd)
{ if ((p!=(fd_set *)(0))&&(fd>=0)&&(fd<size())) FD_CLR(fd,p); } | false | false | false | false | false | 0 |
clear()
{
CallMessage empty;
_msg = empty;
} | false | false | false | false | false | 0 |
tell_binds(int idx, char *par)
{
tcl_bind_list_t *tl, *tl_kind;
tcl_bind_mask_t *tm;
int fnd = 0, showall = 0, patmatc = 0;
tcl_cmd_t *tc;
char *name, *proc, *s, flg[100];
if (par[0])
name = newsplit(&par);
else
name = NULL;
if (par[0])
s = newsplit(&par);
else
s = NULL;
if (name)
... | true | true | false | false | false | 1 |
main(int argc, char* argv[])
{
// set the Ctrl+C handler
signal(SIGINT, sigproc);
// get the command line arguments
int port_num = 1441;
for (int i = 1; i < argc-1; i++)
{
if (string(argv[i]) == "-p")
port_num = from_string<int>(argv[i+1]);
}
// seed the random numb... | false | false | false | false | false | 0 |
model_promote_insn (struct model_insn_info *insn)
{
struct model_insn_info *prev;
int count;
prev = insn->prev;
count = MAX_SCHED_READY_INSNS;
while (count > 0 && prev && model_order_p (insn, prev))
{
count--;
prev = prev->prev;
}
if (prev != insn->prev)
{
model_remove_from_wo... | false | false | false | false | false | 0 |
crypto_inc_byte(u8 *a, unsigned int size)
{
u8 *b = (a + size);
u8 c;
for (; size; size--) {
c = *--b + 1;
*b = c;
if (c)
break;
}
} | false | false | false | false | false | 0 |
silver_chimera_spread_draw(tenm_object *my, int priority)
{
int status = 0;
tenm_color color;
int r = 1;
/* sanity check */
if (my == NULL)
{
fprintf(stderr, "silver_chimera_spread_draw: my is NULL\n");
return 0;
}
if ((priority == 0) && (my->count[1] == 0))
{
color = tenm_map_color(99, ... | false | false | false | false | false | 0 |
hso_serial_set_termios(struct tty_struct *tty, struct ktermios *old)
{
struct hso_serial *serial = tty->driver_data;
unsigned long flags;
if (old)
D5("Termios called with: cflags new[%d] - old[%d]",
tty->termios.c_cflag, old->c_cflag);
/* the actual setup */
spin_lock_irqsave(&serial->serial_lock, flags);... | false | false | false | false | false | 0 |
mwifiex_recv_packet(struct mwifiex_private *priv, struct sk_buff *skb)
{
struct mwifiex_sta_node *src_node;
struct ethhdr *p_ethhdr;
if (!skb)
return -1;
priv->stats.rx_bytes += skb->len;
priv->stats.rx_packets++;
if (GET_BSS_ROLE(priv) == MWIFIEX_BSS_ROLE_UAP) {
p_ethhdr = (void *)skb->data;
src_node = ... | false | false | false | false | false | 0 |
add_text_tag_v4 (GstId3v2Tag * id3v2tag, const GstTagList * list,
const gchar * tag, guint num_tags, const gchar * frame_id)
{
if (id3v2tag->major_version == 4)
add_text_tag (id3v2tag, list, tag, num_tags, frame_id);
else {
GST_WARNING ("Cannot serialise tag '%s' in ID3v2.%d", frame_id,
id3v2tag... | false | false | false | false | false | 0 |
_dbus_free_smartphone_data_world_sync_get_all_countries (FreeSmartphoneDataWorldSync* self, GVariant* parameters, GDBusMethodInvocation* invocation) {
GError* error = NULL;
GVariantIter _arguments_iter;
GDBusMessage* _reply_message;
GVariant* _reply;
GVariantBuilder _reply_builder;
FreeSmartphoneDataWorldCountry*... | false | false | false | false | false | 0 |
lis3lv02d_add_fs(struct lis3lv02d *lis3)
{
lis3->pdev = platform_device_register_simple(DRIVER_NAME, -1, NULL, 0);
if (IS_ERR(lis3->pdev))
return PTR_ERR(lis3->pdev);
platform_set_drvdata(lis3->pdev, lis3);
return sysfs_create_group(&lis3->pdev->dev.kobj, &lis3lv02d_attribute_group);
} | false | false | false | false | false | 0 |
wd719x_direct_cmd(struct wd719x *wd, u8 opcode, u8 dev, u8 lun,
u8 tag, dma_addr_t data, int timeout)
{
int ret = 0;
/* clear interrupt status register (allow command register to clear) */
wd719x_writeb(wd, WD719X_AMR_INT_STATUS, WD719X_INT_NONE);
/* Wait for the Command register to become free */
if (wd... | false | false | false | false | false | 0 |
date_picker_connect_signals (DateCell *cell)
{
PopBox *box = cell->cell.gui_private;
if (box->signals_connected)
return;
g_signal_connect (box->date_picker, "date_selected",
G_CALLBACK(date_selected_cb), cell);
g_signal_connect(box->date_picker, "date_picked",
... | false | false | false | false | false | 0 |
release_group(struct mcast_group *group)
{
struct mcast_port *port = group->port;
unsigned long flags;
spin_lock_irqsave(&port->lock, flags);
if (atomic_dec_and_test(&group->refcount)) {
rb_erase(&group->node, &port->table);
spin_unlock_irqrestore(&port->lock, flags);
kfree(group);
deref_port(port);
} els... | false | false | false | false | false | 0 |
ast_tone_detect_init(tone_detect_state_t *s, int freq, int duration, int amp, unsigned int sample_rate)
{
int duration_samples;
float x;
int periods_in_block;
s->freq = freq;
/* Desired tone duration in samples */
duration_samples = duration * sample_rate / 1000;
/* We want to allow 10% deviation of tone durat... | false | false | false | false | false | 0 |
CommandIsReadOnly(Node *parsetree)
{
if (IsA(parsetree, PlannedStmt))
{
PlannedStmt *stmt = (PlannedStmt *) parsetree;
switch (stmt->commandType)
{
case CMD_SELECT:
if (stmt->rowMarks != NIL)
return false; /* SELECT FOR [KEY] UPDATE/SHARE */
else if (stmt->hasModifyingCTE)
return false; ... | false | false | false | false | false | 0 |
push_integer(int32_t n)
{
if (n > 65535 || n < -32768)
{
printf("Error: literal value %d bigger than 16 bit.\n", n);
return -1;
}
uint16_t value = (n & 0xffff);
fprintf(out, " ;; push_integer(%d)\n", n);
fprintf(out, " ld hl, 0x%04x\n", value);
fprintf(out, " push hl\n");
stack++;
return... | false | false | false | false | false | 0 |
on_configure_restore()
{
DatabaseSelectDlg dlg(m_dbdb, m_restoreList, m_autoSelectAll,
_("Select the device databases you wish to recover. This selection acts like a filter, in that only the databases you select here will be restored, even if more exist in the backup data."), false);
if( dlg.run() == Gtk::RESPONSE... | false | false | false | false | false | 0 |
createNonce()
{
Poco::FastMutex::ScopedLock lock(_nonceMutex);
MD5Engine md5;
Timestamp::TimeVal now = Timestamp().epochMicroseconds();
md5.update(&_nonceCounter, sizeof(_nonceCounter));
md5.update(&now, sizeof(now));
++_nonceCounter;
return DigestEngine::digestToHex(md5.digest());
} | false | false | false | false | false | 0 |
explorer_strdup_quality (Explorer *self)
{
gdouble q = histogram_imager_compute_quality(HISTOGRAM_IMAGER(self->map));
if (q > (G_MAXDOUBLE / 2))
return g_strdup("N/A");
else
return g_strdup_printf("%.3f", q);
} | false | false | false | false | false | 0 |
ntfs_attr_put_search_ctx(ntfs_attr_search_ctx *ctx)
{
if (ctx->base_ntfs_ino && ctx->ntfs_ino != ctx->base_ntfs_ino)
unmap_extent_mft_record(ctx->ntfs_ino);
kmem_cache_free(ntfs_attr_ctx_cache, ctx);
return;
} | false | false | false | false | false | 0 |
fq_to_s(Query *self, Symbol default_field)
{
FilteredQuery *fq = FQQ(self);
char *filter_str = fq->filter->to_s(fq->filter);
char *query_str = fq->query->to_s(fq->query, default_field);
char *buffer;
if (self->boost == 1.0) {
buffer = strfmt("FilteredQuery(query:%s, filter:%s)",
... | false | false | false | false | false | 0 |
encode_halftone (Mustek_Scanner * s)
{
SANE_String selection = s->val[OPT_HALFTONE_DIMENSION].s;
SANE_Int i = 0;
while ((halftone_list[i] != 0) && (strcmp (selection, halftone_list[i]) != 0))
{
i++;
}
if (halftone_list[i] == 0)
return SANE_STATUS_INVAL;
if (i < 0x0c) /* standard pattern ... | false | false | false | false | false | 0 |
json_target_address(const struct json_attr_t *cursor,
/*@null@*/
const struct json_array_t
*parent, int offset)
{
char *targetaddr = NULL;
if (parent == NULL || parent->element_type != t_structobject) {
/* ordinary case - use the address in the cursor structure */
switch (cursor-... | false | false | false | false | false | 0 |
noop_io_until_death(void)
{
char buf[1024];
if (!iobuf.in.buf || !iobuf.out.buf || iobuf.in_fd < 0 || iobuf.out_fd < 0 || kluge_around_eof)
return;
kluge_around_eof = 2;
/* Setting an I/O timeout ensures that if something inexplicably weird
* happens, we won't hang around forever. */
if (!io_timeout)
set_i... | false | false | false | false | false | 0 |
sampxy_table_init()
{
int i, j;
j = dot_hsize;
for(i=0; i<dots_width; i++) {
sampx[i] = j; //* m_xsize;
j += dot_size;
}
j = dot_hsize;
for(i=0; i<dots_height; i++) {
sampy[i] = j;// * m_ysize / screen_height;
j += dot_size;
}
} | false | false | false | false | false | 0 |
nexusParseUnaligned(AjPNexus thys, AjPList list)
{
AjPStr command = NULL;
AjPStr cmdstr = NULL;
if (!nexusDimExp1)
nexusDimExp1 = ajRegCompCaseC("\\bnewtaxa\\b");
if (!nexusDimExp2)
nexusDimExp2 = ajRegCompCaseC("\\bntax\\s*=\\s*(\\d+)");
if (!nexusFormExp1)
nexusFormExp1 = ajRegCompCaseC("\\bda... | false | false | false | false | false | 0 |
gsl_complex_arctanh_real (double a)
{ /* z = arctanh(a) */
gsl_complex z;
if (a > -1.0 && a < 1.0)
{
GSL_SET_COMPLEX (&z, atanh (a), 0);
}
else
{
GSL_SET_COMPLEX (&z, atanh (1 / a), (a < 0) ? M_PI_2 : -M_PI_2);
}
return z;
} | false | false | false | false | false | 0 |
getrms ( const Real Crd[MAX_ATOMS][SPACE],
const Real CrdRef[MAX_ATOMS][SPACE],
const Boole B_symmetry_flag,
const Boole B_unique_pair_flag,
const int natom,
const int type[MAX_ATOMS],
const Boole B_rms_heavy_atoms_only,
... | false | false | false | false | false | 0 |
vpc_free(struct page_cache *pc, size_t idx)
{
void *p;
g_assert(size_is_non_negative(idx) && idx < pc->current);
g_assert(spinlock_is_held(&pc->lock));
p = pc->info[idx].base;
vpc_remove_at(pc, p, idx);
free_pages_forced(p, pc->chunksize, FALSE);
} | false | false | false | false | false | 0 |
wait_for_jobs_to_finish (gpointer user_data)
{
CancelData *cancel_data = user_data;
if (cancel_data->file_list->priv->jobs == NULL) {
if (cancel_data->check_id != 0) {
g_source_remove (cancel_data->check_id);
cancel_data->check_id = 0;
}
cancel_data->file_list->priv->cancelling = FALSE;
if (cancel_data... | false | false | false | false | false | 0 |
pattern_add_color_stops(const GradientFill& f, cairo_pattern_t* pattern,
const SWFCxForm& cx)
{
for (size_t index = 0; index < f.recordCount(); ++index) {
const GradientRecord& grad = f.record(index);
rgba c = cx.transform(grad.color);
cairo_pattern_ad... | false | false | false | false | false | 0 |
export_sign_public_key_ecc(
uint32_t index,
ECCrefPublicKey *key)
{
KEYINFO info;
int result = get_key(TYPE_SIGN_PUB<<16|TYPE_ECC_PUB, index, &info);
print_keyinfo(info);
if(result>0)
{
memcpy(key,&info.data.ecc_puk,sizeof(*key));
}
return result;
} | false | true | false | false | false | 1 |
telephone() const throw(GsmException)
{
return _telephone;
} | false | false | false | false | false | 0 |
xml_read_key (xmlNodePtr current_node, xmlDocPtr doc, char *step,
int *line)
{
xmlChar *step_temp;
xmlChar *temp;
while (current_node)
{
if (!xmlStrcmp (current_node->name, (const xmlChar *) "step"))
{
step_temp = xmlNodeListGetString
(doc, current_node->xmlChildrenNode, 1);
*step = ((... | true | true | false | false | true | 1 |
zend_do_foreach_begin(znode *foreach_token, znode *open_brackets_token, znode *array, znode *as_token, int variable TSRMLS_DC) /* {{{ */
{
zend_op *opline;
zend_bool is_variable;
zend_bool push_container = 0;
zend_op dummy_opline;
if (variable) {
if (zend_is_function_or_method_call(array)) {
is_variable = 0;... | false | false | false | false | false | 0 |
close_output_file(pTHX) {
int result;
NV timeofday;
if (!out)
return;
timeofday = gettimeofday_nv(); /* before write_*() calls */
NYTP_write_attribute_nv(out, STR_WITH_LEN("cumulative_overhead_ticks"), cumulative_overhead_ticks);
write_src_of_files(aTHX);
write_sub_line_ranges(aT... | false | false | false | false | false | 0 |
get_acl_file_list(Vfs_handle *h, Acl_file ***af)
{
int i, n;
Dsvec *acls;
if ((acls = get_acls(h)) == NULL)
return(-1);
n = dsvec_len(acls);
if (af != NULL) {
if (n > 0)
*af = (Acl_file **) dsvec_base(acls);
else
*af = NULL;
}
log_msg((LOG_TRACE_LEVEL, "ACLs found: %d", n));
for ... | false | false | false | false | false | 0 |
hash_add_unique(struct hash *hash, const char *key, const void *value)
{
unsigned int keylen = strlen(key);
unsigned int hashval = hash_superfast(key, keylen);
unsigned int pos = hashval % hash->n_buckets;
struct hash_bucket *bucket = hash->buckets + pos;
struct hash_entry *entry, *entry_end;
if (bucket->used + ... | false | false | false | false | false | 0 |
mbfl_buffer_illegalchars(mbfl_buffer_converter *convd)
{
int num_illegalchars = 0;
if (convd == NULL) {
return 0;
}
if (convd->filter1 != NULL) {
num_illegalchars += convd->filter1->num_illegalchar;
}
if (convd->filter2 != NULL) {
num_illegalchars += convd->filter2->num_illegalchar;
}
return (num_ille... | false | false | false | false | false | 0 |
Crossfire_Object_Split(Crossfire_Object *who, PyObject *args) {
int count;
char err[255];
object *split;
err[0] = '\0'; /* Just in case. */
if (!PyArg_ParseTuple(args, "i", &count))
return NULL;
split = cf_object_split(who->obj, count, err, 255);
if (split == NULL)
{
... | false | false | false | false | false | 0 |
eof(void) const
{
if (getAccessMode() & WRITE)
return mTmpWriteStream->eof();
else
{
if (!mIsCompressedValid)
return mCompressedStream->eof();
else
return mCompressedStream->eof() && mZStream->avail_in == 0;
}
} | false | false | false | false | false | 0 |
multiple_align_menu()
{
while(TRUE)
{
fprintf(stdout,"\n\n\n");
fprintf(stdout,"******Multiple*Alignment*Menu******\n");
fprintf(stdout,"\n\n");
fprintf(stdout," 1. Do complete multiple alignment now\n");
fprintf(stdout," 2. Produce dendrogram file only\n");
... | false | false | false | false | false | 0 |
diff_list_fixed( list_t* list, bool print_diff ) {
list_metadata* data_original = NULL;
list_metadata* data_updated = NULL;
list_iterator_stop( list );
list_iterator_start( list );
while ( list_iterator_hasnext( list ) ) {
data_updated = (list_metadata*)list_iterator_next( list );
i... | false | false | false | false | false | 0 |
creature_set_type(creature_t *creature, creature_type type) {
if (type == creature->type)
return 1;
if (type < 0 || type >= CREATURE_TYPES)
return 0;
creature->type = type;
creature->convert_type = type;
creature_set_health(creature, creature->health);
if (creatur... | false | false | false | false | false | 0 |
print_tracking(struct kmem_cache *s, void *object)
{
if (!(s->flags & SLAB_STORE_USER))
return;
print_track("Allocated", get_track(s, object, TRACK_ALLOC));
print_track("Freed", get_track(s, object, TRACK_FREE));
} | false | false | false | false | false | 0 |
brcmstb_gpio_irq_bank_handler(struct brcmstb_gpio_bank *bank)
{
struct brcmstb_gpio_priv *priv = bank->parent_priv;
struct irq_domain *irq_domain = bank->bgc.gc.irqdomain;
void __iomem *reg_base = priv->reg_base;
unsigned long status;
unsigned long flags;
spin_lock_irqsave(&bank->bgc.lock, flags);
while ((statu... | false | false | false | false | false | 0 |
count_urls(bgav_yml_node_t * n)
{
int ret = 0;
while(n)
{
if(!sc(n->name, "audio") || !sc(n->name, "video"))
{
ret++;
}
else if(n->children)
{
ret += count_urls(n->children);
}
n = n->next;
}
return ret;
} | false | false | false | false | false | 0 |
gtk_placer_size_allocate (GtkWidget *widget,
GtkAllocation *allocation)
{
GtkPlacer *placer;
GtkPlacerChild *child;
GtkAllocation child_allocation;
GtkRequisition child_requisition;
GList *children;
guint16 border_width;
gdouble rel_width_scale, rel_height_scale;
placer = GTK_PLACER (widget);
... | false | false | false | false | false | 0 |
readEnterSection(unsigned id)
{
std::ostringstream oss;
oss << id;
levels.push_back(oss.str());
key += ".";
key += oss.str();
} | false | false | false | false | false | 0 |
n_hdlc_tty_poll(struct tty_struct *tty, struct file *filp,
poll_table *wait)
{
struct n_hdlc *n_hdlc = tty2n_hdlc (tty);
unsigned int mask = 0;
if (debuglevel >= DEBUG_LEVEL_INFO)
printk("%s(%d)n_hdlc_tty_poll() called\n",__FILE__,__LINE__);
if (n_hdlc && n_hdlc->magic == HDLC_MAGIC && tty == n_hdlc-... | false | false | false | false | false | 0 |
g_proxy_volume_can_eject (GVolume *volume)
{
GProxyVolume *proxy_volume = G_PROXY_VOLUME (volume);
GProxyDrive *drive;
gboolean res;
G_LOCK (proxy_volume);
res = FALSE;
if (proxy_volume->drive_id != NULL && strlen (proxy_volume->drive_id) > 0)
{
drive = g_proxy_volume_monitor_get_drive_for_id (pr... | false | false | false | false | false | 0 |
drm_fb_helper_debug_leave(struct fb_info *info)
{
struct drm_fb_helper *helper = info->par;
struct drm_crtc *crtc;
const struct drm_crtc_helper_funcs *funcs;
struct drm_framebuffer *fb;
int i;
for (i = 0; i < helper->crtc_count; i++) {
struct drm_mode_set *mode_set = &helper->crtc_info[i].mode_set;
crtc = mo... | false | false | false | false | false | 0 |
infd_directory_iter_get_plugin(InfdDirectory* directory,
InfdDirectoryIter* iter)
{
InfdDirectoryNode* node;
g_return_val_if_fail(INFD_IS_DIRECTORY(directory), NULL);
infd_directory_return_val_if_iter_fail(directory, iter, NULL);
node = (InfdDirectoryNode*)iter->node;
g_return... | false | false | false | false | false | 0 |
gth_browser_activate_action_folder_delete (GtkAction *action,
GthBrowser *browser)
{
GthFileData *file_data;
char *prompt;
DeleteFolderData *delete_data;
GtkWidget *d;
file_data = gth_browser_get_folder_popup_file_data (browser);
if (file_data == NULL)
return;
prompt = g_strd... | false | false | false | false | false | 0 |
find_pwcheck(const char *algo, int len)
{
struct passwd_algo *p;
for (p = pwtab; p->algo; p++)
if (len == p->len && my_strncasecmp(p->algo, algo, len) == 0)
return p->pwcheck;
return NULL;
} | false | false | false | false | false | 0 |
RemoveBatch(
void *theEnv)
{
struct batchEntry *bptr;
int rv;
if (FileCommandData(theEnv)->TopOfBatchList == NULL) return(FALSE);
/*==================================================*/
/* Close the source from which batch input is read. */
/*==================================================*/
... | false | false | false | false | false | 0 |
get(LLVMContext &Context, const Type *type, ...) {
va_list ap;
std::vector<const llvm::Type*> StructFields;
va_start(ap, type);
while (type) {
StructFields.push_back(type);
type = va_arg(ap, llvm::Type*);
}
return llvm::StructType::get(Context, StructFields);
} | false | false | false | false | false | 0 |
rb_send_xattr_command (glusterd_volinfo_t *volinfo,
glusterd_brickinfo_t *src_brickinfo,
glusterd_brickinfo_t *dst_brickinfo,
const char *xattr_key, const char *value)
{
glusterd_conf_t *priv = NULL;
xlator_t ... | true | true | false | false | false | 1 |
SV_InitGameProgs (void)
{
game_import_t import;
// unload anything we have now
if (ge)
SV_ShutdownGameProgs ();
// load a new game dll
import.multicast = SV_Multicast;
import.unicast = PF_Unicast;
import.bprintf = SV_BroadcastPrintf;
import.dprintf = PF_dprintf;
import.cprintf = PF_cprintf;
import.center... | false | false | false | false | false | 0 |
on_buttonBox_clicked( QAbstractButton* button )
{
LOG(logDEBUG) << "on_buttonBox_clicked()";
QDialogButtonBox::ButtonRole role = buttonBox->buttonRole( button );
if ( ( role == QDialogButtonBox::AcceptRole )
|| ( role == QDialogButtonBox::ApplyRole ) ) {
// Copy the filter set and persist... | false | false | false | false | false | 0 |
really_pickdim(int which_dim, const tensor *sz, int oop, int *dp)
{
int i;
int count_ok = 0;
if (which_dim > 0) {
for (i = 0; i < sz->rnk; ++i) {
if (oop || sz->dims[i].is == sz->dims[i].os)
if (++count_ok == which_dim) {
*dp = i;
... | false | false | false | false | false | 0 |
__connman_service_set_pac(struct connman_service *service,
const char *pac)
{
if (service->hidden == TRUE)
return;
g_free(service->pac);
service->pac = g_strdup(pac);
proxy_changed(service);
} | false | false | false | false | false | 0 |
quitter(GtkWidget * UNUSED(widget), GtkWidget * parent)
{
gtk_main_quit();
if (parent)
gtk_window_present(GTK_WINDOW(parent));
} | false | false | false | false | false | 0 |
SetupOutputTotals()
{
this->TotalNumberOfPoints = 0;
for(int i=this->StartPiece; i < this->EndPiece; ++i)
{
this->TotalNumberOfPoints += this->NumberOfPoints[i];
}
this->StartPoint = 0;
} | false | false | false | false | false | 0 |
parse_abs(struct evemu_device *dev, const char *line, struct version *fversion)
{
int matched;
struct input_absinfo abs = {0};
unsigned int index;
int needed = 5;
if (version_cmp(*fversion, version(1, 1)) > 0)
needed = 6; /* resolution field */
if (strlen(line) <= 2 || strncmp(line, "A:", 2) != 0)
return 0... | false | false | false | false | false | 0 |
setCtrlFds(int in, int out)
{
if (fdIn != NULL)
fclose(fdIn);
fdIn = fdopen(in, "r");
if (fdOut != NULL)
fclose(fdOut);
fdOut = fdopen(out, "w");
} | false | false | false | false | false | 0 |
autohelperbarrierspat174(int trans, int move, int color, int action)
{
int a, b, c, d, E;
UNUSED(color);
a = AFFINE_TRANSFORM(648, trans, move);
b = AFFINE_TRANSFORM(611, trans, move);
c = AFFINE_TRANSFORM(685, trans, move);
d = AFFINE_TRANSFORM(610, trans, move);
E = AFFINE_TRANSFORM(647, trans, move);
... | false | false | false | false | false | 0 |
_rm_dev_node(const char *dev_name, int warn_if_udev_failed)
{
char path[PATH_MAX];
struct stat info;
_build_dev_path(path, sizeof(path), dev_name);
if (stat(path, &info) < 0)
return 1;
else if (_warn_if_op_needed(warn_if_udev_failed))
log_warn("Node %s was not removed by udev. "
"Falling back to direct n... | false | false | false | false | false | 0 |
open_curve_editor(GtkObject *button, gpointer xopt)
{
option_t *opt = (option_t *)xopt;
if (opt->info.curve.is_visible == FALSE)
{
GtkWidget *gcurve =
GTK_WIDGET(STPUI_GAMMA_CURVE(opt->info.curve.gamma_curve)->curve);
const stp_curve_t *seed =
stp_get_curve_parameter(pv->v, opt->fast_desc->name);
... | false | false | false | false | false | 0 |
uloc_getCurrentLanguageID(const char* oldID){
int32_t offset = _findIndex(DEPRECATED_LANGUAGES, oldID);
if (offset >= 0) {
return REPLACEMENT_LANGUAGES[offset];
}
return oldID;
} | false | false | false | false | false | 0 |
sb_midi_interrupt(sb_devc * devc)
{
unsigned long flags;
unsigned char data;
if (devc == NULL)
return;
spin_lock_irqsave(&devc->lock, flags);
data = inb(DSP_READ);
if (devc->input_opened)
devc->midi_input_intr(devc->my_mididev, data);
spin_unlock_irqrestore(&devc->lock, flags);
} | false | false | false | false | false | 0 |
detect_scroll()
{
if( mouse_cursor.frame_flag ) // if it's now in frame selection mode
return 0;
if( next_scroll_time && misc.get_time() < next_scroll_time ) // just scrolled not too long ago, wait for a little while before next scroll.
return 0;
int rc=0;
//----- scroll left -----//
... | false | false | false | false | false | 0 |
m_emit_stat (pIIR_ReturnStatement r, int l)
{
// Almost as easy.
if (r->return_expression)
{
printf ("return ");
emit (r->return_expression);
printf (";\n");
}
else
printf ("return;\n");
} | false | false | false | false | false | 0 |
NK7110_SetAlarm(gn_data *data, struct gn_statemachine *state)
{
unsigned char req[] = {FBUS_FRAME_HEADER, 0x6b, 0x01, 0x20, 0x03,
0x02, /* should be alarm on/off */
0x00, 0x00, /* hours, minutes */
0x00};
if (!data->alarm) return GN_ERR_INTERNALERROR;
if (data->alarm->enabled) {
req[7] = NK7110_ALAR... | false | false | false | false | false | 0 |
xrrr_converter(const uchar *from, uchar *to, int w, int delta) {
INNARDS32(*from * 0x10101U);
} | false | false | false | false | false | 0 |
verifyReturnAddressArgumentIsConstant(SDValue Op, SelectionDAG &DAG) const {
if (!isa<ConstantSDNode>(Op.getOperand(0))) {
DAG.getContext()->emitError("argument to '__builtin_return_address' must "
"be a constant integer");
return true;
}
return false;
} | false | false | false | false | false | 0 |
make(CdlToplevel toplevel)
{
CYG_REPORT_FUNCNAMETYPE("CdlTransaction::make", "result %p");
CYG_REPORT_FUNCARG1XV(toplevel);
CYG_PRECONDITION_CLASSC(toplevel);
CYG_PRECONDITIONC(0 == toplevel->transaction);
CdlTransaction result = new CdlTransactionBody(toplevel, 0, 0);
toplevel->transaction... | false | false | false | false | false | 0 |
getfuncname (lua_State *L, CallInfo *ci, const char **name) {
TMS tm = (TMS)0; /* to avoid warnings */
Proto *p = ci_func(ci)->p; /* calling function */
int pc = currentpc(ci); /* calling instruction index */
Instruction i = p->code[pc]; /* calling instruction */
if (ci->callstatus & CIST_HOOKED) { /* wa... | false | false | false | false | false | 0 |
sax_hash(const char *key)
{
unsigned int h = 0;
while (*key) {
h ^= (h << 5) + (h >> 2) + (unsigned char) *key;
++key;
}
return h;
} | false | false | false | false | false | 0 |
e_bindings_wheel_del(E_Binding_Context ctxt, int direction, int z, E_Binding_Modifier mod, int any_mod, const char *action, const char *params)
{
E_Binding_Wheel *binding;
Eina_List *l;
EINA_LIST_FOREACH(wheel_bindings, l, binding)
{
if ((binding->ctxt == ctxt) &&
(binding->direction ... | false | false | false | false | false | 0 |
nfs3_xdr_dec_pathconf3res(struct rpc_rqst *req,
struct xdr_stream *xdr,
struct nfs_pathconf *result)
{
enum nfs_stat status;
int error;
error = decode_nfsstat3(xdr, &status);
if (unlikely(error))
goto out;
error = decode_post_op_attr(xdr, result->fattr);
if (unlikely(error))
goto out;
if (... | false | false | false | false | false | 0 |
sqliteRollbackAll(sqlite *db){
int i;
for(i=0; i<db->nDb; i++){
if( db->aDb[i].pBt ){
sqliteBtreeRollback(db->aDb[i].pBt);
db->aDb[i].inTrans = 0;
}
}
sqliteResetInternalSchema(db, 0);
/* sqliteRollbackInternalChanges(db); */
} | false | false | false | false | false | 0 |
insertNewResults(GATEWAY_EVENT * e, DUL_NETWORKKEY ** network,
DMAN_HANDLE ** d, FIS_HANDLE ** f, char *local, char *remote)
{
CONDITION cond,
rtnCond = 1;
FIS_RESULTSRECORD *resultsPtr,
results;
resultsPtr = &(e->r.results);
if (logLevel > 0) {
fprintf(stdout, "\nAbout to inse... | false | false | false | false | false | 0 |
Circle(real lat, real h, unsigned caps) const {
if (h != 0)
// Disallow invoking GeoidHeight unless h is zero.
caps &= ~(CAP_GAMMA0 | CAP_C);
real X, Y, Z, M[Geocentric::dim2_];
_earth.Earth().IntForward(lat, 0, h, X, Y, Z, M);
// Y = 0, cphi = M[7], sphi = M[8];
real
invR = 1 / Ma... | false | false | false | false | false | 0 |
columns_bios_set_properties (GtkTreeViewColumn *column,
GtkCellRenderer *renderer,
GtkTreeModel *model,
GtkTreeIter *iter)
{
GvaGameStoreColumn column_id;
gchar *bios, *cp;
gsize length;
column_id = g... | 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.