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 |
|---|---|---|---|---|---|---|
posix_setsid(PyObject *self, PyObject *noargs)
{
if (setsid() < 0)
return posix_error();
Py_INCREF(Py_None);
return Py_None;
} | false | false | false | false | false | 0 |
onCmdDragged(FXObject*sender,FXSelector,void*ptr){
FXWindow * window = (FXWindow*)sender;
FXEvent* event=(FXEvent*)ptr;
FXDragAction action=DRAG_COPY;
if(event->state&ALTMASK) action=DRAG_LINK;
window->handleDrag(event->root_x,event->root_y,action);
action=window->didAccept();
if (window->didAccept()!=DRA... | false | false | false | false | false | 0 |
get_float(const OPDBlock *header,
guint nblocks,
const gchar *name,
gdouble *value,
GError **error)
{
const guchar *p;
guint i;
if ((i = find_block(header, nblocks, name)) == nblocks) {
err_MISSING_FIELD(error, name);
return FALSE;
}
if (heade... | false | false | false | false | false | 0 |
create_socket(char *name)
{
int s;
struct sockaddr_un sockun;
s = socket(PF_UNIX, SOCK_STREAM, 0);
if (s < 0)
return -1;
sockun.sun_family = AF_UNIX;
strcpy(sockun.sun_path, name);
if (bind(s, (struct sockaddr*)&sockun, sizeof(sockun)) < 0)
{
close(s);
return -1;
}
if (listen(s, 128) < 0)
{
close(s)... | false | false | false | false | false | 0 |
mono_get_optimizations_for_method (MonoMethod *method, guint32 default_opt)
{
g_assert (method);
if (!mono_do_single_method_regression)
return default_opt;
if (!mono_current_single_method) {
if (!mono_single_method_hash)
mono_single_method_hash = g_hash_table_new (g_direct_hash, g_direct_equal);
if (!g_has... | false | false | false | false | false | 0 |
__col_newparamrhsexpr(void)
{
int32 parlevel, catlevel;
struct expr_t *ndp;
__last_xtk = -1;
ndp = __alloc_exprnd();
ndp->optyp = LPAR;
for (parlevel = 0, catlevel = 0;;)
{
switch ((byte) __toktyp) {
case LPAR: parlevel++; break;
case RPAR: parlevel--; break;
case LCB: catlevel++; break;
ca... | false | false | false | false | false | 0 |
iter_do_var(GelCtx *ctx, GelETree *n, GelEFunc *f)
{
if(f->type == GEL_VARIABLE_FUNC) {
D_ENSURE_USER_BODY (f);
copyreplacenode(n,f->data.user);
} else if(f->type == GEL_USER_FUNC) {
D_ENSURE_USER_BODY (f);
freetree_full(n,TRUE,FALSE);
n->type = GEL_FUNCTION_NODE;
/* FIXME: are we ok with passing the tok... | false | false | false | false | false | 0 |
i40e_vsi_free_irq(struct i40e_vsi *vsi)
{
struct i40e_pf *pf = vsi->back;
struct i40e_hw *hw = &pf->hw;
int base = vsi->base_vector;
u32 val, qp;
int i;
if (pf->flags & I40E_FLAG_MSIX_ENABLED) {
if (!vsi->q_vectors)
return;
if (!vsi->irqs_ready)
return;
vsi->irqs_ready = false;
for (i = 0; i < vs... | false | false | false | false | false | 0 |
ndmca_tt_basic_getstate (struct ndm_session *sess)
{
int rc;
ndmca_test_phase (sess, "T-BGS", "Tape Get State Basics");
rc = ndmca_test_tape_get_state (sess, NDMP9_DEV_NOT_OPEN_ERR);
if (rc) return rc;
rc = ndmca_test_tape_open(sess,NDMP9_NO_ERR,0,NDMP9_TAPE_READ_MODE);
if (rc) return rc;
rc = ndmca_test_ta... | false | false | false | false | false | 0 |
snd_pcm_shm_dump(snd_pcm_t *pcm, snd_output_t *out)
{
snd_output_printf(out, "Shm PCM\n");
if (pcm->setup) {
snd_output_printf(out, "Its setup is:\n");
snd_pcm_dump_setup(pcm, out);
}
} | false | false | false | false | false | 0 |
acdArgsScan(ajint argc, char * const argv[])
{
ajint i;
char* cp;
for(i=0; i < argc; i++)
{
cp = argv[i];
if(*cp && strchr("-/", *cp)) /* first character vs. qualifier starts */
{
cp++;
if(*cp == '-') /* allow --qualifier */
cp++;
}
else
continue;
if(!*cp)
continue;
... | false | false | false | false | false | 0 |
load_profile_to_callback(pTHX_ NYTP_file in, SV *cb)
{
Loader_state_callback state;
int i;
HV *cb_hv = NULL;
CV *default_cb = NULL;
if (SvTYPE(cb) == SVt_PVHV) {
/* A default callback is stored with an empty key. */
SV **svp;
cb_hv = (HV *)cb;
svp = hv_fetch(cb_hv,... | false | false | false | false | false | 0 |
pfx_chk (const char * word, int len, struct affent* ep, int num)
{
struct affent * aent;
int cond;
int tlen;
struct hentry * hent;
unsigned char * cp;
int i;
char tword[MAX_WD_LEN];
for (aent = ep, i = num; i > 0; aent++, i--) {
tlen = len - aent->appndl;
if (tlen ... | false | false | false | false | false | 0 |
rule_rhs_print (rule const *r, FILE *out)
{
if (0 <= *r->rhs)
{
item_number *rp;
for (rp = r->rhs; *rp >= 0; rp++)
fprintf (out, " %s", symbols[*rp]->tag);
}
else
fputs (" %empty", out);
} | false | false | false | false | false | 0 |
_PyLong_FormatAdvancedWriter(_PyUnicodeWriter *writer,
PyObject *obj,
PyObject *format_spec,
Py_ssize_t start, Py_ssize_t end)
{
PyObject *tmp = NULL, *str = NULL;
InternalFormatSpec format;
int result = -1;
/* check... | false | false | false | false | false | 0 |
FreeWadLevel(level_t *level)
{
while (level->children)
{
lump_t *head = level->children;
level->children = head->next;
// the ol' recursion trick... :)
FreeLump(head);
}
UtilFree(level);
} | false | false | false | false | false | 0 |
get_out_name(GLEFileLocation* inname, CmdLineObj& cmdline, GLEFileLocation* outname) {
if (cmdline.hasOption(GLE_OPT_OUTPUT)) {
const string& o_file = cmdline.getOptionString(GLE_OPT_OUTPUT);
if (str_i_equals(o_file, "STDOUT")) {
outname->createStdout();
} else {
if (str_i_ends_with(o_file, ".ps")) force_... | false | false | false | false | false | 0 |
defaultName(string path)
{
string::iterator b, e, c;
b=path.begin();
e=path.end();
c=b;
while (b != e)
if (*b++ == '/')
c=b;
path=string(c, e);
char *p=libmail_u_convert_tobuf(path.c_str(),
unicode_x_imap_modutf7,
unicode_default_chset(),
NULL);
if (p)
{
try {
path=p;
free(p);
... | false | false | false | false | false | 0 |
vxge_rem_msix_isr(struct vxgedev *vdev)
{
int intr_cnt;
for (intr_cnt = 0; intr_cnt < (vdev->no_of_vpath * 2 + 1);
intr_cnt++) {
if (vdev->vxge_entries[intr_cnt].in_use) {
synchronize_irq(vdev->entries[intr_cnt].vector);
free_irq(vdev->entries[intr_cnt].vector,
vdev->vxge_entries[intr_cnt].arg);
vde... | false | false | false | false | false | 0 |
GetAbstractArray(const char *arrayName, int &index)
{
int i;
const char *name;
index = -1;
if (!arrayName)
{
return NULL;
}
for (i=0; i < this->GetNumberOfArrays(); i++)
{
name = this->GetArrayName(i);
if ( name && !strcmp(name,arrayName) )
{
index = i;
return this->G... | false | false | false | false | false | 0 |
gt_contigs_writer_delete(GtContigsWriter *contigs_writer)
{
if (contigs_writer == NULL)
return;
GT_FREEARRAY(&contigs_writer->contig, char);
gt_str_delete(contigs_writer->contig_desc);
gt_str_delete(contigs_writer->path_desc);
gt_assembly_stats_calculator_delete(contigs_writer->asc);
gt_encseq_reader_de... | false | false | false | false | false | 0 |
Translate(double *p1, double *p2)
{
//Get the motion vector
double v[3];
v[0] = p2[0] - p1[0];
v[1] = p2[1] - p1[1];
v[2] = p2[2] - p1[2];
//int res = this->PlaneSource->GetXResolution();
double *o = this->PlaneSource->GetOrigin();
double *pt1 = this->PlaneSource->GetPoint1();
double *pt2 = this->P... | false | false | false | false | false | 0 |
via_checksum(struct via_metadata *v)
{
uint8_t i = 50, cs = 0;
while (i--)
cs += ((uint8_t*) v)[i];
return cs;
} | false | false | false | false | false | 0 |
set_mii_flow_control(struct velocity_info *vptr)
{
/*Enable or Disable PAUSE in ANAR */
switch (vptr->options.flow_cntl) {
case FLOW_CNTL_TX:
MII_REG_BITS_OFF(ADVERTISE_PAUSE_CAP, MII_ADVERTISE, vptr->mac_regs);
MII_REG_BITS_ON(ADVERTISE_PAUSE_ASYM, MII_ADVERTISE, vptr->mac_regs);
break;
case FLOW_CNTL_RX:
... | false | false | false | false | false | 0 |
_wrap_SwigPyIterator_decr(PyObject *self, PyObject *args) {
int argc;
PyObject *argv[3];
int ii;
if (!PyTuple_Check(args)) SWIG_fail;
argc = args ? (int)PyObject_Length(args) : 0;
for (ii = 0; (ii < 2) && (ii < argc); ii++) {
argv[ii] = PyTuple_GET_ITEM(args,ii);
}
if (argc == 1) {
int _v;
... | false | false | false | false | false | 0 |
_dlist_element_remove_all (DList * list)
{
DListElement * tmp = list->head;
while (tmp) {
DListElement * aux = tmp;
tmp = tmp->next;
_dlist_element_free (aux);
}
list->head = list->tail = NULL;
} | false | false | false | false | false | 0 |
gst_mpegv_parse_parse_frame (GstBaseParse * parse, GstBaseParseFrame * frame)
{
GstMpegvParse *mpvparse = GST_MPEGVIDEO_PARSE (parse);
GstBuffer *buffer = frame->buffer;
if (G_UNLIKELY (mpvparse->pichdr.pic_type == GST_MPEG_VIDEO_PICTURE_TYPE_I))
GST_BUFFER_FLAG_UNSET (buffer, GST_BUFFER_FLAG_DELTA_UNIT);
... | false | false | false | false | false | 0 |
istgt_iscsi_parse_params(ISCSI_PARAM **params, const uint8_t *data, int len)
{
const uint8_t *p, *q;
const uint8_t *last;
char *key = NULL;
char *val = NULL;
int rc;
int n;
/* for each key/val temporary store */
key = xmalloc(ISCSI_TEXT_MAX_KEY_LEN + 1);
val = xmalloc(ISCSI_TEXT_MAX_VAL_LEN + 1);
/* data = ... | false | false | false | false | false | 0 |
rbd_dev_v2_object_prefix(struct rbd_device *rbd_dev)
{
void *reply_buf;
int ret;
void *p;
reply_buf = kzalloc(RBD_OBJ_PREFIX_LEN_MAX, GFP_KERNEL);
if (!reply_buf)
return -ENOMEM;
ret = rbd_obj_method_sync(rbd_dev, rbd_dev->header_name,
"rbd", "get_object_prefix", NULL, 0,
reply_buf, RBD_OBJ_PREFIX_LEN... | false | false | false | false | false | 0 |
cftimer_create(int id, long delay, object *ob, int mode) {
if (id >= MAX_TIMERS)
return TIMER_ERR_ID;
if (id < 0)
return TIMER_ERR_ID;
if (timers_table[id].mode != TIMER_MODE_DEAD)
return TIMER_ERR_ID;
if ((mode != TIMER_MODE_SECONDS) && (mode != TIMER_MODE_CYCLES))
retur... | false | false | false | false | false | 0 |
fvi_segment_plane(vec3d *new_pnt,
vec3d *plane_pnt,vec3d *plane_norm,
vec3d *p0,vec3d *p1,float rad)
{
float t;
vec3d d;
vm_vec_sub( &d, p1, p0 );
t = fvi_ray_plane(new_pnt,
plane_pnt,plane_norm, // Plane description, a point and a normal
... | false | false | false | false | false | 0 |
LineTo_16bpp(HGDI_DC hdc, int nXEnd, int nYEnd)
{
int x, y;
int x1, y1;
int x2, y2;
int e, e2;
int dx, dy;
int sx, sy;
HGDI_BITMAP bmp;
int bx1, by1;
int bx2, by2;
int irop2;
uint16 pen;
uint16 *pixel;
x1 = hdc->pen->posX;
y1 = hdc->pen->posY;
x2 = nXEnd;
y2 = nYEnd;
dx = (x1 > x2) ? x1 - x2 : x2 - ... | false | false | false | false | false | 0 |
CalcHash(const vector<int>& frag)
{
//Something like... whole of fragment treated as a binary number modulus 1021
const int MODINT = 108; //2^32 % 1021
unsigned int hash=0;
for(unsigned i=0;i<frag.size();++i)
hash= (hash*MODINT + (frag[i] % 1021)) % 1021;
return hash;
} | false | false | false | false | false | 0 |
StateMap(const std::string& state) {
std::string state_ = state;
/*
Infosys states (mapped from GM states):
ACCEPTING
ACCEPTED
PREPARED
SUBMITTING
INLRMS: *
KILLING
EXECUTED
KILLED
FAILED
GM states (either not mapped or somehow obtained directly):
ACCEPTED
PREPARING
SUBMIT
INLRMS
CANCELING
FI... | false | false | false | false | false | 0 |
startmon(struct ast_channel *chan, struct ast_audiohook *audiohook)
{
struct ast_channel *peer = NULL;
int res = 0;
if (!chan)
return -1;
ast_audiohook_attach(chan, audiohook);
if (!res && ast_test_flag(ast_channel_flags(chan), AST_FLAG_NBRIDGE) && (peer = ast_bridged_channel(chan)))
ast_softhangup(peer, AS... | false | false | false | false | false | 0 |
krb5_cc_cache_match (krb5_context context,
krb5_principal client,
krb5_ccache *id)
{
krb5_cccol_cursor cursor;
krb5_error_code ret;
krb5_ccache cache = NULL;
krb5_ccache expired_match = NULL;
*id = NULL;
ret = krb5_cccol_cursor_new (context, &cursor);
if (ret)
return ret;
... | false | false | false | false | false | 0 |
sym_name(const char *sym_strtab, Elf32_Sym *sym)
{
const char *name;
name = "<noname>";
if (sym->st_name) {
name = sym_strtab + sym->st_name;
}
else {
name = sec_name(sym->st_shndx);
}
return name;
} | false | false | false | false | false | 0 |
seahorse_pgp_uid_get_name (SeahorsePgpUid *self)
{
g_return_val_if_fail (SEAHORSE_IS_PGP_UID (self), NULL);
if (!self->pv->name)
self->pv->name = g_strdup ("");
return self->pv->name;
} | false | false | false | false | false | 0 |
scm_subr_p (SCM obj)
{
if (SCM_NIMP (obj))
switch (SCM_TYP7 (obj))
{
case scm_tcs_subrs:
return 1;
default:
;
}
return 0;
} | false | false | false | false | false | 0 |
atkin_q2_precomp()
{
int i = 0;
for (int x = 1; x <= 10; ++x)
{
for (int y = 1; y <= 30; ++y)
{
if (atkin_q2_filter[(3 * x * x + y * y) % 60] != 0)
{
atkin_q2_x0[i] = x;
atkin_q2_y0[i] = y;
++i;
}
}... | false | false | false | false | false | 0 |
analyserfindlabel(Symbol *labels, const char *label)
{
if (labels) {
int i = strcmp(label, labels->name);
if (i < 0) return analyserfindlabel(labels->left, label);
if (i > 0) return analyserfindlabel(labels->right, label);
return labels->location ? labels : NULL;
}
return NULL;
} | false | false | false | false | false | 0 |
deviceTypeCode(int type)
{
const ant_sensor_type_t *st=ant_sensor_types;
do {
if (st->device_id==type) return st->suffix;
} while (++st, st->type != ANTChannel::CHANNEL_TYPE_GUARD);
return '-';
} | false | false | false | false | false | 0 |
EventHandler()
{
if( !valid) return;
// dummy call to get private function set_stream() called
// char dummy;
// gesc( &dummy);
//
// plgpls( &pls);
XwDev *dev = (XwDev *) pls->dev;
// if( dev == NULL)
// this->plstream::init();
//
// plgpls( &pls);
//
// dev = (XwDev *) pls->dev;
if( dev =... | false | false | false | false | false | 0 |
audio_loadwav(int effectnr) {
char file[MAXPATHLEN];
Mix_Chunk *result;
snprintf(file,MAXPATHLEN,"%s/ffrenzy/sounds/ffrenzy_%s_sound.wav",
DATADIR,
audio_effectnames[effectnr]);
result = Mix_LoadWAV(file);
if (result == NULL) {
WARN("Couldn't load %s sound from %s",audio_effectname... | false | false | false | false | false | 0 |
cli_bcapi_buffer_pipe_read_get(struct cli_bc_ctx *ctx , int32_t id, uint32_t size)
{
struct bc_buffer *b = get_buffer(ctx, id);
if (!b || size > cli_bcapi_buffer_pipe_read_avail(ctx, id) || !size)
return NULL;
if (b->data)
return b->data + b->read_cursor;
return fmap_need_off(ctx->fmap, ... | false | false | false | false | false | 0 |
dw_spi_dma_tx_done(void *arg)
{
struct dw_spi *dws = arg;
clear_bit(TX_BUSY, &dws->dma_chan_busy);
if (test_bit(RX_BUSY, &dws->dma_chan_busy))
return;
spi_finalize_current_transfer(dws->master);
} | false | false | false | false | false | 0 |
find_typenames_r (tree *tp, int *walk_subtrees ATTRIBUTE_UNUSED, void *data)
{
struct find_typenames_t *d = (struct find_typenames_t *)data;
tree mv = NULL_TREE;
if (TYPE_P (*tp) && is_typedef_decl (TYPE_NAME (*tp)))
/* Add the type of the typedef without any additional cv-quals. */
mv = TREE_TYPE (TYPE... | false | false | false | false | false | 0 |
render_pixmap(int lp, enum what_display what)
{
GdkPixbuf **pb=which_pixbuf(lp,what);
GdkPixmap **pm=which_pixmap(lp,what);
int w,h;
which_pixbuf_size(lp, what, &w, &h);
if( *pm==NULL) {
g_debug("creating pixmap [%d] type %d",lp,what);
create__pixmap(lp,what);
}
if( *pb==NULL) {
g_debug("cre... | false | false | false | false | false | 0 |
AddNewCallback(unsigned short code, bool mostRecentOnly, Callback *instance, Callback::Method method)
{
// init the udp layer before we add the callback
instance->UdpLayer().Init();
bool found = false;
for (ListSender::iterator it = _clients.begin(); !found && it != _clients.end(); ++it)
{
... | false | false | false | false | false | 0 |
totem_sublang_update (Totem *totem)
{
GList *list;
list = bacon_video_widget_get_languages (totem->bvw);
if (totem_sublang_equal_lists (totem->language_list, list) == TRUE) {
totem_g_list_deep_free (list);
} else {
totem_languages_update (totem, list);
}
list = bacon_video_widget_get_subtitles (totem->bvw);... | false | false | false | false | false | 0 |
set_schema_list(const Glib::ustring& key,const SListHandle_ValueSchema& list)
{
Value v(VALUE_LIST);
v.set_list_type(VALUE_SCHEMA);
v.set_schema_list(list);
this->set(key, v);
} | false | false | false | false | false | 0 |
tree_mem_ref_addr (tree type, tree mem_ref)
{
tree addr;
tree act_elem;
tree step = TMR_STEP (mem_ref), offset = TMR_OFFSET (mem_ref);
tree addr_base = NULL_TREE, addr_off = NULL_TREE;
addr_base = fold_convert (type, TMR_BASE (mem_ref));
act_elem = TMR_INDEX (mem_ref);
if (act_elem)
{
if (step... | false | false | false | false | true | 1 |
ecore_thread_local_data_set(Ecore_Thread *thread,
const char *key,
void *value,
Eina_Free_Cb cb)
{
#ifdef EFL_HAVE_THREADS
Ecore_Pthread_Worker *worker = (Ecore_Pthread_Worker *)thread;
Ecore_Thread_Data *d, *r;
void... | false | false | false | false | false | 0 |
_dbus_marshal_skip_basic (const DBusString *str,
int type,
int byte_order,
int *pos)
{
_dbus_assert (byte_order == DBUS_LITTLE_ENDIAN ||
byte_order == DBUS_BIG_END... | false | false | false | false | false | 0 |
replace_delimiter (const GMatchInfo *match_info,
GString *expanded_regex,
gpointer data)
{
gchar *delim, *escapes;
ParserState *parser_state = data;
escapes = g_match_info_fetch (match_info, 1);
g_string_append (expanded_regex, escapes);
delim = g_match_info_fetch (match_info, 2);
DE... | false | false | false | false | false | 0 |
poptGetContext(const char * name, int argc, const char ** argv,
const struct poptOption * options, int flags) {
poptContext con = (poptContext)malloc(sizeof(*con));
memset(con, 0, sizeof(*con));
con->os = con->optionStack;
con->os->argc = argc;
con->os->argv = argv;
con->os->argb = NULL;... | false | false | false | false | false | 0 |
rsn_parsetter_check_caps (RsnParSetter * parset, GstCaps * caps)
{
GstStructure *s;
gint width, height;
gint par_n, par_d;
guint dar_n, dar_d;
gboolean ret = FALSE;
if (parset->in_caps_last &&
(caps == parset->in_caps_last ||
gst_caps_is_equal (caps, parset->in_caps_last))) {
ret = pars... | false | false | false | false | false | 0 |
qlcnic_83xx_idc_need_reset_state(struct qlcnic_adapter *adapter)
{
struct qlcnic_mailbox *mbx = adapter->ahw->mailbox;
int ret = 0;
if (adapter->ahw->idc.prev_state != QLC_83XX_IDC_DEV_NEED_RESET) {
qlcnic_83xx_idc_update_audit_reg(adapter, 0, 1);
set_bit(__QLCNIC_RESETTING, &adapter->state);
clear_bit(QLC_83... | false | false | false | false | false | 0 |
PQregisterThreadLock(pgthreadlock_t newhandler)
{
pgthreadlock_t prev = pg_g_threadlock;
if (newhandler)
pg_g_threadlock = newhandler;
else
pg_g_threadlock = default_threadlock;
return prev;
} | false | false | false | false | false | 0 |
textHeight(char *txt, int len)
{
if (!txt) return 0;
if (!len) return 0;
return ft->height((const char*)txt, len);
} | false | false | false | false | false | 0 |
strtok_delim(const strtok_t *s)
{
strtok_check(s);
if (NULL == s->p || s->string == s->p)
return '\0';
g_assert(s->p > s->string);
return *(s->p - 1);
} | false | false | false | false | false | 0 |
binop(int token, union yystype *val, int op, int noeval)
{
intmax_t a = primary(token, val, op, noeval);
op = last_token;
if (op < ARITH_BINOP_MIN || op >= ARITH_BINOP_MAX)
return a;
return binop2(a, op, ARITH_MAX_PREC, noeval);
} | false | false | false | false | false | 0 |
arcmsr_flush_adapter_cache(struct AdapterControlBlock *acb)
{
switch (acb->adapter_type) {
case ACB_ADAPTER_TYPE_A: {
arcmsr_hbaA_flush_cache(acb);
}
break;
case ACB_ADAPTER_TYPE_B: {
arcmsr_hbaB_flush_cache(acb);
}
break;
case ACB_ADAPTER_TYPE_C: {
arcmsr_hbaC_flush_cache(acb);
}
break;
case A... | false | false | false | false | false | 0 |
M_SetupWriteFields(void)
{
this->ClearFields();
MET_FieldRecordType * mF;
if(strlen(m_Comment)>0)
{
mF = new MET_FieldRecordType;
MET_InitWriteField(mF, "Comment", MET_STRING, strlen(m_Comment), m_Comment);
m_Fields.push_back(mF);
}
strcpy(m_ObjectTypeName,"Scene");
mF = new MET_FieldRe... | false | false | false | false | false | 0 |
AddToList(char *name, char *icon_name, unsigned long off_flags,
unsigned long on_flags, int desk, int bw, int nobw,
char *forecolor, char *backcolor,
unsigned long off_buttons, unsigned long on_buttons)
{
name_list *nptr,*lastptr = NULL;
if((name == NULL)||((off_flags == 0)&&(on_fla... | false | false | false | false | false | 0 |
halfdelay(int t)
{
T((T_CALLED("halfdelay(%d)"), t));
if (t < 1 || t > 255 || SP == 0)
returnCode(ERR);
cbreak();
SP->_cbreak = t + 1;
returnCode(OK);
} | false | false | false | false | false | 0 |
info_set_user_tag (CamelMessageInfo *info,
const gchar *name,
const gchar *value)
{
CamelMessageInfoBase *mi = (CamelMessageInfoBase *) info;
gint res;
res = camel_tag_set (&mi->user_tags, name, value);
if (mi->summary && res && mi->summary->priv->folder && mi->uid
&& ca... | false | false | false | false | false | 0 |
midgard_core_workspace_get_context_ids (MidgardConnection *mgd, guint id)
{
g_return_val_if_fail (mgd != NULL, NULL);
g_return_val_if_fail (id != 0, NULL);
guint row_id;
const GValue *up_val = midgard_core_workspace_get_value_by_id (mgd, MGD_WORKSPACE_FIELD_IDX_UP, id, &row_id);
guint up_id = 0;
if (G_VALUE_HOLD... | false | false | false | false | false | 0 |
conf_mute_moh_inactive_waitmarked(struct conference_bridge_user *user)
{
/* Be sure we are muted so we can't talk to anybody else waiting */
user->features.mute = 1;
/* Start music on hold if needed */
if (ast_test_flag(&user->u_profile, USER_OPT_MUSICONHOLD)) {
conf_moh_start(user);
}
} | false | false | false | false | false | 0 |
e_dbhash_remove (EDbHash *edbh,
const gchar *key)
{
DB *db;
DBT dkey;
g_return_if_fail (edbh != NULL);
g_return_if_fail (edbh->priv != NULL);
g_return_if_fail (key != NULL);
db = edbh->priv->db;
/* Key dbt */
string_to_dbt (key, &dkey);
/* Remove from database */
db->del (db, NULL, &dkey,... | false | false | false | false | false | 0 |
epu_dma_done_irq(struct cx18 *cx, struct cx18_in_work_order *order)
{
u32 handle, mdl_ack_offset, mdl_ack_count;
struct cx18_mailbox *mb;
int i;
mb = &order->mb;
handle = mb->args[0];
mdl_ack_offset = mb->args[1];
mdl_ack_count = mb->args[2];
if (handle == CX18_INVALID_TASK_HANDLE ||
mdl_ack_count == 0 |... | false | false | false | false | false | 0 |
stun_check_message_integrity_by_key_str(turn_credential_type ct, u08bits *buf, size_t len, hmackey_t key, st_password_t pwd, SHATYPE shatype, int *too_weak)
{
int res = 0;
u08bits new_hmac[MAXSHASIZE];
unsigned int shasize;
const u08bits *old_hmac = NULL;
stun_attr_ref sar = stun_attr_get_first_by_type_str(buf, l... | false | false | false | false | false | 0 |
release_card(struct fritzcard *card)
{
u_long flags;
disable_hwirq(card);
spin_lock_irqsave(&card->lock, flags);
modehdlc(&card->bch[0], ISDN_P_NONE);
modehdlc(&card->bch[1], ISDN_P_NONE);
spin_unlock_irqrestore(&card->lock, flags);
card->isac.release(&card->isac);
free_irq(card->irq, card);
mISDN_freebchanne... | false | false | false | false | false | 0 |
test_sample_is_vbox(char *name, int quiet)
{
struct tm *timelocal;
struct stat status;
vaheader_t header;
time_t timestamp;
long int compression;
int fd;
char timestring[256];
compression = 255;
if ((fd = open(name, O_RDONLY)) != -1)
{
if (header_get(fd, &header))
{
compression = ... | true | true | false | false | true | 1 |
build_plselection_prompt(char *buf, int buflen, int rolenum, int racenum, int gendnum, int alignnum)
{
const char *defprompt = "Shall I pick a character for you? [ynq] ";
int num_post_attribs = 0;
char tmpbuf[BUFSZ];
if (buflen < QBUFSZ)
return (char *)defprompt;
strcpy(tmpbuf, "Shall ... | false | false | false | false | false | 0 |
ws()
{
while ( (Pos < Text.length()) && (Text[Pos] == ' ') )
++Pos;
} | false | false | false | false | false | 0 |
temp_prefs_get_double(TempPrefs *temp_prefs, const gchar *key) {
gchar *string; /* Hash value string */
gdouble value; /* Returned value */
g_return_val_if_fail (temp_prefs && temp_prefs->tree, 0);
g_return_val_if_fail (key, 0);
value = 0.0f;
string = g_tree_lookup(temp_prefs->tree, key);
... | false | false | false | false | false | 0 |
prune_old(void *key, void *value, size_t u_len, void *u_data)
{
const kuid_t *id = key;
const struct lifedata *ld = value;
time_delta_t d;
bool expired;
double p;
(void) u_len;
(void) u_data;
d = delta_time(tm_time(), ld->last_seen);
if (d <= STABLE_EXPIRE) {
expired = FALSE;
p = 1.0;
} else {
p = st... | false | false | false | false | false | 0 |
ses_do_frame(fr)
frame_T *fr;
{
frame_T *frc;
if (fr->fr_layout == FR_LEAF)
return ses_do_win(fr->fr_win);
for (frc = fr->fr_child; frc != NULL; frc = frc->fr_next)
if (ses_do_frame(frc))
return TRUE;
return FALSE;
} | false | false | false | false | false | 0 |
gst_rtp_h263p_pay_flush (GstRtpH263PPay * rtph263ppay)
{
guint avail;
GstBuffer *outbuf;
GstFlowReturn ret;
gboolean fragmented;
avail = gst_adapter_available (rtph263ppay->adapter);
if (avail == 0)
return GST_FLOW_OK;
fragmented = FALSE;
/* This algorithm assumes the H263/+/++ encoder sends compl... | false | false | false | false | false | 0 |
count_used_sockets(item *it)
{
int i;
int count = 0;
const char *addon;
for (i = 0; i < it->upgrade_sockets.size; i++) {
addon = it->upgrade_sockets.arr[i].addon;
if (addon)
count++;
}
return count;
} | false | false | false | false | false | 0 |
gnc_job_window_refresh_handler (GHashTable *changes, gpointer user_data)
{
JobWindow *jw = user_data;
const EventInfo *info;
GncJob *job = jw_get_job (jw);
/* If there isn't a job behind us, close down */
if (!job)
{
gnc_close_gui_component (jw->component_id);
return;
}
... | false | false | false | false | false | 0 |
xhci_abort_cmd_ring(struct xhci_hcd *xhci, unsigned long flags)
{
u64 temp_64;
int ret;
xhci_dbg(xhci, "Abort command ring\n");
reinit_completion(&xhci->cmd_ring_stop_completion);
temp_64 = xhci_read_64(xhci, &xhci->op_regs->cmd_ring);
xhci_write_64(xhci, temp_64 | CMD_RING_ABORT,
&xhci->op_regs->cmd_ring);... | false | false | false | false | false | 0 |
PrintSelf(ostream& os, vtkIndent indent)
{
this->Superclass::PrintSelf(os, indent);
os << indent << "Directory: " <<
(this->GetDirectory() ? this->GetDirectory() : " none") << "\n";
os << indent << "Pattern: " <<
(this->GetPattern() ? this->GetPattern() : " none") << "\n";
os << indent << "Recurse:... | false | false | false | false | false | 0 |
halo(double *array1, int gridID1, double *array2, int lhalo, int rhalo)
{
int nlon1, nlat;
int ilat, ilon;
int nmin, nmax;
nlon1 = gridInqXsize(gridID1);
nlat = gridInqYsize(gridID1);
nmin = 0;
nmax = nlon1;
if ( lhalo < 0 ) nmin = -lhalo;
if ( rhalo < 0 ) nmax += rhalo;
for ( ilat = 0; ilat <... | false | false | false | false | false | 0 |
dove_thermal_probe(struct platform_device *pdev)
{
struct thermal_zone_device *thermal = NULL;
struct dove_thermal_priv *priv;
struct resource *res;
int ret;
priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL);
if (!priv)
return -ENOMEM;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
priv->sen... | false | false | false | false | false | 0 |
bgzf_flush(BGZF *fp)
{
if (!fp->is_write) return 0;
if (fp->mt) return mt_flush(fp);
while (fp->block_offset > 0) {
int block_length;
block_length = deflate_block(fp, fp->block_offset);
if (block_length < 0) return -1;
if (fwrite(fp->compressed_block, 1, block_length, fp->fp) != block_length) {
fp->errcod... | false | false | false | false | false | 0 |
fluid_settings_getnum_range(fluid_settings_t* settings, const char *name,
double* min, double* max)
{
fluid_setting_node_t *node;
fluid_return_if_fail (settings != NULL);
fluid_return_if_fail (name != NULL);
fluid_return_if_fail (name[0] != '\0');
fluid_return_if_fail (m... | false | false | false | false | false | 0 |
gs_manager_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec)
{
GSManager *self;
self = GS_MANAGER (object);
switch (prop_id) {
case PROP... | false | false | false | false | false | 0 |
identify_old(struct fet_device *dev)
{
char idtext[64];
if (xfer(dev, C_IDENTIFY, NULL, 0, 2, 70, 0) < 0)
return -1;
if (dev->fet_reply.datalen < 0x26) {
printc_err("fet: missing info\n");
return -1;
}
memcpy(idtext, dev->fet_reply.data + 4, 32);
idtext[32] = 0;
dev->code_start = LE_WORD(dev->fet_reply... | true | true | false | false | false | 1 |
bonus(bigint nbonus, AtomVec *ptr, const char *type)
{
int i,m,nchunk,eof;
int mapflag = 0;
if (atom->map_style == 0) {
mapflag = 1;
atom->map_style = 1;
atom->map_init();
atom->map_set();
}
bigint nread = 0;
bigint natoms = nbonus;
while (nread < natoms) {
nchunk = MIN(natoms-nread... | false | false | false | false | false | 0 |
settingsDialogCanceled()
{
m_playerSettings->discardUnsavedSettings();
m_tempRandomArenaModeArenaList.clear();
if(m_currentThemeIdentifier != m_themeProvider->currentTheme()->identifier())
{
QList<const KgTheme*> themeList = m_themeProvider->themes();
foreach(const KgTheme* theme, themeL... | false | false | false | false | false | 0 |
main(int argc, char *argv[])
{
int delay = 0;
int res = 0;
gchar *socket_file = NULL;
gchar *service = NULL;
GError *error = NULL;
char *error_str;
GOptionContext *context;
GOptionEntry option_entries[] =
{
{"socket", 'f', 0, G_OPTION_ARG_FILENAME, &socket_file, "Socket filename to use.", ""},
{"service", ... | false | false | false | false | false | 0 |
exhalbtc_init_coex_dm(struct btc_coexist *btcoexist)
{
struct rtl_priv *rtlpriv = btcoexist->adapter;
struct rtl_hal *rtlhal = rtl_hal(rtlpriv);
if (!halbtc_is_bt_coexist_available(btcoexist))
return;
btcoexist->statistics.cnt_init_coex_dm++;
if (rtlhal->hw_type == HARDWARE_TYPE_RTL8723BE)
ex_btc8723b2ant_i... | false | false | false | false | false | 0 |
anjuta_window_layout_load (AnjutaWindow *win, const gchar *layout_filename,
const gchar *name)
{
g_return_if_fail (ANJUTA_IS_WINDOW (win));
if (!layout_filename ||
!gdl_dock_layout_load_from_file (win->layout_manager, layout_filename))
{
gchar *datadir, *filename;
datadir = anjuta_res_get_data_dir();
... | false | false | false | false | false | 0 |
minix_new_block(struct inode * inode)
{
struct minix_sb_info *sbi = minix_sb(inode->i_sb);
int bits_per_zone = 8 * inode->i_sb->s_blocksize;
int i;
for (i = 0; i < sbi->s_zmap_blocks; i++) {
struct buffer_head *bh = sbi->s_zmap[i];
int j;
spin_lock(&bitmap_lock);
j = minix_find_first_zero_bit(bh->b_data, ... | false | false | false | false | false | 0 |
ioctl(int fd, unsigned long int request, ...)
{
void *arg;
va_list ap;
va_start(ap, request);
arg = va_arg(ap, void *);
va_end(ap);
return v4l2_ioctl(fd, request, arg);
} | false | false | false | false | false | 0 |
radeon_surface_best(struct radeon_surface_manager *surf_man,
struct radeon_surface *surf)
{
unsigned mode, type;
int r;
type = RADEON_SURF_GET(surf->flags, TYPE);
mode = RADEON_SURF_GET(surf->flags, MODE);
r = radeon_surface_sanity(surf_man, surf, type, mode);
if (r) {
... | false | false | false | false | false | 0 |
e_cal_component_get_id (ECalComponent *comp)
{
ECalComponentPrivate *priv;
ECalComponentId *id = NULL;
g_return_val_if_fail (comp != NULL, NULL);
g_return_val_if_fail (E_IS_CAL_COMPONENT (comp), NULL);
priv = comp->priv;
g_return_val_if_fail (priv->icalcomp != NULL, NULL);
id = g_new0 (ECalComponentId, 1);
i... | false | false | false | false | false | 0 |
mlx4_en_replace_mac(struct mlx4_en_priv *priv, int qpn,
unsigned char *new_mac, unsigned char *prev_mac)
{
struct mlx4_en_dev *mdev = priv->mdev;
struct mlx4_dev *dev = mdev->dev;
int err = 0;
u64 new_mac_u64 = mlx4_mac_to_u64(new_mac);
if (dev->caps.steering_mode != MLX4_STEERING_MODE_A0) {
struct hl... | true | true | false | false | false | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.