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 |
|---|---|---|---|---|---|---|
html_escape(struct Blob *ob, const char *data, size_t size){
size_t beg = 0, i = 0;
while( i<size ){
beg = i;
while( i<size
&& data[i]!='<'
&& data[i]!='>'
&& data[i]!='"'
&& data[i]!='&'
){
i++;
}
blob_append(ob, data+beg, i-beg);
while( i<size ){
if( data[i]... | false | false | false | false | false | 0 |
calcGammonPrices(float aafMET[MAXSCORE][MAXSCORE],
float aafMETPostCrawford[2][MAXSCORE], float aaaafGammonPrices[MAXCUBELEVEL]
[MAXSCORE][MAXSCORE][4], float aaaafGammonPricesPostCrawford[MAXCUBELEVEL]
[MAXSCORE][2][4])
{
int i, j, k;
int nCube;
for (i =... | false | false | false | false | false | 0 |
fcgi_protocol_queue_client_buffer(fcgi_request *fr)
{
int movelen;
int in_len, out_free;
if (fr->eofSent)
return;
/*
* If there's some client data and room for at least one byte
* of data in the output buffer (after protocol overhead), then
* move some data to the output buffer.... | false | false | false | false | false | 0 |
HuffmanTree_makeFromLengths(HuffmanTree* tree, const unsigned* bitlen,
size_t numcodes, unsigned maxbitlen)
{
unsigned i;
tree->lengths = (unsigned*)lodepng_malloc(numcodes * sizeof(unsigned));
if(!tree->lengths) return 83; /*alloc fail*/
for(i = 0; i != numcodes; ++i... | false | false | false | false | false | 0 |
qof_collection_add_entity (QofCollection *coll, QofInstance *ent)
{
QofInstance *e;
const GncGUID *guid;
e = NULL;
if (!coll || !ent)
{
return FALSE;
}
guid = qof_instance_get_guid(ent);
if (guid_equal(guid, guid_null()))
{
return FALSE;
}
g_return_val_if_fai... | false | false | false | false | false | 0 |
giggle_avatar_cache_get_gravatar_uri (GiggleAvatarCache *cache,
const char *gravatar_id,
unsigned avatar_size)
{
GiggleAvatarCachePriv *priv;
g_return_val_if_fail (GIGGLE_IS_AVATAR_CACHE (cache), NULL);
g_return_val_if_fail (NULL != gravatar_id, NULL);
priv = GET_PRIV (c... | false | false | false | false | false | 0 |
frotzopenprompt(int flag)
{
frefid_t fref;
strid_t stm;
glui32 gusage = flag2usage(flag);
glui32 gmode = flag2mode(flag);
fref = glk_fileref_create_by_prompt(gusage, gmode, 0);
if (fref == NULL)
return NULL;
stm = glk_stream_open_file(fref, gmode, 0);
if (flag == FILE_SCRIPT)
{
if (script... | false | false | false | false | false | 0 |
create_bullet(short spriteId, Bullet** bpp)
{
Bullet* bulletPtr;
SpriteInfo *spriteInfo = sprite_res[spriteId];
err_when(!spriteInfo);
err_when(spriteInfo->sprite_type != 'B');
switch(spriteInfo->sprite_sub_type)
{
case 0:
case ' ':
bulletPtr = new Bullet;
break;
case 'P':
bulletPtr = new Projectile;
b... | false | false | false | false | false | 0 |
tpaw_camera_monitor_dispose (GObject *object)
{
TpawCameraMonitor *self = TPAW_CAMERA_MONITOR (object);
tp_clear_object (&self->priv->tpaw_monitor);
g_queue_foreach (self->priv->cameras,
tpaw_camera_monitor_free_camera_foreach, NULL);
tp_clear_pointer (&self->priv->cameras, g_queue_free);
G_OBJECT_CL... | false | false | false | false | false | 0 |
add_till_closing_bracket(o_string *dest, struct in_str *input, unsigned end_ch)
{
int ch;
char dbl = end_ch & DOUBLE_CLOSE_CHAR_FLAG;
# if ENABLE_HUSH_BASH_COMPAT
char end_char2 = end_ch >> 8;
# endif
end_ch &= (DOUBLE_CLOSE_CHAR_FLAG - 1);
while (1) {
ch = i_getch(input);
if (ch == EOF) {
syntax_error_unt... | false | false | false | false | false | 0 |
main ()
{
/* O_NONBLOCK source test */
int flags = 0;
if(0 != fcntl(0, F_SETFL, flags | O_NONBLOCK))
return 1;
return 0;
} | false | false | false | false | false | 0 |
chm_key(struct Client *source_p, struct Channel *chptr,
int alevel, int parc, int *parn,
const char **parv, int *errors, int dir, char c, long mode_type)
{
char *key;
if(!allow_mode_change(source_p, chptr, alevel, errors, c))
return;
if(dir == MODE_QUERY)
return;
if(MyClient(source_p) && (++mode_limit_simp... | false | false | false | false | false | 0 |
remove_alias (name)
char *name;
{
BUCKET_CONTENTS *elt;
if (aliases == 0)
return (-1);
elt = hash_remove (name, aliases, 0);
if (elt)
{
free_alias_data (elt->data);
free (elt->key); /* alias name */
free (elt); /* XXX */
#if defined (PROGRAMMABLE_COMPLETION)
set_itemlist... | false | false | false | false | false | 0 |
parse_command(CS& cmd, DEV_DOT* x)
{
assert(x);
x->set(cmd.fullstring());
CARD_LIST* scope = (x->owner()) ? x->owner()->subckt() : &CARD_LIST::card_list;
cmd.reset().skipbl();
if ((cmd >> "model |simulator |parameters |subckt ")) {
cmd.reset();
CMD::cmdproc(cmd, scope);
}else{
std::string label... | false | false | false | false | false | 0 |
statCountersClean(StatCounters * C)
{
assert(C);
statHistClean(&C->client_http.all_svc_time);
statHistClean(&C->client_http.miss_svc_time);
statHistClean(&C->client_http.nm_svc_time);
statHistClean(&C->client_http.nh_svc_time);
statHistClean(&C->client_http.hit_svc_time);
statHistClean(&C->i... | false | false | false | false | false | 0 |
mono_image_fill_export_table_from_module (MonoDomain *domain, MonoReflectionModule *module,
guint32 module_index, MonoDynamicImage *assembly)
{
MonoImage *image = module->image;
MonoTableInfo *t;
guint32 i;
t = &image->tables [MONO_TABLE_TYPEDEF];
for (i = 0; i < t->rows; ++i) {
MonoError error;
MonoClass ... | false | false | false | false | false | 0 |
drmModeSetCrtc(int fd, uint32_t crtcId, uint32_t bufferId,
uint32_t x, uint32_t y, uint32_t *connectors, int count,
drmModeModeInfoPtr mode)
{
struct drm_mode_crtc crtc;
VG_CLEAR(crtc);
crtc.x = x;
crtc.y = y;
crtc.crtc_id = crtcId;
crtc.fb_id = buffe... | false | true | false | false | false | 1 |
atbm8830_write_reg(struct atbm_state *priv, u16 reg, u8 data)
{
int ret = 0;
u8 dev_addr;
u8 buf1[] = { reg >> 8, reg & 0xFF };
u8 buf2[] = { data };
struct i2c_msg msg1 = { .flags = 0, .buf = buf1, .len = 2 };
struct i2c_msg msg2 = { .flags = 0, .buf = buf2, .len = 1 };
dev_addr = priv->config->demod_address;
... | false | false | false | false | false | 0 |
trace (const char *format, ...)
{
va_list args;
gchar *str;
if (!do_trace)
return;
g_return_if_fail (format != NULL);
va_start (args, format);
str = g_strdup_vprintf (format, args);
va_end (args);
g_message ("%s", str);
g_free (str);
} | false | false | false | false | false | 0 |
dJointGetPUAnchor( dJointID j, dVector3 result )
{
dxJointPU* joint = ( dxJointPU* ) j;
dUASSERT( joint, "bad joint argument" );
dUASSERT( result, "bad result argument" );
checktype( joint, PU );
if ( joint->node[1].body )
getAnchor2( joint, result, joint->anchor2 );
else
{
... | false | false | false | false | false | 0 |
unblock_signal (int sig)
{
sigset_t unblock_set;
sigemptyset (&unblock_set);
sigaddset (&unblock_set, sig);
if (sigprocmask (SIG_UNBLOCK, &unblock_set, NULL) != 0)
error (0, errno, _("warning: sigprocmask"));
} | false | false | false | false | false | 0 |
save_register_info (void)
{
/* Sanity check: make sure the target macros FIXED_REGISTERS and
CALL_USED_REGISTERS had the right number of initializers. */
gcc_assert (sizeof fixed_regs == sizeof saved_fixed_regs);
gcc_assert (sizeof call_used_regs == sizeof saved_call_used_regs);
memcpy (saved_fixed_regs,... | false | true | false | false | false | 1 |
sm_disk_set_count(struct dm_space_map *sm, dm_block_t b,
uint32_t count)
{
int r;
uint32_t old_count;
enum allocation_event ev;
struct sm_disk *smd = container_of(sm, struct sm_disk, sm);
r = sm_ll_insert(&smd->ll, b, count, &ev);
if (!r) {
switch (ev) {
case SM_NONE:
break;
case SM_ALLOC:
/... | false | false | false | false | false | 0 |
cik_get_csb_buffer(struct radeon_device *rdev, volatile u32 *buffer)
{
u32 count = 0, i;
const struct cs_section_def *sect = NULL;
const struct cs_extent_def *ext = NULL;
if (rdev->rlc.cs_data == NULL)
return;
if (buffer == NULL)
return;
buffer[count++] = cpu_to_le32(PACKET3(PACKET3_PREAMBLE_CNTL, 0));
buf... | false | false | false | false | false | 0 |
normalizeAngleForShear(l_float32 radang,
l_float32 mindif)
{
l_float32 pi2;
PROCNAME("normalizeAngleForShear");
/* Bring angle into range [-pi/2, pi/2] */
pi2 = 3.14159265 / 2.0;
if (radang < -pi2 || radang > pi2)
radang = radang - (l_int32)(radang / pi2) * pi2;
... | false | false | false | false | false | 0 |
inc_qmaster_heartbeat(char *file, int write_timeout , int* beat_value) {
FILE *fp = NULL;
int hb = 1;
struct timeval start_time;
struct timeval end_time;
unsigned long write_time;
DENTER(TOP_LAYER, "inc_qmaster_heartbeat");
if (file == NULL) {
ERROR((SGE_EVENT, MSG_HEART_NO_FILENAME));
... | false | false | false | false | true | 1 |
prism54_acl_init(struct islpci_acl *acl)
{
mutex_init(&acl->lock);
INIT_LIST_HEAD(&acl->mac_list);
acl->size = 0;
acl->policy = MAC_POLICY_OPEN;
} | false | false | false | false | false | 0 |
rn_inithead(void **head, int off)
{
struct radix_node_head *rnh;
struct radix_node *t, *tt, *ttt;
if (*head)
return (1);
rnh = (struct radix_node_head *)rtmalloc(sizeof(*rnh), "rn_inithead");
Bzero(rnh, sizeof (*rnh));
*head = rnh;
t = rn_newpair(rn_zeros, off, rnh->rnh_nodes);
ttt = rnh->rnh_nodes + 2;
t->r... | false | false | false | false | false | 0 |
sge_host_get_mainname(host *h)
{
host *h1;
h1 = h;
while ((h = sge_host_search_pred_alias(h))) /* search start of alias chain */
h1 = h;
if (h1->mainname[0])
return h1->mainname;
return (char *) h1->he.h_name;
} | false | false | false | false | false | 0 |
_hash_addovflpage(Relation rel, Buffer metabuf, Buffer buf)
{
Buffer ovflbuf;
Page page;
Page ovflpage;
HashPageOpaque pageopaque;
HashPageOpaque ovflopaque;
/* allocate and lock an empty overflow page */
ovflbuf = _hash_getovflpage(rel, metabuf);
ovflpage = BufferGetPage(ovflbuf);
/*
* Write-lock the t... | false | false | false | false | false | 0 |
owlqn_x1norm(
const lbfgsfloatval_t* x,
const int start,
const int n
)
{
int i;
lbfgsfloatval_t norm = 0.;
for (i = start;i < n;++i) {
norm += fabs(x[i]);
}
return norm;
} | false | false | false | false | false | 0 |
printMode(unsigned mode) {
if (mode & 004)
outs() << "r";
else
outs() << "-";
if (mode & 002)
outs() << "w";
else
outs() << "-";
if (mode & 001)
outs() << "x";
else
outs() << "-";
} | false | false | false | false | false | 0 |
_dxf_NewArrayV(Type type, Category category, int rank, int *shape,
struct array_class *class)
{
int i;
Array a = (Array) _dxf_NewObject((struct object_class *)class);
if (!a)
return NULL;
/* specified info */
a->type = type;
a->category = category;
a->rank = rank;
if (shape && rank... | false | false | false | false | false | 0 |
update_drive_with_id (UDisksLinuxProvider *provider,
const gchar *id)
{
GHashTableIter iter;
UDisksLinuxDriveObject *drive_object;
/* TODO: could have a GHashTable from id to UDisksLinuxDriveObject */
g_hash_table_iter_init (&iter, provider->sysfs_path_to_drive);
while (g_hash_t... | false | false | false | false | false | 0 |
spawn_make_environment_for_screen (GdkScreen *screen,
gchar **envp)
{
gchar **retval = NULL;
gchar *display_name;
gint display_index = -1;
gint i, env_len;
g_return_val_if_fail (GDK_IS_SCREEN (screen), NULL);
if (envp == NU... | false | false | false | false | false | 0 |
r_dot_indexable_expr(ProgNodeP _t,
DotAccessDescT* aD
) {
BaseGDL* res;
ProgNodeP r_dot_indexable_expr_AST_in = (_t == ProgNodeP(ASTNULL)) ? ProgNodeP(antlr::nullAST) : _t;
switch ( _t->getType()) {
case EXPR:
{
ProgNodeP tIn = _t;
_t = _t->getFirstChild();
//res=expr(_t);
res = _t->Eval();
aD->... | false | false | false | false | true | 1 |
netsnmp_addrcache_destroy(void)
{
int i = 0;
for (i = 0; i < SNMP_ADDRCACHE_SIZE; i++) {
if (addrCache[i].status == SNMP_ADDRCACHE_USED) {
free(addrCache[i].addr);
addrCache[i].status = SNMP_ADDRCACHE_UNUSED;
}
}
} | false | false | false | false | false | 0 |
giblorb_initialize_map(giblorb_map_t *map)
{
/* It is important that the map structure be kept valid during this
function. If this returns an error, giblorb_destroy_map() will
be called. */
int ix, jx;
giblorb_result_t chunkres;
giblorb_err_t err;
char *ptr;
glui32 len;... | false | false | false | false | false | 0 |
__ecereMethod_ImportFolderFSI_OnFile(struct __ecereNameSpace__ecere__com__Instance * this, char * filePath)
{
struct __ecereNameSpace__ecere__com__Iterator __simpleStruct0;
struct ImportFolderFSI * __ecerePointer_ImportFolderFSI = (struct ImportFolderFSI *)(this ? (((char *)this) + __ecereClass_ImportFolderFSI->offset)... | false | false | false | true | false | 1 |
ArgusInitializeTCP (struct ArgusFlowStruct *flowstr)
{
unsigned char rev = flowstr->state.rev, dir = flowstr->state.dir;
flowstr->ArgusTransactionNum = ArgusTransactionNum++;
bzero ((char *)&flowstr->state, sizeof(flowstr->state));
flowstr->state.rev = rev;
flowstr->state.dir = dir;
flowstr->state.s... | false | false | false | false | false | 0 |
actionApplicable(BoolState &state, Action* a) {
for (int i = 0; i < numPreconds(a); i++)
if (!state[getPrecond(a,i)])
return false;
return true;
} | false | false | false | false | false | 0 |
egg_recent_model_sort (EggRecentModel *model, GList *list)
{
switch (model->priv->sort_type) {
case EGG_RECENT_MODEL_SORT_MRU:
list = g_list_sort (list,
(GCompareFunc)list_compare_func_mru);
break;
case EGG_RECENT_MODEL_SORT_LRU:
list = g_list_sort (list,
(GCompareFunc)list_compare_func_lru);
... | false | false | false | false | false | 0 |
_set_destination_type (ipmi_pef_config_state_data_t *state_data,
const char *section_name,
struct destination_type *dt)
{
fiid_obj_t obj_cmd_rs = NULL;
config_err_t rv = CONFIG_ERR_FATAL_ERROR;
config_err_t ret;
uint8_t channel_number;
uint8_t destination_selector... | false | false | false | false | true | 1 |
LocateLabels(FILE *inFilePtr, char *lineString,
char **labelPtr, char **opcodePtr,
char **arg0Ptr, char **arg1Ptr)
{
int currentLine = 0;
rewind(inFilePtr);
while(readAndParse(inFilePtr, lineString, labelPtr, opcodePtr, arg0Ptr, arg1Ptr)
!= NULL)
{
if(*labelPtr ... | false | false | false | false | false | 0 |
client_lk (call_frame_t *frame, xlator_t *this, fd_t *fd, int32_t cmd,
struct gf_flock *lock)
{
int ret = -1;
clnt_conf_t *conf = NULL;
rpc_clnt_procedure_t *proc = NULL;
clnt_args_t args = {0,};
conf = this->private;
if (!conf || !conf->fops)
... | false | false | false | false | false | 0 |
polkit_authority_revoke_temporary_authorizations (PolkitAuthority *authority,
PolkitSubject *subject,
GCancellable *cancellable,
GAsyncReadyCallback cal... | false | false | false | false | false | 0 |
getPrivConfDir() {
static char cfgdir[PATH_MAX] = "";
if (*cfgdir == '\0') {
const char *env = getenv("ICEWM_PRIVCFG");
if (NULL == env) {
env = getenv("HOME");
strcpy(cfgdir, env ? env : "");
strcat(cfgdir, "/.icewm");
} else {
strcpy(cf... | false | false | false | false | false | 0 |
manager_notify_is_loaded_cb (GObject *object,
GParamSpec *pspec,
gpointer user_data)
{
ActUserManager *manager = ACT_USER_MANAGER (object);
gboolean loaded;
g_object_get (manager, "is-loaded", &loaded, NULL);
if (loaded) {... | false | false | false | false | false | 0 |
unit_assassinated()
{
//---------------- Text Format -----------------//
//
// Your King, <king name>, has been assassinated by an enemy spy.
// Your general, <general name>, has been assassinated by an enemy spy.
//
// [The enemy spy has been killed.]
//
//----------------------------------------------//
if(... | false | false | false | false | false | 0 |
cache_parserecord(struct buf *cachebase, unsigned cache_offset,
struct cacherecord *crec)
{
unsigned cache_ent;
unsigned offset;
const char *cacheitem, *next;
offset = cache_offset;
if (offset >= cachebase->len) {
syslog(LOG_ERR, "IOERROR: offset greater than cache size");
return IMAP_IO... | false | false | false | false | false | 0 |
cddb_track_new(void)
{
cddb_track_t *track;
track = (cddb_track_t*)calloc(1, sizeof(cddb_track_t));
if (track) {
track->num = -1;
track->frame_offset = -1;
track->length = -1;
track->disc = NULL;
} else {
cddb_log_crit(cddb_error_str(CDDB_ERR_OUT_OF_MEMORY));
... | false | false | false | false | false | 0 |
applyCompute(LitVec& compute, uint32 start, bool strong) {
uint32 newStart = (uint32)compute.size();
for (LitVec::size_type i = start; i < compute.size(); ++i) {
Var atomId = prg_->getEqAtom(compute[i].var());
PrgAtomNode* atom = prg_->atoms_[atomId];
if (strong) {
// We can safely remove atom from bo... | false | false | false | false | false | 0 |
append_data_payload(const string& str)
{
length += str.size();
if (!payload.empty()) {
if (payload.back().type == PayloadElement::DATA) {
payload.back().data.append(str);
return;
}
}
PayloadElement e;
e.type = PayloadElement::DATA;
e.data = str;
payload.push_back(e);
} | false | false | false | false | false | 0 |
pack_objects(int fd, struct ref *refs, struct extra_have_objects *extra, struct send_pack_args *args)
{
/*
* The child becomes pack-objects --revs; we feed
* the revision parameters to it via its stdin and
* let its stdout go back to the other end.
*/
const char *argv[] = {
"pack-objects",
"--all-progress... | false | false | false | false | false | 0 |
construct(ExecState *exec, const List &args)
{
JSObject *o = args[0]->getObject();
if (o && o->inherits(&RegExpImp::info)) {
if (!args[1]->isUndefined())
return throwError(exec, TypeError);
return o;
}
UString p = args[0]->isUndefined() ? UString("") : args[0]->toString(exec);
RegExp* re = mak... | false | false | false | false | false | 0 |
do_mount(const char *dev_name, const char __user *dir_name,
const char *type_page, unsigned long flags, void *data_page)
{
struct path path;
int retval = 0;
int mnt_flags = 0;
/* Discard magic */
if ((flags & MS_MGC_MSK) == MS_MGC_VAL)
flags &= ~MS_MGC_MSK;
/* Basic sanity checks */
if (data_page)
((char... | false | false | false | false | false | 0 |
cmp_uri(GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, gpointer user)
{
DirPane *dp = user;
GFileInfo *fia, *fib;
GFile *fa, *fb;
gint r;
gtk_tree_model_get(model, a, COL_INFO, &fia, -1);
fa = dp_get_file_from_row(dp, a);
gtk_tree_model_get(model, b, COL_INFO, &fib, -1);
fb = dp_get_file_from_row(dp, ... | false | false | false | false | false | 0 |
getConstantNode(double value, Model &model)
{
ConstantNode *cnode = 0;
map<double, ConstantNode*, ltdouble>::const_iterator i
= _constmap.find(value);
if (i == _constmap.end()) {
if (checkInteger(value)) {
cnode = new ConstantNode(asInteger(value), _nchain);
}
else {
cnode = new ConstantNode... | false | false | false | false | false | 0 |
createPopupDropper( QWidget * parent, bool ignoreEmptyParent )
{
DEBUG_BLOCK
// Lazy loading of widgets not currently shown in layout means that parent could be zero
// if this happens, it pops up in its own window -- so detect this
// ignoreEmptyParent is for creating submenus, where you set the initi... | false | false | false | false | false | 0 |
WriteRayFile(const char *filename)
{
// Open file
FILE *fp;
if (!(fp = fopen(filename, "w"))) {
RNFail("Unable to open file %s", filename);
return 0;
}
// Write vertices
for (int i = 0; i < NVertices(); i++) {
R3MeshVertex *vertex = Vertex(i);
const R3Point& p = VertexPosition(vertex);
... | false | false | false | false | false | 0 |
efx_mcdi_mtd_write(struct mtd_info *mtd, loff_t start,
size_t len, size_t *retlen, const u8 *buffer)
{
struct efx_mcdi_mtd_partition *part = to_efx_mcdi_mtd_partition(mtd);
struct efx_nic *efx = mtd->priv;
loff_t offset = start;
loff_t end = min_t(loff_t, start + len, mtd->size);
size_t chunk;
int rc = 0... | false | false | false | false | false | 0 |
describeAnything(int instance)
{
if (instances[instance].description != 0) {
/* This instance has its own description, run it */
interpret(instances[instance].description);
} else {
/* Search up the inheritance tree to find a description */
if (instances[instance].parent != 0)
... | false | false | false | false | false | 0 |
gtr_header_set_plural_forms (GtrHeader * header, const gchar * plural_forms)
{
g_return_if_fail (GTR_IS_HEADER (header));
g_return_if_fail (plural_forms != NULL);
gtr_header_set_field (header, "Plural-Forms", plural_forms);
/*Now we parse the plural forms to know the number of plurals */
parse_nplurals (hea... | false | false | false | false | false | 0 |
AfficheTotal ( void )
{
int i ;
float Total = 0 ;
for ( i = 0 ; i < NBR_SOMMET ; i++ )
Total += Matrice_Conso [ 0 ][ i ] ;
CYAN
printf ( "\nFlot total : %.2f\n\n", Total ) ;
DEFAULT_COLOR
} | false | false | false | false | false | 0 |
fsl_ssi_rxtx_config(struct fsl_ssi_private *ssi_private,
bool enable)
{
struct regmap *regs = ssi_private->regs;
struct fsl_ssi_rxtx_reg_val *vals = &ssi_private->rxtx_reg_val;
if (enable) {
regmap_update_bits(regs, CCSR_SSI_SIER,
vals->rx.sier | vals->tx.sier,
vals->rx.sier | vals->tx.sier);
regmap_u... | false | false | false | false | false | 0 |
count_basic_units (NODE_T * p, int * total, int * good)
{
for (; p != NO_NODE; FORWARD (p)) {
if (IS (p, UNIT)) {
(* total) ++;
if (basic_unit (p)) {
(* good) ++;
}
} else if (IS (p, DECLARATION_LIST)) {
(* total) ++;
} else {
count_basic_units (SUB (p), total, good);... | false | false | false | false | false | 0 |
_gnutls_x509_set_time (ASN1_TYPE c2, const char *where, time_t tim)
{
char str_time[MAX_TIME];
char name[128];
int result, len;
_gnutls_str_cpy (name, sizeof (name), where);
if ((result = asn1_write_value (c2, name, "utcTime", 1)) < 0)
{
gnutls_assert ();
return _gnutls_asn2err (result);
... | false | false | false | false | false | 0 |
_check_job_compatibility(struct job_record *job_ptr,
bitstr_t *avail_bitmap,
bitstr_t **core_bitmap)
{
uint32_t total_nodes;
bitstr_t *full_node_bitmap;
int i_core, i_node;
int start = 0;
int rep_count = 0;
char str[200];
job_resources_t *job_res = job_ptr->job_resrcs;
total_nodes = bit_set_c... | false | false | false | false | false | 0 |
assoc_mgr_set_missing_uids()
{
uid_t pw_uid;
ListIterator itr = NULL;
assoc_mgr_lock_t locks = { WRITE_LOCK, NO_LOCK,
NO_LOCK, WRITE_LOCK, WRITE_LOCK };
assoc_mgr_lock(&locks);
if (assoc_mgr_association_list) {
slurmdb_association_rec_t *object = NULL;
itr = list_iterator_create(assoc_mgr_association_l... | false | false | false | false | false | 0 |
my_write(void)
{
switch (global_opts.objective) {
case wptdata:
case unknown_gpsdata:
ohandle = SHPCreate(ofname, SHPT_POINT);
if (ohandle == NULL) {
fatal(MYNAME ":Cannot open %s for writing\n",
ofname);
}
waypt_disp_all(my_write_wpt);
break;
case trkdata:
ohandle = S... | false | false | false | false | false | 0 |
svcauth_gss_destroy(SVCAUTH *auth)
{
struct svc_rpc_gss_data *gd;
OM_uint32 min_stat;
log_debug("in svcauth_gss_destroy()");
gd = SVCAUTH_PRIVATE(auth);
gss_delete_sec_context(&min_stat, &gd->ctx, GSS_C_NO_BUFFER);
gss_release_buffer(&min_stat, &gd->cname);
gss_release_buffer(&min_stat, &gd->checksum);
if... | false | false | false | false | false | 0 |
inbound_away (server *serv, char *nick, char *msg,
const message_tags_data *tags_data)
{
struct away_msg *away = server_away_find_message (serv, nick);
session *sess = NULL;
GSList *list;
if (away && !strcmp (msg, away->message)) /* Seen the msg before? */
{
if (prefs.hex_away_show_once && !serv->inside_w... | false | false | false | false | false | 0 |
int2dbl(int64_t v){
if(v+v > 0xFFEULL<<52)
return 0.0/0.0;
return ldexp(((v&((1LL<<52)-1)) + (1LL<<52)) * (v>>63|1), (v>>52&0x7FF)-1075);
} | false | false | false | false | false | 0 |
sys_io_submit(struct tcb *tcp)
{
long nr;
if (entering(tcp)) {
tprintf("%lu, %ld, ", tcp->u_arg[0], tcp->u_arg[1]);
nr = tcp->u_arg[1];
/* and if nr is negative? */
if (nr == 0)
tprintf("{}");
else {
#ifdef HAVE_LIBAIO_H
long i;
struct iocb *iocbp, **iocbs = (void *)tcp->u_arg[2];
for (i = 0; i... | false | false | false | false | false | 0 |
auok190x_suspend(struct device *dev)
{
struct platform_device *pdev = to_platform_device(dev);
struct fb_info *info = platform_get_drvdata(pdev);
struct auok190xfb_par *par = info->par;
struct auok190x_board *board = par->board;
int ret;
dev_dbg(dev, "suspend\n");
if (board->quirks & AUOK190X_QUIRK_STANDBYBROKE... | false | false | false | false | false | 0 |
do_pg_abort_backup(void)
{
LWLockAcquire(WALInsertLock, LW_EXCLUSIVE);
Assert(XLogCtl->Insert.nonExclusiveBackups > 0);
XLogCtl->Insert.nonExclusiveBackups--;
if (!XLogCtl->Insert.exclusiveBackup &&
XLogCtl->Insert.nonExclusiveBackups == 0)
{
XLogCtl->Insert.forcePageWrites = false;
}
LWLockRelease(WALInser... | false | false | false | false | false | 0 |
HslValue (double n1, double n2, double hue)
{//===================================================
double value;
if (hue > 255)
hue -= 255;
else if (hue < 0)
hue += 255;
if (hue < 42.5)
value = n1 + (n2 - n1) * (hue / 42.5);
else if (hue < 127.5)
value = n2;
else if (hue < 170)
value = n1 + (n2 - n1... | false | false | false | false | false | 0 |
lns_format_rep_atype(struct lens *l, char **buf, char quant) {
char *a = NULL;
int r, result = -1;
r = lns_format_atype(l->child, &a);
if (r < 0)
goto done;
if (strlen(a) == 0) {
*buf = a;
a = NULL;
result = 0;
goto done;
}
if (l->child->tag == L_CON... | false | false | false | false | false | 0 |
gucharmap_chartable_button_release (GtkWidget *widget,
GdkEventButton *event)
{
GucharmapChartable *chartable = GUCHARMAP_CHARTABLE (widget);
gboolean (* button_press_event) (GtkWidget *, GdkEventButton *) =
GTK_WIDGET_CLASS (gucharmap_chartable_parent_class)->button_release_... | false | false | false | false | false | 0 |
dailyScheme(const int scheme)
{
return dailySchemeList().at(scheme);
} | false | false | false | false | false | 0 |
mlx4_map_phys_fmr(struct mlx4_dev *dev, struct mlx4_fmr *fmr, u64 *page_list,
int npages, u64 iova, u32 *lkey, u32 *rkey)
{
u32 key;
int i, err;
err = mlx4_check_fmr(fmr, page_list, npages, iova);
if (err)
return err;
++fmr->maps;
key = key_to_hw_index(fmr->mr.key);
key += dev->caps.num_mpts;
*lkey... | false | false | false | false | false | 0 |
gui_color_init(GtkWidget *widget)
{
static gboolean initialized;
GdkColormap *cmap;
guint i;
if (initialized)
return;
initialized = TRUE;
STATIC_ASSERT(NUM_GUI_COLORS == G_N_ELEMENTS(colors));
cmap = gdk_colormap_get_system();
g_assert(cmap);
for (i = 0; i < NUM_GUI_COLORS; i++) {
GdkColor color;
... | false | false | false | false | false | 0 |
kkam_read_list (KKamPanel *p, char *listname, int depth)
{
KKamSource *ks = NULL;
SourceEnum typ;
FILE *listfile;
char buf[BUFLEN];
int thislist_error = 0;
if (depth > MAX_DEPTH)
{
report_error (p, _("Maximum recursion depth exceeded reading list %s; "
"perhaps a list is trying to l... | false | false | false | false | false | 0 |
skipInput(_CORBA_ULong size)
{
_CORBA_ULong orig_size = size;
omni::ptr_arith_t p1, p2;
p1 = (omni::ptr_arith_t)pd_inb_mkr;
p2 = p1 + size;
if (p2 <= (omni::ptr_arith_t)pd_inb_end) {
pd_inb_mkr = (void*)p2;
return;
}
if (pd_inHeader) {
OMNIORB_ASSERT(!pd_inChunk);
copyStateToActual();
... | false | false | false | false | false | 0 |
sigar_net_connection_walk(sigar_net_connection_walker_t *walker)
{
int flags = walker->flags;
int status;
if (flags & SIGAR_NETCONN_TCP) {
status = proc_net_read(walker,
PROC_FS_ROOT "net/tcp",
SIGAR_NETCONN_TCP);
if (status != ... | false | false | false | false | false | 0 |
shoot (int fd)
{
struct termios tty_temp, tty_old;
int result = 0;
DBG (127, "shoot() called\n");
if (write (fd, (char *) shoot_pck, 8) != 8)
{
DBG (3, "shoot: error: write error\n");
return -1;
}
if (CameraInfo.model != 0x25)
{
/*
* WARNING: now we set the serial ... | false | true | false | false | true | 1 |
update()
{
if (!_dirty) return;
#if TRACE_DEBUG
qDebug("Update %s (Callers %d, sourceFiles %d, instrs %d)",
qPrintable(_name), _callers.count(),
_sourceFiles.count(), _instrMap ? _instrMap->count():0);
#endif
_calledCount = 0;
_callingCount = 0;
_calledContexts = 0;
_callingContexts = 0;... | false | false | false | false | false | 0 |
emitInputNonStructParam(GlslSymbol* sym, EShLanguage lang, bool usePrecision, EAttribSemantic attrSem, std::stringstream& attrib, std::stringstream& varying, std::stringstream& preamble, std::stringstream& call)
{
std::string name, ctor;
int pad;
if (!getArgumentData (sym, lang==EShLangVertex ? EClassAttrib : ECla... | false | false | false | false | false | 0 |
leavePendingBtyvs() {
List pts = hd(pendingBtyvs);
pendingBtyvs = tl(pendingBtyvs);
for (; nonNull(pts); pts=tl(pts)) {
Int line = intOf(fst(hd(pts)));
List vs = snd(hd(pts));
Int i = 0;
clearMarks();
for (; nonNull(vs); vs=tl(vs)) {
Cell v = fst(hd(vs));
Cell t = copyTyvar(intOf(s... | false | false | false | false | false | 0 |
event_unregister_poll (struct event_pool *event_pool, int fd, int idx_hint)
{
int idx = -1;
GF_VALIDATE_OR_GOTO ("event", event_pool, out);
pthread_mutex_lock (&event_pool->mutex);
{
idx = __event_getindex (event_pool, fd, idx_hint);
if (idx == -1) {
... | false | false | false | false | false | 0 |
quick_idist (GMT_LONG x1, GMT_LONG y1, GMT_LONG x2, GMT_LONG y2)
{
if ((x2 -= x1) < 0) x2 = -x2;
if ((y2 -= y1) < 0) y2 = -y2;
return (x2 + y2 - (((x2 > y2) ? y2 : x2) >> 1));
} | false | false | false | false | false | 0 |
generateFpFooter(
const SM2Profile* prof, const Terrain* terrain, TechniqueType tt, StringStream& outStream)
{
if (tt == LOW_LOD)
{
if (prof->isShadowingEnabled(tt, terrain))
{
generateFpDynamicShadows(prof, terrain, tt, outStream);
ou... | false | false | false | false | false | 0 |
handleColumnSizeChange(const EventArgs&)
{
configureScrollbars();
// signal change to our clients
WindowEventArgs args(this);
onListColumnSized(args);
return true;
} | false | false | false | false | false | 0 |
buf_writefile(buffer * buf, const char * filename) {
int fd;
int len;
fd = open(filename, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR);
if (fd < 0) {
fprintf(stderr, "Couldn't create new file %s\n", filename);
perror("Reason");
buf_burn(buf);
exit(EXIT_FAILURE);
}
/* write the file now */
while (buf-... | false | false | false | false | false | 0 |
trx_undo_header_add_space_for_xid(
/*==============================*/
page_t* undo_page,/*!< in: undo log segment header page */
trx_ulogf_t* log_hdr,/*!< in: undo log header */
mtr_t* mtr) /*!< in: mtr */
{
trx_upagef_t* page_hdr;
ulint free;
ulint new_free;
page_hdr = undo_page + TRX_UNDO_PAGE_HDR;
free... | false | false | false | false | false | 0 |
div_bpi_list(List *bpi_list, Peel_info *peel_head,
List **ptr_list_lower, List **ptr_list_upper)
{
Peel_info *p;
List *li;
List *list_lower = NULL;
List *list_upper = NULL;
li = bpi_list;
for(p = peel_head; p != NULL; p = p->next){
if(p->is_lower)
list_lower = l... | false | false | false | false | false | 0 |
static_center (gamgi_plane *plane)
{
int n;
gamgi_math_vector_zero (plane->center);
/*********************************
* at least one point must exist *
*********************************/
for (n = 0; n < plane->n_points; n++)
{
plane->center[0] += plane->points[3*n + 0];
plane->center[1] += plane->points[3*n... | false | false | false | false | false | 0 |
_x11_dnd_enter(void *data __UNUSED__, int etype __UNUSED__, void *ev)
{
Ecore_X_Event_Xdnd_Enter *enter = ev;
int i;
/* Skip it */
cnp_debug("enter %p\n", enter);
cnp_debug("enter types=%p (%d)\n", enter->types, enter->num_types);
if ((!enter) || (!enter->num_types) || (!enter->types)) return EINA_TR... | false | false | false | false | false | 0 |
zdiv(dcomplex *c, dcomplex *a, dcomplex *b)
#endif
{
double ratio, den;
double abr, abi;
if( (abr = b->dreal) < 0.)
abr = - abr;
if( (abi = b->dimag) < 0.)
abi = - abi;
if( abr <= abi )
{
if(abi == 0)
Fatal("complex division by zero");
ratio = b->dreal / b->dimag ;
den = b->dimag * (1 + ratio*ratio)... | false | false | false | false | false | 0 |
creg_cmd_timed_out(unsigned long data)
{
struct rsxx_cardinfo *card = (struct rsxx_cardinfo *) data;
struct creg_cmd *cmd;
spin_lock(&card->creg_ctrl.lock);
cmd = card->creg_ctrl.active_cmd;
card->creg_ctrl.active_cmd = NULL;
spin_unlock(&card->creg_ctrl.lock);
if (cmd == NULL) {
card->creg_ctrl.creg_stats.c... | 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.