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 |
|---|---|---|---|---|---|---|
create_new_reflog_file(const char *filepath)
{
int fd, error;
if ((error = git_futils_mkpath2file(filepath, GIT_REFLOG_DIR_MODE)) < 0)
return error;
if ((fd = p_open(filepath,
O_WRONLY | O_CREAT | O_TRUNC,
GIT_REFLOG_FILE_MODE)) < 0)
return -1;
return p_close(fd);
} | false | false | false | false | false | 0 |
checkModules()
{
struct SensorModul *entry;
for ( entry = SensorModulList; entry->configName != NULL; entry++ )
if ( entry->checkCommand != NULL && entry->available )
entry->checkCommand();
} | false | false | false | false | false | 0 |
get_ether_addr (u_int32_t ipaddr, struct sockaddr *hwaddr, char *name)
{
int ifs_len;
int answer;
void *base_addr;
/*
* Allocate memory to hold the request.
*/
ifs_len = MAX_IFS * sizeof (struct ifreq);
base_addr = (void *) malloc (ifs_len);
if (!base_addr) {
syslog(LOG_ERR, "malloc(%d) failed to return memor... | false | false | false | false | false | 0 |
GetInput(int idx)
{
if (idx >= this->GetNumberOfInputConnections(0) || idx < 0)
{
return NULL;
}
return vtkDataSet::SafeDownCast(
this->GetExecutive()->GetInputData(0, idx));
} | false | false | false | false | false | 0 |
PyIntl_bind_textdomain_codeset(PyObject* self,PyObject*args)
{
char *domain,*codeset;
if (!PyArg_ParseTuple(args, "sz", &domain, &codeset))
return NULL;
codeset = bind_textdomain_codeset(domain, codeset);
if (codeset)
return PyUnicode_DecodeLocale(codeset, NULL);
Py_RETURN_NONE;
} | false | false | false | false | false | 0 |
gcr_unlock_options_widget_get_ttl (GcrUnlockOptionsWidget *self)
{
GtkSpinButton *spin;
gint amount;
g_return_val_if_fail (GCR_IS_UNLOCK_OPTIONS_WIDGET (self), 0);
spin = builder_get_spin_button (self->pv->builder, "lock_minutes_spin");
amount = gtk_spin_button_get_value_as_int (spin);
return amount * 60;
} | false | false | false | false | false | 0 |
sensor_LDCM(lsat_data * lsat)
{
int i;
/* coastal aerosol, blue, green, red, near infrared, shortwave IR (SWIR) 1, SWIR 2, panchromatic,
* cirrus, thermal infrared (TIR) 1, TIR 2 */
int band[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 };
int code[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 };
double w... | false | false | false | false | false | 0 |
ParseNum()
{
const char* valid = "0123456789.Ee+";
const char* reset = _src;
double mult = 1;
if('-' == *_src)
{
mult = -1;
++_src;
}
int len = strspn(_src, valid);
if(len == 0)
{
_src = reset;
return false;
}
_number = atof(_src) * mult;
_token = TOKEN_NUMBER;
_src += len;
return true;
} | false | false | false | false | false | 0 |
reorderqueue_push(IndexScanState *node, HeapTuple tuple,
Datum *orderbyvals, bool *orderbynulls)
{
IndexScanDesc scandesc = node->iss_ScanDesc;
EState *estate = node->ss.ps.state;
MemoryContext oldContext = MemoryContextSwitchTo(estate->es_query_cxt);
ReorderTuple *rt;
int i;
rt = (ReorderTuple *) pal... | false | false | false | false | false | 0 |
ikrt_fixnum_shift_left(ikptr x, ikptr y, ikpcb* pcb){
int limb_shift = (wordsize == 4 ? 5 : 6);
long int m = unfix(y);
long int n = unfix(x);
long int limb_count = (m >> limb_shift) + 2;
long int bit_shift = m & (mp_bits_per_limb-1);
ikptr r = ik_safe_alloc(pcb, align(disp_bignum_data + limb_count * wordsi... | false | false | false | false | false | 0 |
RemoveFromLink(P_FLAG_NODE pnode) {
P_OSTCB ptcb;
RemoveLinkNode(pnode); /* Remove the flag node from wait list. */
ptcb = pnode->waitTask;
/* The task in the delay list */
if(ptcb->delayTick != INVALID_VALUE) { /* If the task is in tick delay list */
RemoveDelayList(ptcb); /* Remove the tas... | false | false | false | false | false | 0 |
kretprobe_event_define_fields(struct trace_event_call *event_call)
{
int ret, i;
struct kretprobe_trace_entry_head field;
struct trace_kprobe *tk = (struct trace_kprobe *)event_call->data;
DEFINE_FIELD(unsigned long, func, FIELD_STRING_FUNC, 0);
DEFINE_FIELD(unsigned long, ret_ip, FIELD_STRING_RETIP, 0);
/* Set ... | false | false | false | false | false | 0 |
vfgets(str, size, iob)
char *str;
int size;
FILE *iob;
{
register char *cs;
register int c;
cs = str;
while (--size > 0 && (c = getc(iob)) != EOF) {
if ((*(cs++) = c) == '-') {
if ((c = getc(iob)) == '\n') {
/* avant : *cs-- */
cs--;
} else
(void)ungetc(c ,iob);
} else if (c == '\n')
bre... | false | false | false | false | false | 0 |
loadLink(SuffixTree * tree,
STNode * node) {
if (node->link_off == 0) {
#if ASSERTS
abort();
#endif
return -1;
}
if (tree->used_memory > tree->memory_limit)
shrinkMemoryFootprint(tree, node);
node->link = lazyReadNode(tree,
node->link_off);
if (node->link == NULL) {
#if ASSERTS
a... | false | false | false | false | false | 0 |
mud_window_handle_plugins(MudWindow *window, gint id, gchar *data, guint length, gint dir)
{
GSList *entry, *viewlist;
MudViewEntry *mudview;
GList *plugin_list;
PLUGIN_DATA *pd;
viewlist = window->priv->mud_views_list;
for(entry = viewlist; entry != NULL; entry = g_slist_next(entry))
{
... | false | false | false | false | false | 0 |
pv_rds_to_gds_sym( rds_sym, refx_p, angle_p )
char rds_sym;
short *refx_p;
double *angle_p;
{
switch (rds_sym) {
case RDS_NOSYM :
*refx_p = 0;
*angle_p = 0.0;
break;
case RDS_ROT_P :
*refx_p = 0;
*angle_p = 90.0;
break;
case RDS_SYMXY :
... | false | false | false | false | false | 0 |
_sizing_eval(Evas_Object *obj)
{
Widget_Data *wd = elm_widget_data_get(obj);
Evas_Coord minw = -1, minh = -1;
if (!wd) return;
edje_object_size_min_calc(wd->edje, &minw, &minh);
evas_object_size_hint_min_set(obj, minw, minh);
evas_object_size_hint_max_set(obj, -1, -1);
} | false | false | false | false | false | 0 |
i915_power_domain_info(struct seq_file *m, void *unused)
{
struct drm_info_node *node = m->private;
struct drm_device *dev = node->minor->dev;
struct drm_i915_private *dev_priv = dev->dev_private;
struct i915_power_domains *power_domains = &dev_priv->power_domains;
int i;
mutex_lock(&power_domains->lock);
seq_... | false | false | false | false | false | 0 |
Menu_ApplyItem (menuitem_s *item)
{
if (item != NULL && item->generic.callback != NULL && (item->generic.flags & QMF_ACTION_WAIT) && item->generic.apply_pending)
{
Menu_GetItemTree (item)->num_apply_pending--;
item->generic.callback (item);
item->generic.apply_pending = false;
}
} | false | false | false | false | false | 0 |
csio_lns_online(struct csio_lnode *ln, enum csio_ln_ev evt)
{
struct csio_hw *hw = csio_lnode_to_hw(ln);
CSIO_INC_STATS(ln, n_evt_sm[evt]);
switch (evt) {
case CSIO_LNE_LINKUP:
csio_ln_warn(ln,
"warn: FCOE link is up already "
"Ignoring linkup on port:%d\n", ln->portid);
CSIO_INC_STATS(ln, n_ev... | false | false | false | false | false | 0 |
createDevice(QIODevice::OpenMode mode)
{
if (d->mimetype.isEmpty()) {
// Find out mimetype manually
KMimeType::Ptr mime;
if (mode != QIODevice::WriteOnly && QFile::exists(fileName())) {
// Give priority to file contents: if someone renames a .tar.bz2 to .tar.gz,
// w... | false | false | false | false | false | 0 |
NP_unmarshalSimpleParams(cdrStream &s,
TypeCode_offsetTable* otbl)
{
TypeCode_fixed* _ptr = new TypeCode_fixed;
otbl->addEntry(otbl->currentOffset(), _ptr);
_ptr->pd_digits <<= s;
_ptr->pd_scale <<= s;
return _ptr;
} | false | false | false | false | false | 0 |
notify_check (Unit *unit, a_inode *a)
{
Notify *n;
int hash = notifyhash (a->aname);
for (n = unit->notifyhash[hash]; n; n = n->next) {
uaecptr nr = n->notifyrequest;
if (same_aname (n->partname, a->aname)) {
int err;
a_inode *a2 = find_aino (unit, 0, n->fullname, &err);
if (err == 0 && a == a2)
not... | false | false | false | false | false | 0 |
handleWrite(uaecptr addr, uae_u8 value)
{
D(bug("joypads: Write 0x%02x to 0x%08x",value,addr));
switch(addr-getHWoffset()) {
case 0x02:
mask = (mask & 0xff) | (value<<8);
break;
case 0x03:
mask = (mask & 0xff00) | value;
break;
}
} | false | false | false | false | false | 0 |
_dxfinitobjlist(struct finfo *f)
{
if (!f)
return ERROR;
f->ol = NULL;
f->ht = DXCreateHash(sizeof(struct hashidtolist), NULL, NULL);
if (!f->ht)
return ERROR;
return OK;
} | false | false | false | false | false | 0 |
GetUserTime(uint32_t* secs, uint32_t* usecs) {
struct rusage usage;
if (getrusage(RUSAGE_SELF, &usage) < 0) return -1;
*secs = usage.ru_utime.tv_sec;
*usecs = usage.ru_utime.tv_usec;
return 0;
} | false | false | false | false | false | 0 |
au_fhsm_do_read(struct super_block *sb,
struct aufs_stbr __user *stbr, size_t count)
{
ssize_t err;
int nstbr;
aufs_bindex_t bindex, bend;
struct au_branch *br;
struct au_br_fhsm *bf;
/* except the bottom branch */
err = 0;
nstbr = 0;
bend = au_fhsm_bottom(sb);
for (bindex = 0; !err && bindex < ben... | false | false | false | false | false | 0 |
radeon_dp_getdpcd(struct radeon_connector *radeon_connector)
{
struct radeon_connector_atom_dig *dig_connector = radeon_connector->con_priv;
u8 msg[DP_DPCD_SIZE];
int ret, i;
for (i = 0; i < 7; i++) {
ret = drm_dp_dpcd_read(&radeon_connector->ddc_bus->aux, DP_DPCD_REV, msg,
DP_DPCD_SIZE);
if (ret ==... | false | false | false | false | false | 0 |
command_get_signal_mask(char * token, Channel * c) {
int err = 0;
char id[256];
Context * ctx = NULL;
json_read_string(&c->inp, id, sizeof(id));
if (read_stream(&c->inp) != 0) exception(ERR_JSON_SYNTAX);
if (read_stream(&c->inp) != MARKER_EOM) exception(ERR_JSON_SYNTAX);
ctx = id2ctx(id);
... | true | true | false | false | false | 1 |
gst_rtp_g723_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps)
{
GstStructure *structure;
GstCaps *srccaps;
GstRtpG723Depay *rtpg723depay;
const gchar *params;
gint clock_rate, channels;
gboolean ret;
rtpg723depay = GST_RTP_G723_DEPAY (depayload);
structure = gst_caps_get_structure (caps... | false | false | false | false | true | 1 |
st_widget_set_accessible (StWidget *widget,
AtkObject *accessible)
{
g_return_if_fail (ST_IS_WIDGET (widget));
if (widget->priv->accessible != accessible)
{
if (widget->priv->accessible)
g_object_unref (widget->priv->accessible);
if (accessible)
widge... | false | false | false | false | false | 0 |
_rtl8723be_c2h_content_parsing(struct ieee80211_hw *hw,
u8 c2h_cmd_id,
u8 c2h_cmd_len, u8 *tmp_buf)
{
struct rtl_priv *rtlpriv = rtl_priv(hw);
switch (c2h_cmd_id) {
case C2H_8723B_DBG:
RT_TRACE(rtlpriv, COMP_FW, DBG_TRACE,
"[C2H], C2H_8723BE_DBG!!\n");
break;
case C2H_8723B_TX_REPORT:
RT_... | false | false | false | false | false | 0 |
transport_generic_request_failure(struct se_cmd *cmd,
sense_reason_t sense_reason)
{
int ret = 0, post_ret = 0;
pr_debug("-----[ Storage Engine Exception for cmd: %p ITT: 0x%08llx"
" CDB: 0x%02x\n", cmd, cmd->tag, cmd->t_task_cdb[0]);
pr_debug("-----[ i_state: %d t_state: %d sense_reason: %d\n",
cmd->se_tfo->... | false | false | false | false | false | 0 |
bswap_level_tiles (const a_level_header* level_info, a_tile* level_map)
{
int i;
for (i = level_info->xt * level_info->yt - 1; i >= 0; i--) {
level_map[i].number = BSWAP32 (level_map[i].number);
level_map[i].sprite = BSWAP16 (level_map[i].sprite);
if (level_map[i].type == t_tunnel)
level_map[i].i... | false | false | false | false | false | 0 |
gf_box_dump_done(char *name, GF_Box *ptr, FILE *trace)
{
if (ptr && ptr->other_boxes) {
gf_box_array_dump(ptr->other_boxes, trace);
}
if (name)
fprintf(trace, "</%s>\n", name);
} | false | false | false | false | false | 0 |
helpCmd()
{
if (_nword == 1) {
(void) give_overall_help_message();
return true;
}
// Give help on topic
if (_nword == 3 && !strcmp(_word[1], "-")) {
give_help_on_topic();
return true;
} else {
// Must be `help item ...'
int i = 0, cmd;
bool found = false;
std::string tmpname_... | false | false | false | false | false | 0 |
main (int argc, char **argv)
{
GtkWidget *window, *ui;
/* We override the read color functions because we are using a GdkColor
structures to store the color. If I put this in lib/config_file.c, then
the core library would be dependant on Gtk+ being present */
gftp_option_types[gftp_option_type_color]... | false | false | false | false | false | 0 |
fclose(FILE *stream)
{
#define VT_IOWRAP_THISFUNCNAME fclose
int ret;
int tmp;
uint64_t enter_time;
VT_IOWRAP_INIT_IOFUNC();
VT_IOWRAP_CHECK_TRACING1(ret, stream);
vt_cntl_msg(DBG_IO, stringify(VT_IOWRAP_THISFUNCNAME) ": %i",
stream != NULL ? fileno(stream) : -1);
VT_IOWRAP_ENTER_IOFUNC();
... | false | false | false | false | false | 0 |
receive(const Event& e) {
WindowRep& w = *rep();
XEvent& xe = e.rep()->xevent_;
Handler* handler = nil;
SelectionManager* s;
switch (xe.type) {
case MapNotify:
w.map_notify(this, xe.xmap);
break;
case UnmapNotify:
w.unmap_notify(this, xe.xunmap);
break;
case Expose:
w.expose(this, x... | false | false | false | false | false | 0 |
add_file_to_list(const char* filename, const char* tile_index,
int* pnInputFiles, char*** pppszInputFilenames)
{
int nInputFiles = *pnInputFiles;
char** ppszInputFilenames = *pppszInputFilenames;
if (EQUAL(CPLGetExtension(filename), "SHP"))
{
#ifndef OGR_ENABLED
... | false | false | false | false | false | 0 |
markup_tree_rebuild (MarkupTree *tree)
{
g_return_if_fail (!markup_dir_needs_sync (tree->root));
markup_dir_free (tree->root);
tree->root = markup_dir_new (tree, NULL, "/");
} | false | false | false | false | false | 0 |
update_last_used (NetDeviceWifi *device_wifi)
{
NetDeviceWifiPrivate *priv = device_wifi->priv;
gchar *last_used = NULL;
GDateTime *now = NULL;
GDateTime *then = NULL;
gint days;
GTimeSpan diff;
guint64 timestamp;
NMRemoteConnection *connection;
NM... | false | false | false | false | false | 0 |
getTSConfigurations(Archive *fout, int *numTSConfigs)
{
PGresult *res;
int ntups;
int i;
PQExpBuffer query;
TSConfigInfo *cfginfo;
int i_tableoid;
int i_oid;
int i_cfgname;
int i_cfgnamespace;
int i_rolname;
int i_cfgparser;
/* Before 8.3, there is no built-in text search support */
if (... | false | false | false | false | false | 0 |
py_attack(int y, int x) {
int blow_energy = 10000 / p_ptr->state.num_blows;
int blows = 0;
bool fear = FALSE;
monster_type *m_ptr = cave_monster(cave, cave->m_idx[y][x]);
/* disturb the player */
disturb(p_ptr, 0,0);
/* Initialize the energy used */
p_ptr->energy_use = 0;
/* Attack until energy runs out or... | false | false | false | false | false | 0 |
lua_arith (lua_State *L, int op) {
lua_lock(L);
if (op != LUA_OPUNM && op != LUA_OPBNOT)
api_checknelems(L, 2); /* all other operations expect two operands */
else { /* for unary operations, add fake 2nd operand */
api_checknelems(L, 1);
setobjs2s(L, L->top, L->top - 1);
L->top++;
}
/* first... | false | false | false | false | false | 0 |
composeMailMessage (PR *pr, PR *oldPR, const char *formatName,
FormatNamedParameter *parameters,
BadFields bad_fields,
ErrorDesc *err ATTRIBUTE_UNUSED)
{
MailMessageFormat format = findMailFormat (pr->database, formatName);
FILE *msg;
char *fromAddr;
char *toAddr = NULL;
char *replyToAddr =... | false | false | false | false | false | 0 |
draw_centering_symbol( FL_Coord x,
FL_Coord y,
FL_Coord w,
FL_Coord h,
int angle,
FL_COLOR col )
{
int delta = 4;
if ( angle == 0 || angle == 180 )
{
fl_draw_symbol( "@->", x, y, ... | false | false | false | false | false | 0 |
gst_gconf_get_default_video_sink (void)
{
GstElement *ret = gst_gconf_render_bin_from_key (GST_GCONF_VIDEOSINK_KEY);
if (!ret) {
ret = gst_element_factory_make (DEFAULT_VIDEOSINK, NULL);
if (!ret)
g_warning ("No GConf default video sink key and %s doesn't work",
DEFAULT_VIDEOSINK);
}
... | false | false | false | false | false | 0 |
mvhd_Write(GF_Box *s, GF_BitStream *bs)
{
GF_Err e;
GF_MovieHeaderBox *ptr = (GF_MovieHeaderBox *)s;
e = gf_isom_full_box_write(s, bs);
if (e) return e;
if (ptr->version == 1) {
gf_bs_write_u64(bs, ptr->creationTime);
gf_bs_write_u64(bs, ptr->modificationTime);
gf_bs_write_u32(bs, ptr->timeScale);
gf_bs_wr... | false | false | false | false | false | 0 |
proc_thread_self_readlink(struct dentry *dentry, char __user *buffer,
int buflen)
{
struct pid_namespace *ns = dentry->d_sb->s_fs_info;
pid_t tgid = task_tgid_nr_ns(current, ns);
pid_t pid = task_pid_nr_ns(current, ns);
char tmp[PROC_NUMBUF + 6 + PROC_NUMBUF];
if (!pid)
return -ENOENT;
sprintf(tmp, "%d... | true | true | false | false | false | 1 |
s_new_container(unsigned banks)
{
s_container_t *ret = (s_container_t *)calloc(1, sizeof(s_container_t));
if(!ret)
return NULL;
if(__alloc_bank_table(ret, banks) < 0)
return NULL;
return ret;
} | false | false | false | false | false | 0 |
img_color_deallocate(img, color)
VALUE img, color;
{
gdImagePtr im;
Data_Get_Struct(img, gdImage, im);
gdImageColorDeallocate(im, NUM2INT(color));
return img;
} | false | false | false | false | false | 0 |
ensure_revision (ECalBackendFile *cbfile)
{
icalproperty *prop;
if (cbfile->priv->icalcomp == NULL)
return NULL;
prop = get_revision_property (cbfile);
if (prop == NULL) {
gchar *revision = make_revision_string (cbfile);
prop = icalproperty_new (ICAL_X_PROPERTY);
icalproperty_set_x_name (prop, ECAL_REV... | false | false | false | false | false | 0 |
constructor (GType type,
guint n_construct_params,
GObjectConstructParam *construct_params)
{
GObject *object;
NMDeviceAdslPrivate *priv;
GError *error = NULL;
object = G_OBJECT_CLASS (nm_device_adsl_parent_class)->constructor (type,
n_co... | false | false | false | false | false | 0 |
cavan_font_get(int type)
{
int ret;
struct cavan_font *font;
if (type < 0)
{
type = CAVAN_DEFAULT_FONT;
}
switch (type)
{
case CAVAN_FONT_10X18:
font = &cavan_font_10x18;
break;
case CAVAN_FONT_12X22:
font = &cavan_font_12x22;
break;
case CAVAN_FONT_18X32:
font = &cavan_font_18x32;
break;
... | false | false | false | false | false | 0 |
start_autovbox(int compression, char *name, char *id, char *phone, char *location)
{
vaheader_t header;
int result;
vboxtmpfile = NULL;
signal(SIGINT , leave_autovbox);
signal(SIGQUIT, leave_autovbox);
signal(SIGTERM, leave_autovbox);
signal(SIGHUP , leave_autovbox);
signal(SIGPIPE, leave_autovbox);
... | false | true | false | false | true | 1 |
ShutDownAllSockets()
{
for (int i = 0; i < maxSocket_; i++)
{
SocketConnection* so = &sockets_[i];
ForceSocketClose(so);
}
isRunning_ = false;
} | false | false | false | false | false | 0 |
Get_max_height
(
Shape *shape
)
{
int cnt = shape->get_num_frames();
int maxh = 0;
for (int i = 0; i < cnt; i++)
{
Shape_frame *frame = shape->get_frame(i);
int ht = frame ? frame->get_height() : -1;
if (ht > maxh)
maxh = ht;
}
return maxh;
} | false | false | false | false | false | 0 |
stmt_compound_prepend(stmt_ty *that, stmt_ty *lp)
{
stmt_compound_ty *this;
size_t j;
trace(("stmt_compound_prepend()\n{\n"));
this = (stmt_compound_ty *)that;
if (this->nlines >= this->nlines_max)
{
size_t nbytes;
this->nlines_max = this->nlines_max * 2 + 4;
... | false | false | false | false | false | 0 |
xalloc(void)
{
int n,oldn;
LVAL num;
/* get the new number to allocate */
num = xlgafixnum();
n = getfixnum(num);
/* make sure there aren't any more arguments */
xllastarg();
/* set the new number of nodes to allocate */
oldn = anodes;
anodes = n;
/* return the old number... | false | false | false | false | false | 0 |
driver_get_descriptor ()
{
jack_driver_desc_t *desc;
jack_driver_param_desc_t *params;
desc = (jack_driver_desc_t *) calloc(1, sizeof(jack_driver_desc_t));
if (desc == NULL)
{
jack_error("oss_driver: calloc() failed: %s@%i, errno=%d",
__FILE__, __LINE__, errno);
return NULL;
}
strcpy(desc->name, driver_c... | false | false | false | false | false | 0 |
get_iface_nr(void)
{
FILE *fp;
char line[128];
int iface = 0;
if ((fp = fopen(NET_DEV, "r")) == NULL)
return 0; /* No network device file */
while (fgets(line, 128, fp) != NULL) {
if (strchr(line, ':')) {
iface++;
}
}
fclose(fp);
return iface;
} | false | false | false | false | false | 0 |
gnc_html_dispose( GObject* obj )
{
GncHtml* self = GNC_HTML(obj);
GncHtmlPrivate* priv = GNC_HTML_GET_PRIVATE(self);
if ( priv->container != NULL )
{
gtk_widget_destroy( GTK_WIDGET(priv->container) );
g_object_unref( G_OBJECT(priv->container) );
priv->container = NULL;
}
... | false | false | false | false | false | 0 |
GC_start_routine_head(void * arg, void *base_addr,
ThreadStartFn *start, void **start_arg )
{
struct start_info * si = arg;
void * result;
GC_thread me;
pthread_t my_pthread;
my_pthread = pthread_self();
# ifdef DEBUG_THREADS
GC_printf1("Starting thread 0x%lx\n", my_pthread);
... | false | false | false | false | false | 0 |
nilfs_sync_super(struct super_block *sb, int flag)
{
struct the_nilfs *nilfs = sb->s_fs_info;
int err;
retry:
set_buffer_dirty(nilfs->ns_sbh[0]);
if (nilfs_test_opt(nilfs, BARRIER)) {
err = __sync_dirty_buffer(nilfs->ns_sbh[0],
WRITE_SYNC | WRITE_FLUSH_FUA);
} else {
err = sync_dirty_buffer(nilfs->ns_... | false | false | false | false | false | 0 |
hub_update_stats(struct hub_info* hub)
{
const int factor = TIMEOUT_STATS;
struct net_statistics* total;
struct net_statistics* intermediate;
net_stats_get(&intermediate, &total);
hub->stats.net_tx = (intermediate->tx / factor);
hub->stats.net_rx = (intermediate->rx / factor);
hub->stats.net_tx_peak = MAX(hub->... | false | false | false | false | false | 0 |
compare_ob_value_lists_one(const object *wants, const object *has) {
key_value *wants_field;
/* n-squared behaviour (see object_get_key_value()), but I'm hoping both
* objects with lists are rare, and lists stay short. If not, use a
* different structure or at least keep the lists sorted...
*/
... | false | false | false | false | false | 0 |
img_table_button_set_pixbufs( ImgTableButton *button,
gint no_images,
GdkPixbuf **pixbufs )
{
ImgTableButtonPrivate *priv;
g_return_if_fail( IMG_IS_TABLE_BUTTON( button ) );
priv = IMG_TABLE_BUTTON_GET_PRIVATE( button );
img_table_button_clear_items( priv );
img_table_button_... | false | false | false | false | false | 0 |
source_authentication_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec)
{
switch (property_id) {
case PROP_HOST:
e_source_authentication_set_host (
E_SOURCE_AUTHE... | false | false | false | false | false | 0 |
move_show (Client * c)
{
if (c)
XMoveWindow (dpy, c->parent, c->x, c->y);
} | false | false | false | false | false | 0 |
fstReaderGetCurrentFlatScope(void *ctx)
{
struct fstReaderContext *xc = (struct fstReaderContext *)ctx;
if(xc)
{
return(xc->curr_flat_hier_nam ? xc->curr_flat_hier_nam : "");
}
else
{
return(NULL);
}
} | false | false | false | false | false | 0 |
brasero_data_project_add_empty_directory (BraseroDataProject *self,
const gchar *name,
BraseroFileNode *parent)
{
BraseroFileNode *node;
BraseroURINode *graft;
BraseroFileNode *sibling;
BraseroDataProjectPrivate *priv;
g_return_val_if_fail (BRASERO_IS_DATA_PROJECT (self), NULL);
g_return_val_if_fai... | false | false | false | false | false | 0 |
F_progn(struct alisp_instance *instance, struct alisp_object * args)
{
struct alisp_object * p = args, * p1 = NULL, * n;
do {
if (p1)
delete_tree(instance, p1);
p1 = eval(instance, car(p));
n = cdr(p);
delete_object(instance, p);
p = n;
} while (p != &alsa_lisp_nil);
return p1;
} | false | false | false | false | false | 0 |
st_widget_add_accessible_state (StWidget *widget,
AtkStateType state)
{
g_return_if_fail (ST_IS_WIDGET (widget));
if (atk_state_set_add_state (widget->priv->local_state_set, state))
notify_accessible_state_change (widget, state, TRUE);
} | false | false | false | false | false | 0 |
toString()
{
return string(showOp() + "(" + expr->toString() + ")");
} | false | false | false | false | false | 0 |
dht_attr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int op_ret, int op_errno, struct iatt *stbuf)
{
dht_local_t *local = NULL;
int this_call_cnt = 0;
call_frame_t *prev = NULL;
GF_VALIDATE_OR_GOTO ("dht", frame, err);
GF_VALIDATE_OR_GOTO ("d... | false | false | false | true | false | 1 |
RestoreCursorPosition(Widget w, XEvent *e, String *p, Cardinal *np)
#else
static void RestoreCursorPosition(w, e, p, np)
Widget w;
XEvent *e;
String *p;
Cardinal *np;
#endif
{
XmtMsgLineWidget mw = (XmtMsgLineWidget) w;
XmTextPosition start, end;
/* if there is a saved position */
if (mw->msgline.saved... | false | false | false | false | false | 0 |
brasero_burn_reload_src_media (BraseroBurn *burn,
BraseroBurnError error_code,
GError **error)
{
BraseroBurnResult result;
result = brasero_burn_ask_for_src_media (burn,
error_code,
BRASERO_MEDIUM_HAS_DATA,
error);
if (result != BRASERO_BURN_OK)
return result;
result = b... | false | false | false | false | false | 0 |
bnx2x_update_pfc(struct link_params *params,
struct link_vars *vars,
struct bnx2x_nig_brb_pfc_port_params *pfc_params)
{
/* The PFC and pause are orthogonal to one another, meaning when
* PFC is enabled, the pause are disabled, and when PFC is
* disabled, pause are set according to the pause result... | false | false | false | false | false | 0 |
vfat_cvt_longname(char *entry_name, const uint16_t *long_name)
{
struct unicache {
uint16_t utf16;
uint8_t cp;
};
static struct unicache unicache[256];
struct unicache *uc;
uint16_t cp;
unsigned int c;
char *p = entry_name;
do {
cp = *long_name++;
uc = &unicache[cp % 256];
if (__l... | false | false | false | false | false | 0 |
lekhonee_main_on_quit_response (LekhoneeMain* self, GtkDialog* source, gint response_id) {
g_return_if_fail (self != NULL);
g_return_if_fail (source != NULL);
switch (response_id) {
case GTK_RESPONSE_OK:
{
gtk_main_quit ();
break;
}
}
} | false | false | false | false | false | 0 |
suggest_try_soundalike_finish()
{
langp_T *lp;
int lpi;
slang_T *slang;
int todo;
hashitem_T *hi;
/* Do this for all languages that support sound folding and for which a
* .sug file has been loaded. */
for (lpi = 0; lpi < curbuf->b_langp.ga_len; ++lpi)
{
lp = LANGP_ENTRY(curbuf-... | false | false | false | false | false | 0 |
process_audio_toggle_mute_call(DBusMessage *req)
{
DBusMessage *msg;
int ret;
logdebug("Got audio toggleMute call\n");
audio_toggle_mute();
msg = dbus_message_new_method_return(req);
ret = dbus_connection_send(conn, msg, NULL);
if (ret == FALSE)
{
logdebug("Could not send audio toggleMute r... | false | false | false | false | false | 0 |
calcCoefficient(int l1, int l2, int L, int m1, int m2, int M) {
if (m1+m2!=M) return 0;
double F1=sqrt((2*L+1)*factorial(L+l1-l2)*factorial(L-l1+l2)*factorial(l1+l2-L)/factorial(l1+l2+L+1));
double F2=sqrt(factorial(L+M)*factorial(L-M)*factorial(l1-m1)*factorial(l1+m1)*factorial(l2-m2)
*factorial(l2+... | false | false | false | false | false | 0 |
ctx_mpd_qcopy_abs(PyObject *context, PyObject *v)
{
PyObject *result, *a;
uint32_t status = 0;
CONVERT_OP_RAISE(&a, v, context);
result = dec_alloc();
if (result == NULL) {
Py_DECREF(a);
return NULL;
}
mpd_qcopy_abs(MPD(result), MPD(a), &status);
Py_DECREF(a);
if (... | false | false | false | false | false | 0 |
advance_aggregates(AggState *aggstate, AggStatePerGroup pergroup)
{
int aggno;
for (aggno = 0; aggno < aggstate->numaggs; aggno++)
{
AggStatePerAgg peraggstate = &aggstate->peragg[aggno];
AggStatePerGroup pergroupstate = &pergroup[aggno];
int nargs = peraggstate->numArguments;
int i;
TupleTableSlot ... | false | false | false | false | false | 0 |
c_parser_omp_clause_reduction (c_parser *parser, tree list)
{
location_t clause_loc = c_parser_peek_token (parser)->location;
if (c_parser_require (parser, CPP_OPEN_PAREN, "expected %<(%>"))
{
enum tree_code code;
switch (c_parser_peek_token (parser)->type)
{
case CPP_PLUS:
code = PLUS_EXPR;
... | false | false | false | false | false | 0 |
init_pollers()
{
int p;
struct poller *bp;
if ((fd_cache = (uint32_t *)calloc(1, sizeof(uint32_t) * global.maxsock)) == NULL)
goto fail_cache;
if ((fd_updt = (uint32_t *)calloc(1, sizeof(uint32_t) * global.maxsock)) == NULL)
goto fail_updt;
do {
bp = NULL;
for (p = 0; p < nbpollers; p++)
if (!bp || (... | false | true | false | false | false | 1 |
binder_transactions_show(struct seq_file *m, void *unused)
{
struct binder_proc *proc;
int do_lock = !binder_debug_no_lock;
if (do_lock)
binder_lock(__func__);
seq_puts(m, "binder transactions:\n");
hlist_for_each_entry(proc, &binder_procs, proc_node)
print_binder_proc(m, proc, 0);
if (do_lock)
binder_unl... | false | false | false | false | false | 0 |
parseAlign(char *s, xdot_align * ap)
{
int i;
s = parseInt(s, &i);
if (i < 0)
*ap = xd_left;
else if (i > 0)
*ap = xd_right;
else
*ap = xd_center;
return s;
} | false | false | false | false | false | 0 |
L46()
{register object *base=vs_base;
register object *sup=base+VM46; VC46
vs_check;
{object V155;
object V156;
object V157;
object V158;
object V159;
object V160;
object V161;
V155=(base[0]);
V156=(base[1]);
V157=(base[2]);
V158=(base[3]);
V159=(base[4]);
vs_base=vs_base+5;
if(vs_base>=vs_top){vs_top=s... | false | false | false | false | false | 0 |
throwIOException(JNIEnv *env, int errnum, const char *defaultDetail)
{
static const char * const format = "error=%d, %s";
const char *detail = defaultDetail;
char *errmsg;
if (errnum != 0) {
const char *s = strerror(errnum);
if (strcmp(s, "Unknown error") != 0)
detail = s;
... | false | false | true | false | true | 1 |
macb_init_rx_buffer_size(struct macb *bp, size_t size)
{
if (!macb_is_gem(bp)) {
bp->rx_buffer_size = MACB_RX_BUFFER_SIZE;
} else {
bp->rx_buffer_size = size;
if (bp->rx_buffer_size % RX_BUFFER_MULTIPLE) {
netdev_dbg(bp->dev,
"RX buffer must be multiple of %d bytes, expanding\n",
RX_BUFFER_M... | false | false | false | false | false | 0 |
snd_opl3_timer1_start(struct snd_timer * timer)
{
unsigned long flags;
unsigned char tmp;
unsigned int ticks;
struct snd_opl3 *opl3;
opl3 = snd_timer_chip(timer);
spin_lock_irqsave(&opl3->timer_lock, flags);
ticks = timer->sticks;
tmp = (opl3->timer_enable | OPL3_TIMER1_START) & ~OPL3_TIMER1_MASK;
opl3->timer... | false | false | false | false | false | 0 |
odf_gog_plot_area_check_position (GsfXMLIn *xin, xmlChar const **attrs, GSList **list)
{
gboolean b;
for (; attrs != NULL && attrs[0] && attrs[1] ; attrs += 2)
if (oo_attr_bool (xin, attrs, OO_GNUM_NS_EXT, "is-position-manual", &b))
*list = g_slist_prepend (*list, oo_prop_new_bool("is-plot-area-manual",
... | false | false | false | false | false | 0 |
esl_msa_Create(int nseq, int64_t alen)
{
int status;
ESL_MSA *msa;
int i;
msa = msa_create_mostly(nseq, alen); /* aseq is null upon successful return */
if (msa == NULL) return NULL; /* already threw error in msa_create_mostly, so percolate */
ESL_ALLOC(msa->aseq, sizeof(char *) * msa->sqalloc... | false | true | false | false | false | 1 |
Server_gotactivity(char *buf)
{
int bytes;
coderec *code;
/* Nothing? bail */
if(!buf[0])
return;
if(Server->cur == NULL)
{
Log_write(LOG_DEBUG,"*","Shit. Got activity on a server but cur is NULL!");
return;
}
/* First time we've seen activity from the server? */
if(Server->trying_server)
{
Log_wr... | false | false | false | false | false | 0 |
i2c_write(struct i2c_adapter *adap, u8 adr, u8 *data, int len)
{
struct i2c_msg msg = {.addr = adr, .flags = 0,
.buf = data, .len = len};
if (i2c_transfer(adap, &msg, 1) != 1) {
printk(KERN_ERR "tda18271c2dd: i2c write error at addr %i\n", adr);
return -1;
}
return 0;
} | false | false | false | false | false | 0 |
dblayer_init(struct ldbminfo *li)
{
/* Allocate memory we need, create mutexes etc. */
dblayer_private *priv = NULL;
int ret = 0;
PR_ASSERT(NULL != li);
if (NULL != li->li_dblayer_private)
{
return -1;
}
priv = (dblayer_private*) slapi_ch_calloc(1,sizeof(dblayer_private));
... | false | false | false | false | false | 0 |
Comparison_create(Comparison_Param *param,
Sequence *query, Sequence *target){
register Comparison *comparison = g_new(Comparison, 1);
g_assert(param);
g_assert(query);
g_assert(target);
comparison->ref_count = 1;
comparison->param = Comparison_Param_share(param);
... | 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.