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 |
|---|---|---|---|---|---|---|
TMRstop(unsigned int timer)
{
if (timer_count == 0) {
/* this should happen if innconf->timer == 0 */
return;
}
if (timer_current == NULL)
warn("timer %u stopped when no timer was running", timer);
else if (timer != timer_current->id)
warn("timer %u stopped doesn't match ... | false | false | false | false | false | 0 |
__dd_verify(idmap, deadmap, tmpmap, origmap, nlockers, nalloc, which)
locker_info *idmap;
u_int32_t *deadmap, *tmpmap, *origmap;
u_int32_t nlockers, nalloc, which;
{
u_int32_t *tmap;
u_int32_t j;
int count;
memset(tmpmap, 0, sizeof(u_int32_t) * nalloc);
/*
* In order for "which" to be actively involved in
... | false | false | false | false | false | 0 |
name_to_module_idx (const char *name, int add)
{
struct name **res;
struct name fake_name = { .name = name };
int idx;
res = (struct name **) tfind (&fake_name, &names, name_compare);
if (res == NULL)
abort ();
idx = (*res)->module_idx;
if (idx == -1 && add)
/* No module index assigned yet. */
... | false | false | false | false | false | 0 |
cik_get_cu_active_bitmap(struct radeon_device *rdev, u32 se, u32 sh)
{
u32 mask = 0, tmp, tmp1;
int i;
mutex_lock(&rdev->grbm_idx_mutex);
cik_select_se_sh(rdev, se, sh);
tmp = RREG32(CC_GC_SHADER_ARRAY_CONFIG);
tmp1 = RREG32(GC_USER_SHADER_ARRAY_CONFIG);
cik_select_se_sh(rdev, 0xffffffff, 0xffffffff);
mutex_un... | false | false | false | false | false | 0 |
setContext(XML_Parser parser, const XML_Char *context)
{
const XML_Char *s = context;
while (*context != XML_T('\0')) {
if (*s == CONTEXT_SEP || *s == XML_T('\0')) {
ENTITY *e;
if (!poolAppendChar(&tempPool, XML_T('\0')))
return 0;
e = (ENTITY *)lookup(&dtd.generalEntities, poolStart(... | false | false | false | false | false | 0 |
copy(const APP_INIT_DATA& a) {
safe_strcpy(app_name, a.app_name);
safe_strcpy(symstore, a.symstore);
safe_strcpy(acct_mgr_url, a.acct_mgr_url);
safe_strcpy(user_name, a.user_name);
safe_strcpy(team_name, a.team_name);
safe_strcpy(project_dir, a.project_dir);
safe_strcpy(boinc_dir, a.boinc_di... | false | false | false | false | false | 0 |
display_crc_ctl_tokenize(char *buf, char *words[], int max_words)
{
int n_words = 0;
while (*buf) {
char *end;
/* skip leading white space */
buf = skip_spaces(buf);
if (!*buf)
break; /* end of buffer */
/* find end of word */
for (end = buf; *end && !isspace(*end); end++)
;
if (n_words == max... | false | false | false | false | false | 0 |
mgmt_get_conn_list(int index, GSList **conns)
{
struct controller_info *info = &controllers[index];
DBG("index %d", index);
*conns = info->connections;
info->connections = NULL;
return 0;
} | false | false | false | false | false | 0 |
new_pred( void )
#else
new_pred( )
#endif
{
Predicate *p = (Predicate *) calloc(1,sizeof(Predicate)); /* MR10 */
require(p!=NULL, "new_pred: cannot alloc predicate");
p->scontext[0]=empty;
p->scontext[1]=empty;
p->completionTree=empty;
p->completionSet=empty;
p->plainSet=empty;
return p;
} | false | false | false | true | false | 1 |
CleanupMemory()
{
delete ( Child);
Child = NULL;
delete ( Sibling);
Sibling = NULL;
} | false | false | false | false | false | 0 |
make_final_options_checks(void)
{
unsigned ff; /* formating flags */
if((opt.flags & OPT_VERBOSE) && conf_opt.config_file) {
/* note that the first log_msg call shall be made after setup_output() */
log_msg(_("Config file: %s\n"), (conf_opt.config_file ? conf_opt.config_file : _("None")));
}
/* check that no ... | false | false | false | false | false | 0 |
addCurve (const float *y, int n)
{
double* yDouble = new double [n];
for (int i = 0; i < n; i++)
yDouble[i] = y[i];
addCurve (yDouble, n);
delete yDouble;
} | false | false | false | false | false | 0 |
cold_createdysys (consys_struct *orig_sys, int eqcnt, int ineqcnt)
/*
This routine creates the dy_sys constraint system and attaches the
translation vectors that are used to move between the original (orig_sys)
and active (dy_sys) constraint systems.
While unrelated to creating dy_sys, it turns out that this... | false | false | false | false | false | 0 |
dmatest_match_device(struct dmatest_params *params,
struct dma_device *device)
{
if (params->device[0] == '\0')
return true;
return strcmp(dev_name(device->dev), params->device) == 0;
} | false | false | false | false | false | 0 |
us_reactor_handler_tcp_init(
us_reactor_handler_t *self_, us_allocator_t *allocator, int fd, void *extra, int queue_buf_size )
{
bool r = false;
us_reactor_handler_tcp_t *self = (us_reactor_handler_tcp_t *)self_;
uint8_t *in_buf = NULL;
uint8_t *out_buf = NULL;
r = us_reactor_handler_init( self_... | false | false | false | false | false | 0 |
mbfl_buffer_converter_new(
enum mbfl_no_encoding from,
enum mbfl_no_encoding to,
int buf_initsz)
{
mbfl_buffer_converter *convd;
/* allocate */
convd = (mbfl_buffer_converter*)mbfl_malloc(sizeof (mbfl_buffer_converter));
if (convd == NULL) {
return NULL;
}
/* initialize */
convd->from = mbfl_no2e... | false | false | false | false | false | 0 |
GMT_getdefpath (GMT_LONG get, char **P)
{
/* Return the full path to the chosen .gmtdefaults4 system file
* depending on the value of get:
* get = 0: Use gmt_setup.conf to set get to 1 or 2.
* get = 1: Use the SI settings.
* get = 2: Use the US settings. */
GMT_LONG id;
char line[BUFSIZ], *path, *suffix[2] ... | false | false | false | false | false | 0 |
qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = Object::qt_metacall(_c, _id, _a);
if (_id < 0)
return _id;
if (_c == QMetaObject::InvokeMetaMethod) {
if (_id < 28)
qt_static_metacall(this, _c, _id, _a);
_id -= 28;
}
#ifndef QT_NO_PROPERTIES
else if... | false | false | false | false | false | 0 |
env_export(unsigned char *var)
{
struct env_lst *ep;
if ((ep = env_find(var)))
ep->export = 1;
} | false | false | false | false | false | 0 |
flush_buffers(struct ngene_channel *chan)
{
u8 val;
do {
msleep(1);
spin_lock_irq(&chan->state_lock);
val = chan->nextBuffer->ngeneBuffer.SR.Flags & 0x80;
spin_unlock_irq(&chan->state_lock);
} while (val);
} | false | false | false | false | false | 0 |
qr_atan2_cost(const Operand* op0, const Operand* op1, const Operand* op2)
{ int cost;
if (!is_float(op0->tbl.v->type)
|| op1->tbl.v->type == TYPE_LOGICAL
|| op2->tbl.v->type == TYPE_LOGICAL)
{ ERROR_TYPE_MISMATCH("ATAN2");
}
cost = load_operand_cost(op1, 0, TYPE_REAL);
cost += load... | false | false | false | false | false | 0 |
reval_inode(struct inode *inode, struct dentry *dentry)
{
int err;
unsigned int gen;
struct au_iigen iigen;
aufs_bindex_t bindex, bend;
struct inode *h_inode, *h_dinode;
struct dentry *h_dentry;
/*
* before this function, if aufs got any iinfo lock, it must be only
* one, the parent dir.
* it can happen b... | false | false | false | false | false | 0 |
wildConvTo(Type *tprm)
{
Type *tcprm = tprm->substWildTo(MODconst);
if (constConv(tcprm))
return Type::wildConvTo(tprm);
ClassDeclaration *cdprm = tcprm->isClassHandle();
if (cdprm && cdprm->isBaseOf(sym, NULL))
return Type::wildConvTo(tprm);
unsigned mod = 0;
if (sym->aliast... | false | false | false | false | false | 0 |
_nc_name_match(const char *const namelst, const char *const name, const char *const delim)
{
const char *s, *d, *t;
int code, found;
if ((s = namelst) != 0) {
while (*s != '\0') {
for (d = name; *d != '\0'; d++) {
if (*s != *d)
break;
s++;
}
found = FALSE;
for (code = TRUE; *... | false | false | false | false | false | 0 |
isns_log(int level, char *format, ...)
{
va_list ptr;
va_start(ptr,format);
if (daemon_state == TRUE)
{
vsyslog(level,format,ptr);
}
else
{
switch (level)
{
case LOG_ERR:
fprintf(stderr,"ERROR: ");
break;
case LOG_WARNING:
fprintf(stderr,"WARNING: ");
... | false | false | false | false | false | 0 |
gdk_pixbuf_gif_anim_iter_get_delay_time (GdkPixbufAnimationIter *anim_iter)
{
GdkPixbufFrame *frame;
GdkPixbufGifAnimIter *iter;
iter = GDK_PIXBUF_GIF_ANIM_ITER (anim_iter);
if (iter->current_frame) {
frame = iter->current_frame->data;
#if 0
g_print ("f... | false | false | false | false | false | 0 |
fields_read_file(FILE *file, const struct fields_format *format,
const struct fields_settings *settings)
{
struct fields_reader *reader;
struct fields_file *source;
if (settings == NULL)
settings = &fields_defaults;
source = fields_file_alloc(file, settings->source_buffer_size);
if (so... | false | false | false | false | false | 0 |
taglist_go_to_selection(GtkTreeSelection *selection, guint keyval, guint state)
{
GtkTreeIter iter;
GtkTreeModel *model;
gint line = 0;
gboolean handled = TRUE;
if (gtk_tree_selection_get_selected(selection, &model, &iter))
{
TMTag *tag;
gtk_tree_model_get(model, &iter, SYMBOLS_COLUMN_TAG, &tag, -1);
if (... | false | false | false | false | false | 0 |
Relax(const int& u, const int& v, const double& w)
{
double du = this->Internals->CumulativeWeights[u] + w;
if (this->Internals->CumulativeWeights[v] > du)
{
this->Internals->CumulativeWeights[v] = du;
this->Internals->Predecessors[v] = u;
this->Internals->HeapDecreaseKey(v);
}
} | false | false | false | false | false | 0 |
setData(const int ref, const QVariant &data, const int role)
{
Q_UNUSED(ref);
// WARN_FUNC << ref << role << data;
if (role==Qt::EditRole) {
if (m_Text->m_Line) {
m_Text->m_Line->setText(data.toString());
onValueChanged();
} else if (m_Text->m_Text) {
m_Tex... | false | false | false | false | false | 0 |
__pyx_pf_13pybloomfilter_11BloomFilter_4__repr__(struct __pyx_obj_13pybloomfilter_BloomFilter *__pyx_v_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
PyObject *__pyx_t_2 = NULL;
PyObject *__pyx_t_3 = NULL;
PyObject *__pyx_t_4 = NULL;
int __pyx_lineno = 0;
const ... | false | false | false | false | false | 0 |
fwdStartFoo(int answer, void *data)
{
FwdState *fwdState = data;
int fd = fwdState->client_fd;
request_t *r = fwdState->request;
StoreEntry *e = fwdState->entry;
ErrorState *err;
if (answer == 0) {
err_type page_id;
cbdataFree(fwdState);
page_id = aclGetDenyInfoPage(&Config.denyInfoList, AclM... | false | false | false | false | false | 0 |
createCircle(int n, float x, float y, float r)
{
if ((n<0) || (n>NUM_hit_areas-1))
{
error("the id must be an integer between 0 and %i",NUM_hit_areas);
return;
}
if ((x<0) || (x>1) || (y<0) || (y>1) || (r<0) || (r>1))
{
error("invalid input coordinates");
return;
}
hit_area... | false | false | false | false | false | 0 |
Hilit(int FromRow) {
if (FromRow != -1) {
if (StartHilit == -1)
StartHilit = FromRow;
else if (FromRow < StartHilit)
StartHilit = FromRow;
}
} | false | false | false | false | false | 0 |
spell_suggest_expr(su, expr)
suginfo_T *su;
char_u *expr;
{
list_T *list;
listitem_T *li;
int score;
char_u *p;
/* The work is split up in a few parts to avoid having to export
* suginfo_T.
* First evaluate the expression and get the resulting list. */
list = eval_spell_expr(... | false | false | false | false | false | 0 |
do_png(png *p, int *x, int *y, int *n, int req_comp)
{
unsigned char *result=NULL;
p->expanded = NULL;
p->idata = NULL;
p->out = NULL;
if (req_comp < 0 || req_comp > 4) return epuc("bad req_comp", "Internal error");
if (parse_png_file(p, SCAN_load, req_comp)) {
result = p->out;
p->out = NU... | false | false | false | false | false | 0 |
vattr_context_ungrok(vattr_context **c)
{
/* Decrement the loop count */
if (0 == vattr_context_unmark(*c)) {
/* If necessary, delete the structure */
if ((*c)->pb) {
(*c)->pb->pb_vattr_context = NULL;
}
slapi_ch_free((void **)c);
}
} | false | false | false | false | false | 0 |
dc1394_feature_get_all(dc1394camera_t *camera, dc1394featureset_t *features)
{
uint32_t i, j;
dc1394error_t err=DC1394_SUCCESS;
for (i= DC1394_FEATURE_MIN, j= 0; i <= DC1394_FEATURE_MAX; i++, j++) {
features->feature[j].id= i;
err=dc1394_feature_get(camera, &features->feature[j]);
... | false | false | false | false | false | 0 |
XbaeMatrixGetCellUserData(w, row, column)
Widget w;
int row;
int column;
{
XbaeMatrixWidget mw;
XtPointer data;
if (!XtIsSubclass(w, xbaeMatrixWidgetClass))
return NULL;
mw = (XbaeMatrixWidget) w;
if (mw->matrix.cell_user_data)
data = mw->matrix.cell_user_data[row][column];
els... | false | false | false | false | false | 0 |
set_refresh_pattern(struct request *rq, refresh_pattern_t *list)
{
if ( !rq ) return;
while( list ) {
if ( rq_match_named_acl_by_index(rq, list->named_acl_index) == TRUE ) {
rq->refresh_pattern = *list;
rq->refresh_pattern.valid = 1;
break;
}
list = list->next;
}
} | false | false | false | false | false | 0 |
handle_set_network_mode(GUI_RPC_CONN& grc) {
double duration = 0;
bool btemp;
int mode=-1;
while (!grc.xp.get_tag()) {
if (grc.xp.parse_double("duration", duration)) continue;
if (grc.xp.parse_bool("always", btemp)) {
mode = RUN_MODE_ALWAYS;
continue;
}
... | false | false | false | false | false | 0 |
lm3533_bl_resume(struct device *dev)
{
struct lm3533_bl *bl = dev_get_drvdata(dev);
dev_dbg(dev, "%s\n", __func__);
return lm3533_ctrlbank_enable(&bl->cb);
} | false | false | false | false | false | 0 |
utils_pixbuf_from_path(gchar *path)
{
#if defined(HAVE_GIO) && GTK_CHECK_VERSION(2, 14, 0)
GIcon *icon;
GdkPixbuf *ret = NULL;
GtkIconInfo *info;
gchar *ctype;
gint width;
ctype = g_content_type_guess(path, NULL, 0, NULL);
icon = g_content_type_get_icon(ctype);
g_free(ctype);
if (icon != NULL)
{
gt... | false | false | false | false | false | 0 |
set_path(cbuf,ncoords,xy)
char *cbuf;
int ncoords;
int *xy;
{
int i, len, len1;
char buf1[40];
len = strlen(cbuf);
for (i = 0; i < ncoords; ++i) {
sprintf(buf1," %d %d",xy[i+i],xy[i+i+1]);
len1 = strlen(buf1);
if (len+len1 < 79) {
strcat(cbuf,buf1);
len ... | false | false | false | false | false | 0 |
convert_number_to_boolean(double value)
{
return (value != 0 && !is_nan(value));
} | false | false | false | false | false | 0 |
record_block_new (const gchar *value,
gsize length)
{
GcrRecordBlock *block;
block = g_malloc (sizeof (GcrRecordBlock) + length);
block->next = NULL;
block->n_value = length;
if (value != NULL) {
memcpy (block->value, value, length);
block->value[length] = 0;
} else {
block->value[0] = 0... | false | false | false | false | true | 1 |
gst_jasper_enc_init_encoder (GstJasperEnc * enc)
{
jas_image_cmptparm_t param[GST_JASPER_ENC_MAX_COMPONENT];
gint i;
switch (enc->mode) {
case GST_JP2ENC_MODE_J2C:
case GST_JP2ENC_MODE_JPC:
enc->fmt = jas_image_strtofmt ((char *) "jpc");
break;
case GST_JP2ENC_MODE_JP2:
enc->fmt = j... | false | false | false | false | false | 0 |
atomctrl_lookup_gpio_pin(
ATOM_GPIO_PIN_LUT * gpio_lookup_table,
const uint32_t pinId,
pp_atomctrl_gpio_pin_assignment *gpio_pin_assignment)
{
unsigned int size = le16_to_cpu(gpio_lookup_table->sHeader.usStructureSize);
unsigned int offset = offsetof(ATOM_GPIO_PIN_LUT, asGPIO_Pin[0]);
uint8_t *start = (uint8_t... | false | false | false | false | false | 0 |
bm_dblclick (GtkWidget * widget, GdkEventButton * event, gpointer data)
{
if (event->button == 3)
gtk_item_factory_popup (edit_factory, (guint) event->x_root,
(guint) event->y_root, 1, 0);
else if (event->type == GDK_2BUTTON_PRESS)
{
edit_entry (NULL);
return (FALSE);
}
return (TRUE... | false | false | false | false | false | 0 |
qsfp_cks(struct qib_pportdata *ppd, int first, int next)
{
int ret;
u16 cks;
u8 bval;
cks = 0;
while (first < next) {
ret = qsfp_read(ppd, first, &bval, 1);
if (ret < 0)
goto bail;
cks += bval;
++first;
}
ret = cks & 0xFF;
bail:
return ret;
} | false | false | false | false | false | 0 |
gst_video_event_is_force_key_unit (GstEvent * event)
{
const GstStructure *s;
g_return_val_if_fail (event != NULL, FALSE);
if (GST_EVENT_TYPE (event) != GST_EVENT_CUSTOM_DOWNSTREAM &&
GST_EVENT_TYPE (event) != GST_EVENT_CUSTOM_UPSTREAM)
return FALSE; /* Not a force key unit event */
s... | false | false | false | false | false | 0 |
remove_unknown(struct Client *client_p, char *lsender, char *lbuffer)
{
int slen = strlen(lsender);
/* meepfoo is a nickname (KILL)
* #XXXXXXXX is a UID (KILL)
* #XX is a SID (SQUIT)
* meep.foo is a server (SQUIT)
*/
if((IsDigit(lsender[0]) && slen == 3) || (strchr(lsender, '.') != NULL... | false | false | false | false | false | 0 |
turnaround_delay(const struct stir_cb *stir, long us)
{
long ticks;
if (us <= 0)
return;
us -= ktime_us_delta(ktime_get(), stir->rx_time);
if (us < 10)
return;
ticks = us / (1000000 / HZ);
if (ticks > 0)
schedule_timeout_interruptible(1 + ticks);
else
udelay(us);
} | false | false | false | false | false | 0 |
_auth_lb_create (struct _line_buffer **s)
{
*s = malloc (sizeof (**s));
if (!*s)
return ENOMEM;
(*s)->buffer = NULL;
(*s)->size = 0;
(*s)->level = 0;
return 0;
} | false | false | false | false | false | 0 |
getProperty(Loc loc, Identifier *ident, int flag)
{
#if LOGDOTEXP
printf("TypeTypedef::getProperty(ident = '%s') '%s'\n", ident->toChars(), toChars());
#endif
if (ident == Id::init)
{
return Type::getProperty(loc, ident, flag);
}
return sym->basetype->getProperty(loc, ident, flag);
} | false | false | false | false | false | 0 |
mono_get_unique_iid (MonoClass *klass)
{
int iid;
g_assert (MONO_CLASS_IS_INTERFACE (klass));
classes_lock ();
if (!global_interface_bitset) {
global_interface_bitset = mono_bitset_new (128, 0);
}
iid = mono_bitset_find_first_unset (global_interface_bitset, -1);
if (iid < 0) {
int old_size = mono_bitset... | false | false | false | false | false | 0 |
insert_reload_insn(struct live_interval *interval, struct compilation_unit *cu)
{
struct list_head *reload_before;
unsigned long bc_offset;
struct insn *reload;
reload = reload_insn(interval->spill_parent->spill_slot,
&interval->spill_reload_reg);
if (!reload)
return warn("out of memory"), -ENOMEM;
re... | false | false | false | false | false | 0 |
start_ch(struct sh_mobile_i2c_data *pd, struct i2c_msg *usr_msg,
bool do_init)
{
if (usr_msg->len == 0 && (usr_msg->flags & I2C_M_RD)) {
dev_err(pd->dev, "Unsupported zero length i2c read\n");
return -EOPNOTSUPP;
}
if (do_init) {
/* Initialize channel registers */
iic_set_clr(pd, ICCR, 0, ICCR_ICE);
... | false | false | false | false | false | 0 |
hq_entry_exists(ulong value)
{
struct hash_table *ht;
struct hq_entry *list_entry;
long hqi;
if (!(pc->flags & HASH))
return FALSE;
ht = &hash_table;
if (ht->flags & (HASH_QUEUE_NONE))
return FALSE;
if (!(ht->flags & HASH_QUEUE_OPEN))
return FALSE;
hqi = HQ_INDEX(value);
list_entry = ht->memptr + ht... | false | false | false | false | false | 0 |
setup_format_params(int track)
{
int n;
int il;
int count;
int head_shift;
int track_shift;
struct fparm {
unsigned char track, head, sect, size;
} *here = (struct fparm *)floppy_track_buffer;
raw_cmd = &default_raw_cmd;
raw_cmd->track = track;
raw_cmd->flags = (FD_RAW_WRITE | FD_RAW_INTR | FD_RAW_SPIN |
... | false | false | false | false | false | 0 |
addMatchSetTo(UnicodeSet& toUnionTo) const {
UChar32 ch;
for (int32_t i=0; i<pattern.length(); i+=U16_LENGTH(ch)) {
ch = pattern.char32At(i);
const UnicodeMatcher* matcher = data->lookupMatcher(ch);
if (matcher == NULL) {
toUnionTo.add(ch);
} else {
matche... | false | false | false | false | false | 0 |
listen(FileName const & name, int queue)
{
int fd; // File descriptor for the socket
sockaddr_un addr; // Structure that hold the socket address
// We use 'localname' to fill 'addr'
string const localname = name.toFilesystemEncoding();
string::size_type len = localname.size();
// the field sun_path in sockaddr_u... | false | false | false | false | false | 0 |
hiddev_disconnect(struct hid_device *hid)
{
struct hiddev *hiddev = hid->hiddev;
struct usbhid_device *usbhid = hid->driver_data;
usb_deregister_dev(usbhid->intf, &hiddev_class);
mutex_lock(&hiddev->existancelock);
hiddev->exist = 0;
if (hiddev->open) {
mutex_unlock(&hiddev->existancelock);
usbhid_close(hi... | false | false | false | false | false | 0 |
update_readrli(void *dbh, LOCK *listlock, RLI **rlilistp)
{
int rc;
char errbuf[MAXERRMSG];
char buf[MAXERRMSG];
rls_lock_get(listlock, writelock);
update_freelist(rlilistp);
if ((rc = db_update_get_part(dbh, NULL, NULL, rlilistcb, rlilistp,
errbuf)) != GLOBUS_RLS_SUCCESS)
if (loglevel ||... | true | true | false | false | false | 1 |
xgene_enet_cle_bypass(struct xgene_enet_pdata *p,
u32 dst_ring_num, u16 bufpool_id)
{
u32 data, fpsel;
u32 cle_bypass_reg0, cle_bypass_reg1;
u32 offset = p->port_id * MAC_OFFSET;
if (p->enet_id == XGENE_ENET1) {
cle_bypass_reg0 = CLE_BYPASS_REG0_0_ADDR;
cle_bypass_reg1 = CLE_BYPASS_REG1_0_ADDR;
} else {... | false | false | false | false | false | 0 |
saslauthd_pam_conv (
/* PARAMETERS */
int num_msg, /* I: number of messages */
const struct pam_message **msg, /* I: pointer to array of messages */
struct pam_response **resp, /* O: pointer to pointer of response */
void *appdata_ptr /* I: pointer to app specific data */
/* END PARAMETERS */
)
{
... | false | false | false | false | false | 0 |
cacheDir()
{
return http_config().readPathEntry("CacheDir", KGlobal::dirs()->saveLocation("cache","http"));
} | false | false | false | false | false | 0 |
message_read_envelope(struct protstream *strm, struct body *body)
{
int c;
/* opening '(' */
c = prot_getc(strm);
/* date */
c = message_read_nstring(strm, &body->date, 1);
/* subject */
c = message_read_nstring(strm, &body->subject, 1);
/* from */
c = message_read_address(strm, ... | false | false | false | false | false | 0 |
scroll (GdkEventScroll* ev)
{
double scale;
if ((ev->state & (GDK_CONTROL_MASK|GDK_SHIFT_MASK)) == (GDK_CONTROL_MASK|GDK_SHIFT_MASK)) {
scale = 0.01;
} else if (ev->state & GDK_CONTROL_MASK) {
scale = 0.1;
} else {
scale = 1.0;
}
switch (ev->direction) {
case GDK_SCROLL_UP:
case GDK_SCROLL_RIGHT:
adju... | false | false | false | false | false | 0 |
dm_ex(p_wf,p_ex)
/* Dumps the specified expression to the specified stream. */
p_wf_t p_wf;
p_ells_t p_ex;
{
p_el_t p_el;
wf_wl(p_wf,"");
centerln(p_wf,30,'-',"Start of Expression");
ls_fir(p_ex);
ls_nxt(p_ex,PPV &p_el);
while (p_el != NULL)
{
switch (p_el->el_kind)
{
case EL_TEXT: dm_eltx(... | false | false | false | false | false | 0 |
p54_generate_band(struct ieee80211_hw *dev,
struct p54_channel_list *list,
unsigned int *chan_num,
enum ieee80211_band band)
{
struct p54_common *priv = dev->priv;
struct ieee80211_supported_band *tmp, *old;
unsigned int i, j;
int ret = -ENOMEM;
if ((!list->entries) || (!list->band_channel... | false | false | false | false | false | 0 |
getObjectAt(int i) {
if (i > (int)m_Elems.size()) return NULL;
else return m_Elems[i].get();
} | false | false | false | false | false | 0 |
RemapPValuesBasedOnProjCSAndPName( OGRSpatialReference* pOgr, const char* pszProgCSName,
char **mappingTable )
{
long ret = 0;
OGR_SRSNode *poPROJCS = pOgr->GetAttrNode( "PROJCS" );
for( int i = 0; mappingTable[i] != NULL; i += 4 )
{
whi... | false | false | false | false | false | 0 |
ReplayCacheAdd ( int iBinlog, BinlogReader_c & tReader ) const
{
const int64_t iTxnPos = tReader.GetPos();
BinlogFileDesc_t & tLog = m_dLogFiles[iBinlog];
// load data
CSphVector<BinlogIndexInfo_t> dCache;
dCache.Resize ( (int) tReader.UnzipValue() ); // FIXME! sanity check
ARRAY_FOREACH ( i, dCache )
{
dCach... | false | false | false | false | false | 0 |
nextSection(
const string& sectName) {
// Advance to next [section] line
nextSection();
// Look for matching section name
while (!p->text.empty()) { // i.e. while end() not reached
if (isSection(sectName)) return *this;
// No match, advance to next [section] line
nextSection();
}
// End of... | false | false | false | false | false | 0 |
expandLF(const QString& s)
{
// LF -> CRLF
unsigned crs = s.count( '\n' );
if (crs == 0)
return s;
unsigned len = s.length();
QString r;
r.reserve(len + crs + 1);
unsigned pos2 = 0;
for(unsigned pos = 0; pos < len; pos++)
{
QChar c = s.at(pos);
switch(c.unicode())
... | false | false | false | false | false | 0 |
list_signals (bool table, char *const *argv)
{
int signum;
int status = EXIT_SUCCESS;
char signame[SIG2STR_MAX];
if (table)
{
unsigned int name_width = 0;
/* Compute the maximum width of a signal number. */
unsigned int num_width = 1;
for (signum = 1; signum <= SIGNUM_BOUND / 10; ... | false | false | false | false | false | 0 |
insertComboText( const QString &text )
{
if( text.isEmpty() )
return;
if( m_search->contains( text ) )
{
m_search->setCurrentIndex( m_search->findText( text ) );
return;
}
m_search->completionObject()->addItem( text );
m_search->insertItem( 0, KStandardGuiItem::find().ic... | false | false | false | false | false | 0 |
cancel_op_key(lrm_state_t * lrm_state, lrmd_rsc_info_t * rsc, const char *key, gboolean remove)
{
guint removed = 0;
struct cancel_data data;
CRM_CHECK(rsc != NULL, return FALSE);
CRM_CHECK(key != NULL, return FALSE);
data.key = key;
data.rsc = rsc;
data.done = FALSE;
data.remove = rem... | false | false | false | true | false | 1 |
_hestArgsInResponseFiles(int *argcP, int *nrfP,
const char **argv, char *err,
const hestParm *parm) {
FILE *file;
char me[]="_hestArgsInResponseFiles: ", line[AIR_STRLEN_HUGE], *pound;
int ai, len;
*argcP = 0;
*nrfP = 0;
if (!parm->respFileEnable) {
/* ... | false | false | false | false | false | 0 |
amitk_data_set_UBYTE_1D_SCALING_INTERCEPT_calc_slice_min_max(AmitkDataSet * data_set,
const amide_intpoint_t frame,
const amide_intpoint_t gate,
const amide_intpoint_t z,
amitk_format_DOUBLE_t * pmin,
amitk_format_DOUBLE_t * pmax) {
Amit... | false | false | false | false | false | 0 |
do_sync_with_master(struct st_command *command)
{
long offset= 0;
char *p= command->first_argument;
const char *offset_start= p;
if (*offset_start)
{
for (; my_isdigit(charset_info, *p); p++)
offset = offset * 10 + *p - '0';
if(*p && !my_isspace(charset_info, *p))
die("Invalid integer arg... | false | false | false | false | false | 0 |
find_namespace (GIrModule *module,
const char *name)
{
GIrModule *target;
GList *l;
if (strcmp (module->name, name) == 0)
return module;
for (l = module->include_modules; l; l = l->next)
{
GIrModule *submodule = l->data;
if (strcmp (submodule->name, name) == 0)
return submodule... | false | false | false | false | false | 0 |
process (GeglOperation *operation,
GeglBuffer *input,
GeglBuffer *output,
const GeglRectangle *result,
gint level)
{
GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
gfloat red = o->red;
gfloat green = o->green;
gfloat ... | false | false | false | false | false | 0 |
coalesce_allocnos (void)
{
ira_allocno_t a;
ira_copy_t cp, next_cp, *sorted_copies;
unsigned int j;
int i, n, cp_num, regno;
bitmap_iterator bi;
sorted_copies = (ira_copy_t *) ira_allocate (ira_copies_num
* sizeof (ira_copy_t));
cp_num = 0;
/* Collect copies. */
EXECUTE_IF_SET_IN_BITMAP ... | false | false | false | false | false | 0 |
rtpm_status_str(struct seq_file *s, struct device *dev)
{
static const char * const status_lookup[] = {
[RPM_ACTIVE] = "active",
[RPM_RESUMING] = "resuming",
[RPM_SUSPENDED] = "suspended",
[RPM_SUSPENDING] = "suspending"
};
const char *p = "";
if (dev->power.runtime_error)
p = "error";
else if (dev->pow... | false | false | false | false | false | 0 |
L1()
{register object *base=vs_base;
register object *sup=base+VM1; VC1
vs_check;
{register object V1;
object V2;
V1=(base[0]);
V2=(base[1]);
vs_top=sup;
goto TTL;
TTL:;
if(type_of((V1))!=t_cons){
goto T1;}
{register object x= CMPcar((V1)),V3= ((object)VV[0]);
while(V3!=Cnil)
if(eql(x,V3->c.c_car)){
goto ... | false | false | false | false | false | 0 |
glade_gtk_action_create_editable (GladeWidgetAdaptor * adaptor,
GladeEditorPageType type)
{
GladeEditable *editable;
if (type == GLADE_PAGE_GENERAL)
{
GType action_type = glade_widget_adaptor_get_object_type (adaptor);
if (g_type_is_a (action_type, GTK_TYPE_RECENT_ACTION))
editable = (Glade... | false | false | false | false | false | 0 |
_backup_video_scale_orc_resample_bilinear_u8 (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int n = ex->n;
orc_int8 * ORC_RESTRICT ptr0;
const orc_int8 * ORC_RESTRICT ptr4;
orc_int8 var32;
ptr0 = (orc_int8 *)ex->arrays[0];
ptr4 = (orc_int8 *)ex->arrays[4];
for (i = 0; i < n; i++) {
/* 0: ldreslinb */
... | false | false | false | false | false | 0 |
InitSort() {
wxListItem item;
if (m_iSortColumn < 0) return;
item.SetMask(wxLIST_MASK_IMAGE);
item.SetImage(m_bReverseSort ? 0 : 1);
m_pListPane->SetColumn(m_iSortColumn, item);
Freeze(); // To reduce flicker
sortData();
Thaw();
} | false | false | false | false | false | 0 |
ajSeqsetSetRange(AjPSeqset seq, ajint pos1, ajint pos2)
{
ajuint i;
ajDebug("ajSeqsetSetRange(len: %d %d, %d)\n", seq->Len, pos1, pos2);
if(pos1)
seq->Begin = pos1;
if(pos2)
seq->End = pos2;
for(i=0; i< seq->Size; i++)
{
if(pos1)
seq->Seq[i]->Begin = pos1;
if(pos2)
seq->Seq[i]-... | false | false | false | false | false | 0 |
updateData()
{
_race->clear();
uint nbRace = DataTheme.countRace();
for( uint i = 0; i < nbRace; i++ ) {
_race->insertItem( DataTheme.creatures.getRace( i )->getName() );
}
init();
} | false | false | false | false | false | 0 |
ExecIndexReScan(IndexScanState *node, ExprContext *exprCtxt)
{
EState *estate;
ExprContext *econtext;
Index scanrelid;
estate = node->ss.ps.state;
econtext = node->iss_RuntimeContext; /* context for runtime keys */
scanrelid = ((IndexScan *) node->ss.ps.plan)->scan.scanrelid;
node->ss.ps.ps_TupFromTlist =... | false | false | false | false | false | 0 |
parent(const QModelIndex &index) const
{
if (!index.isValid())
return QModelIndex();
AdBlockSubscription *parent = static_cast<AdBlockSubscription*>(index.internalPointer());
if (!parent)
return QModelIndex();
int parentRow = m_manager->subscriptions().indexOf(parent);
return creat... | false | false | false | false | false | 0 |
giraffe_get_frame(const cpl_frameset *set, const cxchar *tag,
cpl_frame_group group)
{
cpl_frameset* _set = (cpl_frameset*)set;
cpl_frame *frame = NULL;
if (_set == NULL || tag == NULL) {
return NULL;
}
frame = cpl_frameset_find(_set, tag);
if (group != CPL_FRAME_... | false | false | false | false | false | 0 |
dealloc_sendto_ctx(void *ptr)
{
krb5_sendto_ctx ctx = (krb5_sendto_ctx)ptr;
if (ctx->hostname)
free(ctx->hostname);
heim_release(ctx->hosts);
heim_release(ctx->krbhst);
} | false | false | false | false | false | 0 |
callAsFunction(ExecState *exec, JSObject *thisObj, const List &args)
{
KJS_CHECK_THIS( KJS::DOMAbstractView, thisObj );
DOM::AbstractViewImpl &abstractView = *static_cast<DOMAbstractView *>(thisObj)->impl();
switch (id) {
case DOMAbstractView::GetComputedStyle: {
DOM::ElementImpl *arg0 = toElement(arg... | false | false | false | true | false | 1 |
GetWordTypeName(int dataType)
{
char isSigned = 0;
int size = 0;
// These string values must match vtkXMLDataElement::GetWordTypeAttribute().
switch (dataType)
{
case VTK_STRING: return "String";
case VTK_FLOAT: return "Float32";
case VTK_DOUBLE: return "Float64";
c... | false | false | false | false | false | 0 |
sigmaHat() {
// Extrafactor dependent on charge of incoming fermion.
int idAbs = (id2 == 22) ? abs(id1) : abs(id2);
double charge = (idAbs > 10) ? 1. : ( (idAbs%2 == 1) ? 1./3. : 2./3. );
double sigma = sigma0 * pow2( charge - sH / (sH + uH) );
// CKM factor. Secondary width for W+ or W-.
sigma ... | false | false | false | false | false | 0 |
trnNoComment(AjPStr* text)
{
ajint i;
char *cp;
ajStrTrimWhite(text);
i = ajStrGetLen(*text);
if(!i)
return;
cp = strchr(ajStrGetuniquePtr(text), '#');
if(cp)
{
/* comment found */
*cp = '\0';
ajStrSetValid(text);
}
return;
} | 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.