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 |
|---|---|---|---|---|---|---|
raiseMaxNRows(Histogram * hist, double value) {
if (hist->max != hist->min) {
double ratio = (hist->max - hist->min) / (value - hist->min);
int row, column;
for (row = 0; row < hist->count; row++)
for (column = 1; column < hist->width; column++)
reassignColumnLeft(hist, ratio, column, row);
}
hist->max ... | false | false | false | false | false | 0 |
arizona_ldo1_hc_get_voltage_sel(struct regulator_dev *rdev)
{
struct arizona_ldo1 *ldo = rdev_get_drvdata(rdev);
struct regmap *regmap = ldo->arizona->regmap;
unsigned int val;
int ret;
ret = regmap_read(regmap, ARIZONA_LDO1_CONTROL_2, &val);
if (ret != 0)
return ret;
if (val & ARIZONA_LDO1_HI_PWR)
return ... | false | false | false | false | false | 0 |
afs_fs_remove(struct afs_server *server,
struct key *key,
struct afs_vnode *vnode,
const char *name,
bool isdir,
const struct afs_wait_mode *wait_mode)
{
struct afs_call *call;
size_t namesz, reqsz, padsz;
__be32 *bp;
_enter("");
namesz = strlen(name);
padsz = (4 - (namesz & 3)) & 3;
reqsz ... | false | true | false | false | false | 1 |
php_find_filter(long id) /* {{{ */
{
int i, size = sizeof(filter_list) / sizeof(filter_list_entry);
for (i = 0; i < size; ++i) {
if (filter_list[i].id == id) {
return filter_list[i];
}
}
/* Fallback to "string" filter */
for (i = 0; i < size; ++i) {
if (filter_list[i].id == FILTER_DEFAULT) {
return fi... | false | false | false | false | false | 0 |
ch_util_list_calibration (ChUtilPrivate *priv, gchar **values, GError **error)
{
gboolean ret;
gchar description[CH_CALIBRATION_DESCRIPTION_LEN];
gchar *tmp;
GError *error_local = NULL;
GString *string;
guint16 i;
guint8 types;
string = g_string_new ("");
for (i = 0; i < CH_CALIBRATION_MAX; i++) {
descripti... | false | false | false | false | false | 0 |
debug_help (const char *subcmd, size_t argc, char *const *const argv)
{
size_t len, i;
char *r, *p;
r = strdup ("Commands supported:");
if (!r) {
reply_with_perror ("strdup");
return NULL;
}
len = strlen (r);
for (i = 0; cmds[i].cmd != NULL; ++i) {
len += strlen (cmds[i].cmd) + 1; /* space +... | false | false | false | false | false | 0 |
DibReadBitmapInfo(CxFile* fh, BITMAPINFOHEADER *pdib)
{
if ((fh==NULL)||(pdib==NULL)) return false;
if (fh->Read(pdib,sizeof(BITMAPINFOHEADER),1)==0) return false;
bihtoh(pdib);
switch (pdib->biSize) // what type of bitmap info is this?
{
case sizeof(BITMAPINFOHEADER):
break;
cas... | false | false | false | false | false | 0 |
gst_gdk_pixbuf_sink_set_caps (GstBaseSink * basesink, GstCaps * caps)
{
GstGdkPixbufSink *sink = GST_GDK_PIXBUF_SINK (basesink);
GstVideoFormat fmt;
gint w, h, par_n, par_d;
GST_LOG_OBJECT (sink, "caps: %" GST_PTR_FORMAT, caps);
if (!gst_video_format_parse_caps (caps, &fmt, &w, &h)) {
GST_WARNING_OBJECT... | false | false | false | false | false | 0 |
on_resize_notify(HistogramImager *imager, GParamSpec *spec, HistogramView *self)
{
GdkRegion *old, *new;
GdkRectangle rect;
gtk_widget_set_size_request(GTK_WIDGET(self), imager->width, imager->height);
/* Since we're not letting gtk clear our widget for us for speed and unflickeriness,
* we need ... | false | false | false | false | false | 0 |
im_correct_cursor(int num_move_back)
{
char_u backkey[] = {CSI, 'k', 'l'};
if (State & NORMAL)
return;
# ifdef FEAT_RIGHTLEFT
if ((State & CMDLINE) == 0 && curwin != NULL && curwin->w_p_rl)
backkey[2] = 'r';
# endif
for (; num_move_back > 0; --num_move_back)
add_to_input_buf(backkey, (int)sizeof(b... | false | false | false | false | false | 0 |
eio_grp (eio_cb cb, void *data)
{
const int pri = EIO_PRI_MAX;
REQ (EIO_GROUP); SEND;
} | false | false | false | false | false | 0 |
update_eliminables (HARD_REG_SET *pset)
{
int previous_frame_pointer_needed = frame_pointer_needed;
struct elim_table *ep;
for (ep = reg_eliminate; ep < ®_eliminate[NUM_ELIMINABLE_REGS]; ep++)
if ((ep->from == HARD_FRAME_POINTER_REGNUM && FRAME_POINTER_REQUIRED)
#ifdef ELIMINABLE_REGS
|| ! CAN_ELIMINATE ... | false | false | false | false | false | 0 |
pyGcomprisUserType_getattr(pyGcomprisUserObject *self, char *name)
{
/* int */
if(strcmp(name,"user_id")==0) return Py_BuildValue("i", self->cdata->user_id);
/* int */
if(strcmp(name,"class_id")==0) return Py_BuildValue("i", self->cdata->class_id);
/* str */
if(strcmp(name,"login")==0) return Py... | false | false | false | false | false | 0 |
HTMLTRAccept(li, obj)
HTMLInfo li;
HTMLObject obj;
{
HTMLTagID tagid;
if (obj->type != HTML_ENV) return(false);
tagid = HTMLTagToID(obj->o.env->tag);
if (tagid != TAG_TD && tagid != TAG_TH) return(false);
return(true);
} | false | false | false | false | false | 0 |
_ml_P_FileSys_utime (ml_state_t *msp, ml_val_t arg)
{
ml_val_t path = REC_SEL(arg, 0);
time_t actime = REC_SELINT32(arg, 1);
time_t modtime = REC_SELINT32(arg, 2);
int sts;
if (actime == -1) {
sts = utime (STR_MLtoC(path), NIL(struct utimbuf *));
}
else {
... | false | false | false | false | false | 0 |
JoinIRCFunc( void *unused )
{
if(PLAYER_NAME_UNIQUE)
CL_InitIRC();
} | false | false | false | false | false | 0 |
write_uuid( const Partition & partition, OperationDetail & operationdetail )
{
return ! execute_command( "tune2fs -U random " + partition .get_path(), operationdetail ) ;
} | false | false | false | false | false | 0 |
XLogDumpCountRecord(XLogDumpConfig *config, XLogDumpStats *stats,
XLogReaderState *record)
{
RmgrId rmid;
uint8 recid;
uint32 rec_len;
uint32 fpi_len;
int block_id;
stats->count++;
rmid = XLogRecGetRmid(record);
rec_len = XLogRecGetDataLen(record) + SizeOfXLogRecord;
/*
* Calculate the amount o... | false | false | false | false | false | 0 |
rc_direct(
struct rc_dec *rc, uint32_t *dest, uint32_t limit)
{
uint32_t mask;
do {
rc_normalize(rc);
rc->range >>= 1;
rc->code -= rc->range;
mask = (uint32_t)0 - (rc->code >> 31);
rc->code += rc->range & mask;
*dest = (*dest << 1) + (mask + 1);
} while (--limit > 0);
} | false | false | false | false | false | 0 |
bonobo_dock_item_size_allocate (GtkWidget *widget,
GtkAllocation *allocation)
{
GtkBin *bin;
BonoboDockItem *di;
g_return_if_fail (widget != NULL);
g_return_if_fail (BONOBO_IS_DOCK_ITEM (widget));
g_return_if_fail (allocation != NULL);
bin = GTK_BIN (widget);
di = BONOBO_DOCK_ITEM (widget);
w... | false | false | false | false | false | 0 |
efx_remove_port(struct efx_nic *efx)
{
netif_dbg(efx, drv, efx->net_dev, "destroying port\n");
efx->type->remove_port(efx);
} | false | false | false | false | false | 0 |
coroutine_init(struct coroutine *co)
{
if (co->stack_size == 0)
co->stack_size = 16 << 20;
co->cc.stack_size = co->stack_size;
co->cc.stack = mmap(0, co->stack_size,
PROT_READ | PROT_WRITE,
MAP_PRIVATE | MAP_ANONYMOUS,
-1, 0);
... | false | false | false | false | false | 0 |
base64_decode_alloc (const char *in, size_t inlen, char **out,
size_t *outlen)
{
/* This may allocate a few bytes too much, depending on input,
but it's not worth the extra CPU time to compute the exact amount.
The exact amount is 3 * inlen / 4, minus 1 if the input ends
with "=" and minus anoth... | false | false | false | false | false | 0 |
xdndSrcSendEnter(DragSource *ds, Window dstWin, Window srcWin, Atom * typelist)
{
XEvent xevent;
int i;
unsigned long nTypes=0,tmpUL=0;
if (typelist != NULL) {
while (typelist[nTypes++]!=0); /*get typelist length*/
}
xevClientInit(&xevent,ds->display,dstWin,ds->atomSel->xdndEnter);
/* data.l[0] : X... | false | false | false | false | false | 0 |
process_assignment (gimple stmt, gimple_stmt_iterator call, tree *m,
tree *a, tree *ass_var)
{
tree op0, op1 = NULL_TREE, non_ass_var = NULL_TREE;
tree dest = gimple_assign_lhs (stmt);
enum tree_code code = gimple_assign_rhs_code (stmt);
enum gimple_rhs_class rhs_class = get_gimple_rhs_class (code);
tre... | false | false | false | false | false | 0 |
dump_ebitmap (FILE *file, ebitmap bmap)
{
unsigned int pos;
unsigned int i;
int res;
unsigned int size;
res = sbitmap_last_set_bit (bmap->wordmask);
if (res == -1)
size = 0;
else
size = (res + 1) * EBITMAP_ELT_BITS;
fprintf (file, "n_words = %d, set = {", bmap->numwords);
for (pos = 30, i =... | false | false | false | false | false | 0 |
smb2_print_status(__le32 status)
{
int idx = 0;
while (smb2_error_map_table[idx].status_string != NULL) {
if ((smb2_error_map_table[idx].smb2_status) == status) {
pr_notice("Status code returned 0x%08x %s\n", status,
smb2_error_map_table[idx].status_string);
}
idx++;
}
return;
} | false | false | false | false | false | 0 |
___sockaddr_to_SCMOBJ
___P((struct sockaddr *sa,
int salen,
int arg_num),
(sa,
salen,
arg_num)
struct sockaddr *sa;
int salen;
int arg_num;)
{
___SCMOBJ result;
result = ___make_vector (4, ___FAL, ___STILL);
if (___FIXNUMP(result))
return ___FIX(___CTOS_HEAP_OV... | false | false | false | false | false | 0 |
xfs_inode_ag_iterator_flags(
struct xfs_mount *mp,
int (*execute)(struct xfs_inode *ip, int flags,
void *args),
int flags,
void *args,
int iter_flags)
{
struct xfs_perag *pag;
int error = 0;
int last_error = 0;
xfs_agnumber_t ag;
ag = 0;
while ((pag = xfs_perag_get(mp, ag))) {
ag = pa... | false | false | false | false | false | 0 |
gigolo_backend_gvfs_get_volume_identifier(gpointer volume)
{
g_return_val_if_fail(volume != NULL, NULL);
return g_volume_get_identifier(G_VOLUME(volume), G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE);
} | false | false | false | false | false | 0 |
Plugin_AddHook(int type, PyObject *plugin, PyObject *callback,
PyObject *userdata, char *name, void *data)
{
Hook *hook = (Hook *) g_malloc(sizeof(Hook));
if (hook == NULL) {
PyErr_NoMemory();
return NULL;
}
hook->type = type;
hook->plugin = plugin;
Py_INCREF(callback);
hook->callback = callback;
Py... | false | false | false | false | false | 0 |
ucftp_destroy(struct avfs *avfs)
{
struct ucftpfs *fs = (struct ucftpfs *) avfs->data;
struct ucftpconn *conn;
struct ucftpconn *nextconn;
for(conn = fs->conns; conn != NULL; conn = nextconn) {
nextconn = conn->next;
ucftp_free_tree(conn->root);
av_unref_obj(conn->root);
... | false | false | false | false | false | 0 |
FnCallGrep(struct FnCall *fp,struct Rlist *finalargs)
{ char lval[CF_MAXVARSIZE];
char *name,*regex,scopeid[CF_MAXVARSIZE];
struct Rval rval,rval2;
struct Rlist *rp,*returnlist = NULL;
struct Scope *ptr;
/* begin fn specific content */
regex = finalargs->item;
name = finalargs->next->item;
/* Locate the arr... | false | false | false | false | false | 0 |
get_const_complex(float re, float im)
{
Const_table *cpt;
int max_entry = 0;
cpt = search_const_complex(re, im);
if (cpt ==NULL){
max_entry = get_max_const_entry();
cpt = alloc_const_table();
cpt->entry = max_entry + 1;
cpt->type = TYPE_COMPLEX;
cpt->val.... | false | false | false | false | false | 0 |
get_next_extent(struct inode *inode)
{
/* The logical start address that we care about... */
uint32_t lstart = inode->this_extent.lstart + inode->this_extent.len;
if (inode->fs->fs_ops->next_extent(inode, lstart))
inode->next_extent.len = 0; /* ERROR */
inode->next_extent.lstart = lstart;
dprintf... | false | false | false | false | false | 0 |
Function(const vector<string>& args)
{
if(!AssertArgument(args, 2)) return("");
string word = args[1];
for(unsigned int i=2;i<args.size();i++) word+=string(" ")+args[i];
return(Engine->Parse(word));
} | false | false | false | false | false | 0 |
CDB___lock_set_lk_conflicts(dbenv, lk_conflicts, lk_modes)
DB_ENV *dbenv;
u_int8_t *lk_conflicts;
int lk_modes;
{
int ret;
ENV_ILLEGAL_AFTER_OPEN(dbenv, "set_lk_conflicts");
if (dbenv->lk_conflicts != NULL) {
CDB___os_free(dbenv->lk_conflicts,
dbenv->lk_modes * dbenv->lk_modes);
dbenv->lk_conflicts = ... | false | false | false | false | false | 0 |
radio_s_tuner(struct file *file, void *priv,
const struct v4l2_tuner *t)
{
struct em28xx *dev = video_drvdata(file);
if (0 != t->index)
return -EINVAL;
v4l2_device_call_all(&dev->v4l2->v4l2_dev, 0, tuner, s_tuner, t);
return 0;
} | false | false | false | false | false | 0 |
GWEN_DBIO_XmlDb_Export(GWEN_DBIO *dbio,
GWEN_SYNCIO *sio,
GWEN_DB_NODE *data,
GWEN_DB_NODE *cfg,
uint32_t flags) {
GWEN_XMLNODE *root;
GWEN_XMLNODE *nh;
int rv;
const char *rootName=0;
GWEN_XML_CONTEXT *ctx;
if (cfg)
rootName=GWEN_DB_GetCharValue(cfg, "rootElement", 0, 0);
ro... | false | false | false | false | false | 0 |
inet_global_toip(lua_State *L)
{
const char *address = luaL_checkstring(L, 1);
struct hostent *hp = NULL;
int err = inet_gethost(address, &hp);
if (err != IO_DONE) {
lua_pushnil(L);
lua_pushstring(L, socket_hoststrerror(err));
return 2;
}
lua_pushstring(L, inet_ntoa(*((st... | false | false | false | false | false | 0 |
_rtl8821ae_phy_get_ratesection_intxpower_byrate(u8 path, u8 rate)
{
char rate_section = 0;
switch (rate) {
case DESC_RATE1M:
case DESC_RATE2M:
case DESC_RATE5_5M:
case DESC_RATE11M:
rate_section = 0;
break;
case DESC_RATE6M:
case DESC_RATE9M:
case DESC_RATE12M:
case DESC_RATE18M:
rate_section = 1;
bre... | false | false | false | false | false | 0 |
enic_flow_may_expire(unsigned long data)
{
struct enic *enic = (struct enic *)data;
bool res;
int j;
spin_lock_bh(&enic->rfs_h.lock);
for (j = 0; j < ENIC_CLSF_EXPIRE_COUNT; j++) {
struct hlist_head *hhead;
struct hlist_node *tmp;
struct enic_rfs_fltr_node *n;
hhead = &enic->rfs_h.ht_head[enic->rfs_h.toc... | false | false | false | false | false | 0 |
addto_menu(const char* men, const char* item, const char* comm)
/* Adds an item to a menu */
{
int n = find_menu(men);
if (n<0) { create_menu(men); n = find_menu(men); }
if (menus[n].numb == 9) return;
strcpy(menus[n].iname[menus[n].numb],item);
strcpy(menus[n].icommand[menus[n].numb],comm);
menus[n].numb++... | false | false | false | false | false | 0 |
gdl_dock_notebook_add (GtkContainer *container,
GtkWidget *widget)
{
g_return_if_fail (container != NULL && widget != NULL);
g_return_if_fail (GDL_IS_DOCK_NOTEBOOK (container));
g_return_if_fail (GDL_IS_DOCK_ITEM (widget));
gdl_dock_object_dock (GDL_DOCK_OBJECT (container),
... | false | false | false | false | false | 0 |
_vala_unity_preview_action_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
UnityPreviewAction * self;
self = G_TYPE_CHECK_INSTANCE_CAST (object, UNITY_TYPE_PREVIEW_ACTION, UnityPreviewAction);
switch (property_id) {
case UNITY_PREVIEW_ACTION_ID:
g_value_set_string (value,... | false | false | false | false | false | 0 |
analog_send_callerid(struct analog_pvt *p, int cwcid, struct ast_party_caller *caller)
{
ast_debug(1, "Sending callerid. CID_NAME: '%s' CID_NUM: '%s'\n",
caller->id.name.str,
caller->id.number.str);
if (cwcid) {
p->callwaitcas = 0;
}
if (analog_callbacks.send_callerid) {
return analog_callbacks.send_call... | false | false | false | false | false | 0 |
totem_get_plugin_paths (void)
{
GPtrArray *paths;
char *path;
GSettings *settings;
gboolean uninstalled;
paths = g_ptr_array_new ();
uninstalled = FALSE;
#ifdef TOTEM_RUN_IN_SOURCE_TREE
path = g_build_filename (UNINSTALLED_PLUGINS_LOCATION, NULL);
if (g_file_test (path, G_FILE_TEST_IS_DIR) != FALSE) {
unin... | false | false | false | false | false | 0 |
minus_o(char *name, int val)
{
int i;
if (name == NULL) {
if (val) {
out1str("Current option settings\n");
for (i = 0; i < NOPTS; i++)
out1fmt("%-16s%s\n", optnames[i],
optlist[i] ? "on" : "off");
} else {
for (i = 0; i < NOPTS; i++)
out1fmt("set %s %s\n",
optlist[i] ? "-o" : "+o",
... | false | false | false | false | false | 0 |
getHangulDecomposition(uint32_t c, Norm *pHangulNorm, uint32_t hangulBuffer[3]) {
/* Hangul syllable: decompose algorithmically */
uint32_t c2;
uint8_t length;
uprv_memset(pHangulNorm, 0, sizeof(Norm));
c-=HANGUL_BASE;
c2=c%JAMO_T_COUNT;
c/=JAMO_T_COUNT;
if(c2>0) {
hangulBuffe... | false | false | false | false | false | 0 |
afficheProbleme() const {
string resultat;
stringstream flux;
//affichage du tirage dans la chaine resultat
flux << tirage_etudie;
flux >> resultat;
return resultat;
} | false | false | false | false | false | 0 |
finish_transfer ()
{
if (transfer_active_)
{
stream_type* old_stream = dynamic_cast<stream_type*> (this->in_data_stream_.set_stream (0));
if (old_stream)
{
// decrease ref count to 1
const_cast<connection_type&> (old_stream->s... | false | false | false | false | false | 0 |
createImage(String /*name*/, const XmlAttributes &attr,
Bitmap bitmap)
{
return new Image(attr, bitmap);
} | false | false | false | false | false | 0 |
scc_comparison_operator (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
{
return (branch_comparison_operator (op, mode)) && (GET_CODE (op) == EQ || GET_CODE (op) == LT || GET_CODE (op) == GT || GET_CODE (op) == LTU || GET_CODE (op) == GTU || GET_CODE (op) == UNORDERED);
} | false | false | false | false | false | 0 |
ascii_strcase_hash(const void *key)
{
const uchar *s = key;
ulong c, hash = 0;
while ((c = ascii_tolower(*s++))) {
hash += (hash << 5) + c;
}
return integer_hash(hash);
} | false | false | false | false | false | 0 |
gf_isom_delete_movie(GF_ISOFile *mov)
{
//these are our two main files
if (mov->movieFileMap) gf_isom_datamap_del(mov->movieFileMap);
#ifndef GPAC_DISABLE_ISOM_WRITE
if (mov->editFileMap) {
gf_isom_datamap_del(mov->editFileMap);
}
if (mov->finalName) gf_free(mov->finalName);
#endif
gf_isom_box_array_del(mov->... | false | false | false | false | false | 0 |
AdjustFormants(frame_t *fr, int target, int min, int max, int f1_adj, int f3_adj, int hf_reduce, int flags)
{//====================================================================================================================
int x;
//hf_reduce = 70; // ?? using fixed amount rather than the parameter??
targe... | false | false | false | false | false | 0 |
gnutls_x509_rdn_get_by_oid (const gnutls_datum_t * idn, const char *oid,
int indx, unsigned int raw_flag,
void *buf, size_t * sizeof_buf)
{
int result;
ASN1_TYPE dn = ASN1_TYPE_EMPTY;
if (sizeof_buf == 0)
{
return GNUTLS_E_INVALID_REQUEST;
}
... | false | false | false | false | false | 0 |
search_word_backward(const Arg *arg) {
size_t pos = window_cursor_get(vis->win->win);
char *word = get_word_under_cursor();
if (word && !text_regex_compile(vis->search_pattern, word, REG_EXTENDED))
pos = text_search_backward(vis->win->text->data, pos, vis->search_pattern);
free(word);
return pos;
} | false | false | false | false | false | 0 |
synchronizeDocStart(unsigned int& startPos,
int &length,
int &initStyle,
Accessor &styler,
bool skipWhiteSpace=false) {
styler.Flush();
int style = actual_style(styler.StyleAt(startPo... | false | false | false | false | false | 0 |
_sol_retransmission_timeout (ipmiconsole_ctx_t c, int *dont_deactivate_flag)
{
struct timeval current;
struct timeval timeout;
assert (c);
assert (c->magic == IPMICONSOLE_CTX_MAGIC);
assert (c->session.protocol_state == IPMICONSOLE_PROTOCOL_STATE_SOL_SESSION);
assert (dont_deactivate_flag);
(*dont_deact... | false | false | false | false | false | 0 |
setup(void) {
XSetWindowAttributes wa;
/* clean up any zombies immediately */
sigchld(0);
/* init screen */
screen = DefaultScreen(dpy);
root = RootWindow(dpy, screen);
initfont(font);
sw = DisplayWidth(dpy, screen);
sh = DisplayHeight(dpy, screen);
bh = dc.h = dc.font.height + 2;
updategeom();
/* init at... | false | false | false | false | false | 0 |
update_file_flags(const unsigned char *sha,
unsigned mode,
const char *path,
int update_cache,
int update_wd)
{
if (index_only)
update_wd = 0;
if (update_wd) {
enum object_type type;
void *buf;
unsigned long size;
if (S_ISGITLINK(mode))
die("cannot read object %s '%s... | false | false | false | false | true | 1 |
gf_mem_acct_enable_set ()
{
#ifdef DEBUG
gf_mem_acct_enable = 1;
return;
#endif
glusterfs_ctx_t *ctx = NULL;
char *opt = NULL;
long val = -1;
gf_mem_acct_enable = 0;
ctx = glusterfs_ctx_get ();
if (ctx->mem_accounting) {
... | false | false | false | false | false | 0 |
iterative_map_start_calculation (IterativeMap *self)
{
if (self->idle_handler)
return;
self->idle_handler = g_idle_add(iterative_map_idle_handler, self);
g_signal_emit(G_OBJECT(self), iterative_map_signals[CALCULATION_START_SIGNAL], 0);
} | false | false | false | false | false | 0 |
iv_elimination_compare_lt (struct ivopts_data *data,
struct iv_cand *cand, enum tree_code *comp_p,
struct tree_niter_desc *niter)
{
tree cand_type, a, b, mbz, nit_type = TREE_TYPE (niter->niter), offset;
struct affine_tree_combination nit, tmpa, tmpb;
enum tree_code comp;
HOST_W... | false | false | false | false | false | 0 |
cifs_atomic_open(struct inode *inode, struct dentry *direntry,
struct file *file, unsigned oflags, umode_t mode,
int *opened)
{
int rc;
unsigned int xid;
struct tcon_link *tlink;
struct cifs_tcon *tcon;
struct TCP_Server_Info *server;
struct cifs_fid fid;
struct cifs_pending_open open;
__u32 oplock;
stru... | false | false | false | false | false | 0 |
_mesa_ProgramStringARB(GLenum target, GLenum format, GLsizei len,
const GLvoid *string)
{
struct gl_program *base;
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, _NEW_PROGRAM);
if (!ctx->Extensions.ARB_vertex_program
&& !ctx->Extensions.ARB_fragment_program) {
_mesa_erro... | false | false | false | false | false | 0 |
iovec_copy_out( struct pfs_process *p, char *buf, struct pfs_kernel_iovec *v, int count )
{
int i, pos=0;
for(i=0;i<count;i++) {
tracer_copy_out(p->tracer,&buf[pos],(void*)(UPTRINT_T)v[i].iov_base,v[i].iov_len);
pos += v[i].iov_len;
}
return pos;
} | false | false | false | false | false | 0 |
sphere_npcs_set (gint n, GGobiData * d, ggobid * gg)
{
d->sphere.npcs = n;
if (!scree_mapped_p (gg)) {
return;
}
if (d->sphere.npcs < 1) {
quick_message ("Need to choose at least 1 PC.", false);
sphere_enable (false, gg);
}
else if (d->sphere.npcs > d->sphere.vars.nels) {
gchar *msg = g_st... | false | false | false | false | false | 0 |
fv_text_handle_widget_draw (GtkWidget * /*widget*/,
cairo_t *cr,
FvTextHandle *handle)
{
FvTextHandlePrivate *priv;
FvTextHandlePosition pos;
priv = handle->priv;
if (!priv->realized)
return FALSE;
if (gtk_cairo_should_draw_window (cr, pri... | false | false | false | false | false | 0 |
qla83xx_minidump_process_pollrd(struct scsi_qla_host *ha,
struct qla8xxx_minidump_entry_hdr *entry_hdr,
uint32_t **d_ptr)
{
uint32_t r_addr, s_addr, s_value, r_value, poll_wait, poll_mask;
uint16_t s_stride, i;
uint32_t *data_ptr = *d_ptr;
uint32_t rval = QLA_SUCCESS;
struct qla83xx_minidump_entry_pollrd *... | false | false | false | false | false | 0 |
unset_tz(struct set_tz_save savetz)
{
/* restore the original TZ environment */
char* orig_tzid = savetz.orig_tzid;
if(orig_tzid!=0){
size_t tmp_sz =strlen(orig_tzid)+4;
char* orig_env_str = (char*)malloc(tmp_sz);
if(orig_env_str == 0){
icalerror_set_errno(ICAL_NEWFAILED_ERROR);
... | false | false | false | false | false | 0 |
ompcbe_ddsche_unset_lock_var_list()
{
List *li;
for (li = lock_var_list; li != NULL; li = li->next) {
Lock_var_info *info = (Lock_var_info *)li->data;
list_free(info->lock_name_list);
}
list_free(lock_var_list);
} | false | false | false | false | false | 0 |
ganv_module_set_property(GObject* object,
guint prop_id,
const GValue* value,
GParamSpec* pspec)
{
g_return_if_fail(object != NULL);
g_return_if_fail(GANV_IS_MODULE(object));
switch (prop_id) {
default:
G_OBJECT_WARN_INVALI... | false | false | false | false | false | 0 |
CPRO_gethalfmaximum(long column,float maximum,float firsttoreach,
char transversion,unsigned char which_statistic,char mode)
{
float equal,ingroup,interest;
float interval,sum;
float halfmax=0.0;
long res;
for(res=0;res<CPRO.result[which_statistic].resolution;res++)
{
... | false | false | false | false | false | 0 |
Fkey( char *rule, int computation, int k )
#else
Fkey( rule, computation, k )
char *rule;
int computation;
int k;
#endif
{
static char key[MaxRuleName+2+2+1]; /* MR10 */
int i;
if ( k > 99 ) /* MR10 */
fatal("k>99 is too big fo... | false | false | false | false | true | 1 |
pendb()
{
if (label != NUL_PTR)
labelerror(ILLAB);
if (blocklevel == 0)
error(ENDBBAD);
else
{
register struct block_s *blockp;
blockp = blockstak;
lcdata = blockp->data;
dirpag = blockp->dp;
accumulate_rmb(blockp->lc - lc);
lc = blockp->lc;
--blocklevel;
blockstak = blockp + 1;
}
} | false | false | false | false | false | 0 |
gst_mss_stream_reload_fragments (GstMssStream * stream, xmlNodePtr streamIndex)
{
xmlNodePtr iter;
GList *new_fragments = NULL;
GstMssStreamFragment *previous_fragment = NULL;
GstMssStreamFragment *current_fragment =
stream->current_fragment ? stream->current_fragment->data : NULL;
guint64 current_time ... | false | false | false | false | false | 0 |
intrDispatch(int interrupt, void *siginfo, void *context)
{
/*
* Assumptions:
* - Each interrupt only has one priority level associated with
* it.
* - Each handler will do enough work so that when it returns
* the source of the interrupt is masked.
*/
handler_entry_t *entry... | false | false | false | false | false | 0 |
logwtmp (const char *line, const char *name, const char *host)
{
struct utmp ut, *utp;
pid_t mypid = getpid();
#if __GLIBC__ < 2
int wtmp;
#endif
/*
* Update the signon database for users.
* Christoph Lameter: Copied from poeigl-1.36 Jan 3, 1996
*/
utmpname(_PATH_UTMP);
setutent();
while... | false | true | false | false | true | 1 |
IBuildOverviews( const char *pszResampling,
int nOverviews, int *panOverviewList,
int nListBands, int *panBandList,
GDALProgressFunc pfnProgress,
void * pProgressData )
... | false | false | false | false | false | 0 |
AVCE00ReadGotoSectionE00(AVCE00ReadE00Ptr psRead,
AVCE00Section *psSect, GBool bContinue)
{
int iSect;
GBool bFound = FALSE;
CPLErrorReset();
/*-----------------------------------------------------------------
* Locate the requested section in the array.
*----------------------... | false | false | false | false | false | 0 |
owl_proper_eye(int pos)
{
ASSERT_ON_BOARD1(pos);
return ((current_owl_data->my_eye[pos].color
== current_owl_data->color)
&& !current_owl_data->my_eye[pos].marginal);
} | false | false | false | false | false | 0 |
ch_util_take_readings (ChUtilPrivate *priv, gchar **values, GError **error)
{
CdColorRGB value;
gboolean ret;
guint16 integral_time = 0;
/* get from HW */
ch_device_queue_set_multiplier (priv->device_queue,
priv->device,
CH_FREQ_SCALE_100);
ch_device_queue_get_integral_time (priv->device_queue,
... | false | false | false | false | false | 0 |
AddLoop(DepIterator D)
{
if (LoopCount < 0 || LoopCount >= 20)
return false;
// Skip dups
if (LoopCount != 0)
{
if (Loops[LoopCount - 1].ParentPkg() == D.ParentPkg() ||
Loops[LoopCount - 1].TargetPkg() == D.ParentPkg())
return true;
}
Loops[LoopCount++] = D;
// Mark t... | false | false | false | false | false | 0 |
check_assign(ast_assign*a) {
bool okay;
int l = a->get_line();
int c = a->get_col();
int summary_lhs;
if (a->is_target_scalar()) {
okay = check_assign_lhs_rhs(a->get_lhs_scala(), a->get_rhs(), l, c);
summary_lhs = a->get_lhs_scala()->getTypeSummary();
... | false | false | false | false | false | 0 |
work_on_cpu(int cpu, long (*fn)(void *), void *arg)
{
struct work_for_cpu wfc = { .fn = fn, .arg = arg };
INIT_WORK_ONSTACK(&wfc.work, work_for_cpu_fn);
schedule_work_on(cpu, &wfc.work);
flush_work(&wfc.work);
destroy_work_on_stack(&wfc.work);
return wfc.ret;
} | false | false | false | false | false | 0 |
herror(const char *s) {
struct iovec iov[4], *v = iov;
if (s != NULL && *s != '\0') {
v->iov_base = (/*noconst*/ char *)s;
v->iov_len = strlen(s);
v++;
v->iov_base = ": ";
v->iov_len = 2;
v++;
}
v->iov_base = (char *)hstrerror(h_errno);
v->iov_len = strlen(v->iov_base);
v++;
v->iov_base = "\n";
v->... | false | false | false | false | false | 0 |
raid5_set_cache_size(struct mddev *mddev, int size)
{
struct r5conf *conf = mddev->private;
int err;
if (size <= 16 || size > 32768)
return -EINVAL;
conf->min_nr_stripes = size;
mutex_lock(&conf->cache_size_mutex);
while (size < conf->max_nr_stripes &&
drop_one_stripe(conf))
;
mutex_unlock(&conf->c... | false | false | false | false | false | 0 |
istgt_add_initiator_group(ISTGT_Ptr istgt, CF_SECTION *sp)
{
const char *val;
int alloc_len;
int idx;
int names;
int masks;
int i;
ISTGT_TRACELOG(ISTGT_TRACE_DEBUG, "add initiator group %d\n", sp->num);
val = istgt_get_val(sp, "Comment");
if (val != NULL) {
ISTGT_TRACELOG(ISTGT_TRACE_DEBUG, "Comment %s\n",... | false | false | false | false | false | 0 |
doReplace(int32_t start,
int32_t length,
const UChar *srcChars,
int32_t srcStart,
int32_t srcLength)
{
if(!isWritable()) {
return *this;
}
int32_t oldLength = this->length();
// optimize (read-only alias).remove(0, start) and .remove(start, end)
if((fF... | false | false | false | false | false | 0 |
java_gimplify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p)
{
enum tree_code code = TREE_CODE (*expr_p);
switch (code)
{
case BLOCK:
*expr_p = java_gimplify_block (*expr_p);
break;
case MODIFY_EXPR:
return java_gimplify_modify_expr (expr_p);
case POSTINCREMENT_EXPR:... | false | false | false | false | false | 0 |
utest_OpenFile(const char *tmpfile, int nlines)
{
char msg[] = "utest_OpenFile failed";
ESL_BUFFER *bf;
/* Normal errors */
if (esl_buffer_OpenFile("esltmpXYZXYZXYZ", &bf) != eslENOTFOUND || bf == NULL) esl_fatal(msg); else esl_buffer_Close(bf);
} | false | false | false | false | true | 1 |
gst_matroska_mux_finalize (GObject * object)
{
GstMatroskaMux *mux = GST_MATROSKA_MUX (object);
gst_event_replace (&mux->force_key_unit_event, NULL);
gst_object_unref (mux->collect);
gst_object_unref (mux->ebml_write);
if (mux->writing_app)
g_free (mux->writing_app);
G_OBJECT_CLASS (parent_class)->fi... | false | false | false | false | false | 0 |
pk_task_get_depends_sync (PkTask *task, PkBitfield filters, gchar **package_ids, gboolean recursive, GCancellable *cancellable,
PkProgressCallback progress_callback, gpointer progress_user_data,
GError **error)
{
PkTaskHelper *helper;
PkResults *results;
g_return_val_if_fail (PK_IS_TASK (task), NULL);
g_... | false | false | false | false | false | 0 |
merge_images (int type)
{
gint i, filecount, img;
/* struct l_image_info *images; */
gerbv_image_t *out;
struct l_image_info {
gerbv_image_t *image;
gerbv_user_transformation_t *transform;
}*images;
images=(struct l_image_info *)g_new0(struct l_image_info,1);
out=NULL;
switch(type){
case CALLBACKS_SAVE_F... | false | false | false | false | false | 0 |
lookup_closest_ok(nlookup_t *nl)
{
patricia_iter_t *iter;
int i = 0;
bool enough = TRUE;
knode_t *kn = NULL;
lookup_check(nl);
/*
* If the path length is less than the desired amount of nodes, then
* we can't have the k-closest nodes already.
*/
if (patricia_count(nl->path) < UNSIGNED(nl->amount))
ret... | false | false | false | false | false | 0 |
_redisCmd_genMultiBulk (RedisCmd *cmd)
{
bstr_t *args;
int rc, i;
args = cmd->args;
rc = bstr_asprintf(&cmd->protocolString, "*%d\r\n", cmd->argsCount);
if (rc < 0)
{
_redis_setMallocError();
return NULL;
}
for (i=0; i < cmd->argsCount; i++)
{
rc = bstr_scatprintf(&cmd->protocolStrin... | false | false | false | true | false | 1 |
meta_theme_define_float_constant (MetaTheme *theme,
const char *name,
double value,
GError **error)
{
double *d;
if (theme->float_constants == NULL)
theme->float_constants = g_hash_table_new_ful... | false | false | false | false | false | 0 |
free_rule (struct rule * rule)
{
XFREE (rule->word);
if (rule->regex)
{
regfree (rule->regex);
free (rule->regex);
}
da_free (rule->rhs, (da_map_func_t) faced_string_free);
free (rule);
} | 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.