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 |
|---|---|---|---|---|---|---|
ship_change_goods()
{
err_when( id != MSG_U_SHIP_CHANGE_GOODS );
// packet structure <unit recno> <stop id> <new pick_up_type>
short *shortPtr = (short *)data_buf;
short unitCount =1;
validate_selected_unit_array(shortPtr, unitCount);
if( unitCount > 0)
{
Unit *unitPtr = unit_array[*shortPtr];
UnitMarine *s... | false | false | false | false | true | 1 |
wl3501_set_essid(struct net_device *dev,
struct iw_request_info *info,
union iwreq_data *wrqu, char *extra)
{
struct wl3501_card *this = netdev_priv(dev);
if (wrqu->data.flags) {
iw_set_mgmt_info_element(IW_MGMT_INFO_ELEMENT_SSID,
&this->essid.el,
extra, wrqu->data.length);
} else { /* W... | false | false | false | false | false | 0 |
PopFront(List * l, void *result)
{
ListElement *le;
if (l == NULL) {
iError.RaiseError("iList.PopFront", CONTAINER_ERROR_BADARG);
return CONTAINER_ERROR_BADARG;
}
if (l->Flags & CONTAINER_READONLY) {
return ErrorReadOnly(l, "PopFront");
}
if (l->count == 0)
re... | false | false | false | false | false | 0 |
compute_missing (gcry_mpi_t rsa_p, gcry_mpi_t rsa_q, gcry_mpi_t rsa_e)
{
gcry_mpi_t rsa_n, rsa_d, rsa_pm1, rsa_qm1, rsa_u;
gcry_mpi_t phi, tmp_g, tmp_f;
rsa_n = gcry_mpi_new (0);
rsa_d = gcry_mpi_new (0);
rsa_pm1 = gcry_mpi_new (0);
rsa_qm1 = gcry_mpi_new (0);
rsa_u = gcry_mpi_new (0);
phi = gcry_mpi_... | false | false | false | false | true | 1 |
svginitgraphics(void)
{
/* device-dependent routines */
devupdatecmap = svg_updatecmap;
devdrawpixel = svg_drawpixel;
devdrawpolyline = svg_drawpolyline;
devfillpolygon = svg_fillpolygon;
devdrawarc = svg_drawarc;
devfillarc = svg_fillarc;
devputpixmap = svg_putpi... | false | false | false | false | false | 0 |
sil24_dev_config(struct ata_device *dev)
{
void __iomem *port = sil24_port_base(dev->link->ap);
if (dev->cdb_len == 16)
writel(PORT_CS_CDB16, port + PORT_CTRL_STAT);
else
writel(PORT_CS_CDB16, port + PORT_CTRL_CLR);
} | false | false | false | false | false | 0 |
cc_handler_mupd (gchar *data, gint data_len)
{
gint offset = 0;
gboolean do_break = FALSE;
gchar *current_data, *data_end;
cc_data_t *fields;
current_data = data + 8;
data_end = data + data_len;
fields = cc_data_new ();
while ((current_data < data_end) && !do_break) {
switch (CC_TO_INT (current_data[0], cu... | false | false | false | false | false | 0 |
cfg_text_screen_dump()
{
char buf[85];
char *filename;
FILE *ofile;
int offset;
int c;
int pos;
int i, j;
filename = "kegs.screen.dump";
printf("Writing text screen to the file %s\n", filename);
ofile = fopen(filename, "w");
if(ofile == 0) {
fatal_printf("Could not write to file %s, (%d)\n", filename,
... | true | true | false | false | true | 1 |
__ecereMethod___ecereNameSpace__eda__DataSource_OpenDatabase(struct __ecereNameSpace__ecere__com__Instance * this, const char * name, int create)
{
struct __ecereNameSpace__eda__DataSource * __ecerePointer___ecereNameSpace__eda__DataSource = (struct __ecereNameSpace__eda__DataSource *)(this ? (((char *)this) + __ecereC... | false | false | false | true | false | 1 |
sv2bn( SV* sv )
{
if( ! SvROK( sv ) )
{
croak( "argument is not a Crypt::OpenSSL::Bignum object" );
}
return (BIGNUM*) SvIV( SvRV( sv ) );
} | false | false | false | false | false | 0 |
proc_task_readdir(struct file *file, struct dir_context *ctx)
{
struct inode *inode = file_inode(file);
struct task_struct *task;
struct pid_namespace *ns;
int tid;
if (proc_inode_is_dead(inode))
return -ENOENT;
if (!dir_emit_dots(file, ctx))
return 0;
/* f_version caches the tgid value that the last read... | false | false | false | false | false | 0 |
WriteHeader(char **buf, // target pointer, maybe preallocated
unsigned int len // length of buffer if preallocated
)
{
char flvHeader[] = { 'F', 'L', 'V', 0x01,
0x05, // video + audio, we finalize later if the value is different
0x00, 0x00, 0x00, 0x09,
0x00, 0x00, 0x00, 0x00 // first prevTagSize... | false | false | false | false | false | 0 |
globus_gss_assist_map_local_user(
char * local_user,
char ** globusidp)
{
char * gridmap_filename = NULL;
globus_result_t result = GLOBUS_SUCCESS;
globus_i_gss_assist_gridmap_line_t *
... | false | false | false | false | false | 0 |
writeLodLevel(const Mesh* pMesh)
{
const LodStrategy *strategy = pMesh->getLodStrategy();
exportedLodCount = pMesh->getNumLodLevels();
writeChunkHeader(M_MESH_LOD_LEVEL, calcLodLevelSize(pMesh));
writeString(strategy->getName()); // string strategyName;
writeShorts(&exportedL... | false | false | false | false | false | 0 |
ooCreateCallCmdConnection(OOH323CallData* call)
{
int ret = 0;
int thePipe[2];
OOTRACEINFO2("INFO: create cmd connect for call: %lx\n", call);
call->CmdChanLock = calloc(1, sizeof(ast_mutex_t));
ast_mutex_init(call->CmdChanLock);
if ((ret = socketpair(PF_LOCAL, SOCK_STREAM, 0, thePipe)) == -1) {
... | false | false | false | false | false | 0 |
build_tools_preferences_update_personal_store (BuildToolsPreferences* self) {
GtkListStore* _tmp0_ = NULL;
PersonalBuildTools* _tmp1_ = NULL;
PersonalBuildTools* _tmp2_ = NULL;
g_return_if_fail (self != NULL);
_tmp0_ = self->priv->_personal_store;
_tmp1_ = personal_build_tools_get_default ();
_tmp2_ = _tmp1_;
b... | false | false | false | false | false | 0 |
insertionSort(const uchar** arr, size_t n, int lcp, uint *lcps) {
for(size_t i=0; i<n; ++i) {
const uchar* cur = arr[i];
// cout<<"inserting "<<cur<<'\n';
size_t l = lcp;
size_t j;
for(j=i; j; --j) {
size_t pl = l;
if (lcps[j]<pl || !lcpCmp(cur, arr[j-1], &l)) {
// cout<<"breaking: "<<lcps[j-1]<<' '<... | false | false | false | false | false | 0 |
f_useoccurlistphylum(ID id)
{{
ID kc_selvar_0_1 = phylum_cast<ID>(id);
if ((kc_selvar_0_1->prod_sel() == sel_Id)) {
const uniqID uid = phylum_cast<const impl_ID_Id*>(kc_selvar_0_1)->uniqID_1;
{
IDtype kc_selvar_1_1 = phylum_cast<IDtype>( uid->type );
if ((kc_selvar_1_1->prod_sel() == sel_ITUserPhylum)) ... | false | false | false | false | false | 0 |
alloc_retstack_tasklist(struct ftrace_ret_stack **ret_stack_list)
{
int i;
int ret = 0;
unsigned long flags;
int start = 0, end = FTRACE_RETSTACK_ALLOC_SIZE;
struct task_struct *g, *t;
for (i = 0; i < FTRACE_RETSTACK_ALLOC_SIZE; i++) {
ret_stack_list[i] = kmalloc(FTRACE_RETFUNC_DEPTH
* sizeof(struct ftrac... | false | false | false | false | false | 0 |
qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
if (_c == QMetaObject::InvokeMetaMethod) {
Q_ASSERT(staticMetaObject.cast(_o));
ContactList *_t = static_cast<ContactList *>(_o);
switch (_id) {
case 0: _t->dataChanged(); break;
case 1: _t->setShowOf... | false | false | false | false | false | 0 |
X86SelectZExt(const Instruction *I) {
// Handle zero-extension from i1 to i8, which is common.
if (!I->getOperand(0)->getType()->isIntegerTy(1))
return false;
EVT DstVT = TLI.getValueType(I->getType());
if (!TLI.isTypeLegal(DstVT))
return false;
unsigned ResultReg = getRegForValue(I->getOperand(0));... | false | false | false | false | false | 0 |
readable() const
{
struct stat s;
if (!_path)
return false;
return _actual || (_path && (stat(_path.c_str(), &s) >= 0));
} | false | false | false | false | false | 0 |
isl_vec_is_equal(__isl_keep isl_vec *vec1, __isl_keep isl_vec *vec2)
{
if (!vec1 || !vec2)
return -1;
if (vec1->size != vec2->size)
return 0;
return isl_seq_eq(vec1->el, vec2->el, vec1->size);
} | false | false | false | false | false | 0 |
gucharmap_unichar_type (gunichar uc)
{
gint min = 0;
gint mid;
gint max = sizeof (unicode_categories) / sizeof (UnicodeCategory) - 1;
if (uc < unicode_categories[0].start || uc > unicode_categories[max].end)
return G_UNICODE_UNASSIGNED;
while (max >= min)
{
mid = (min + max) / 2;
if (uc... | false | false | false | false | false | 0 |
errorCode() const
{
SecureMessage::Error e = SecureMessage::ErrorUnknown;
if(op_err == GpgOp::ErrorProcess)
e = SecureMessage::ErrorUnknown;
else if(op_err == GpgOp::ErrorPassphrase)
e = SecureMessage::ErrorPassphrase;
else if(op_err == GpgOp::ErrorFormat)
e = SecureMessage::ErrorFormat;
else if(op_... | false | false | false | false | false | 0 |
SetLocation(uint64_t start, uint64_t length) {
int validCHS;
if ((start > UINT32_MAX) || (length > UINT32_MAX)) {
cerr << "Partition values out of range in MBRPart::SetLocation()!\n"
<< "Continuing, but strange problems are now likely!\n";
} // if
firstLBA = (uint32_t) start;
lengthLBA ... | false | false | false | false | false | 0 |
signal (int signal_)
{
zmq_assert (signal_ >= 0 && signal_ < 64);
uint64_t inc = 1;
inc <<= signal_;
ssize_t sz = write (fd, &inc, sizeof (uint64_t));
errno_assert (sz == sizeof (uint64_t));
} | false | false | false | false | false | 0 |
stats_arena_print(void (*write_cb)(void *, const char *), void *cbopaque,
unsigned i, bool bins, bool large)
{
unsigned nthreads;
size_t page, pactive, pdirty, mapped;
uint64_t npurge, nmadvise, purged;
size_t small_allocated;
uint64_t small_nmalloc, small_ndalloc, small_nrequests;
size_t large_allocated;
ui... | false | false | false | false | false | 0 |
ptr_on_stack (void *ptr)
{
gpointer stack_start = &stack_start;
SgenThreadInfo *info = mono_thread_info_current ();
if (ptr >= stack_start && ptr < (gpointer)info->stack_end)
return TRUE;
return FALSE;
} | false | false | false | false | false | 0 |
srunner_run_teardown (List * l)
{
Fixture *f;
for (list_front (l); !list_at_end (l); list_advance (l)) {
f = list_val (l);
send_ctx_info (CK_CTX_TEARDOWN);
f->fun ();
}
} | false | false | false | false | false | 0 |
ctl_parse_options(struct ctl_string *s)
{
struct ctl_tok *tok = ctl_next_token(s);
char *opt = NULL;
if (CTL_TOK_ID != tok->type) {
ctl_error(s, tok, "country options");
} else {
opt = h_strdup(tok->val.s);
}
ctl_token_free_null(&tok);
return opt;
} | false | false | false | false | false | 0 |
statement(Program *prog, int subs)
{
String *dest;
int result;
opcmd_t opcmd, *opcmdp = NULL;
opcmd.ptr = NULL;
if (ip[0] != '/' || subs <= SUB_LITERAL) {
opcmd.op = OP_SEND;
} else if (ip[1] == '/') {
ip++;
opcmd.op = OP_SEND;
} else {
ip++;
opcmd.op = OP_EXECUTE;
opcmdp = &opcmd;
... | false | false | false | false | false | 0 |
resize_segment (struct context *c, int seg_num, int inc_dec)
{
int i;
struct anthy_conv_stat cs;
if (anthy_get_stat(c->ac, &cs) < 0)
return -1;
/* Replace all segments after SEG_NUM */
c->removed = cs.nr_segment - seg_num;
anthy_resize_segment(c->ac, seg_num, inc_dec?-1:1);
if (anthy_get_stat(c->ac,... | false | false | false | false | false | 0 |
powtodb_tilde_perform(t_int *w)
{
t_sample *in = *(t_sample **)(w+1), *out = *(t_sample **)(w+2);
t_int n = *(t_int *)(w+3);
for (; n--; in++, out++)
{
t_sample f = *in;
if (f <= 0) *out = 0;
else
{
t_sample g = 100 + 10./LOGTEN * log(f);
*out = (g... | false | false | false | false | false | 0 |
rgn_insn_finishes_block_p (rtx insn)
{
if (INSN_BB (insn) == target_bb
&& sched_target_n_insns + 1 == target_n_insns)
/* INSN is the last not-scheduled instruction in the current block. */
return true;
return false;
} | false | false | false | false | false | 0 |
mysql_db_async_ready(SV* h)
{
dTHX;
D_imp_xxh(h);
imp_dbh_t* dbh;
int htype;
htype = DBIc_TYPE(imp_xxh);
if(htype == DBIt_DB) {
D_imp_dbh(h);
dbh = imp_dbh;
} else {
D_imp_sth(h);
D_imp_dbh_from_sth;
dbh = imp_dbh;
}
if(dbh->async_query_in_flight) {
if(dbh->asy... | false | false | false | false | false | 0 |
quoted_encode_simple(const unsigned char *string, int len)
{
GString *tmp = g_string_new("");
int i = 0;
while(string[i] != 0) {
if (string[i] > 127 || string[i] == 13 || string[i] == 10 || string[i] == '=') {
g_string_append_printf(tmp, "=%02X", string[i]);
} else {
g_string_append_c(tmp, string[i]);
}... | false | false | false | false | false | 0 |
whlp_linkdata_cushort(WHLP h, int which, int data)
{
if (data <= 0x7F) {
whlp_linkdata(h, which, data*2);
} else {
whlp_linkdata(h, which, 1 + (data%128 * 2));
whlp_linkdata(h, which, data/128);
}
} | false | false | false | false | false | 0 |
deferred_op_queue_enqueue(gchar* filename, DeferredTagOpType type)
{
DeferredTagOp * op;
op = (DeferredTagOp *) g_new0(DeferredTagOp, 1);
op->type = type;
op->filename = g_strdup(filename);
file_tag_deferred_op_queue = g_slist_prepend(file_tag_deferred_op_queue,op);
if (!flush_queued)
{
flush_queued = TRUE;... | false | false | false | false | false | 0 |
read_callback(FLAC__byte buffer[], size_t *bytes)
{
if(*bytes > 0) {
*bytes = fread(buffer, sizeof(FLAC__byte), *bytes, file_);
if(ferror(file_))
return ::FLAC__STREAM_ENCODER_READ_STATUS_ABORT;
else if(*bytes == 0)
return ::FLAC__STREAM_ENCODER_READ_STATUS_END_OF_STREAM;
else
return ::FLAC__STREAM_EN... | false | false | false | false | false | 0 |
getSendFolder(const smtpInfo &info,
const mail::folder *folder,
std::string &errmsg)
{
if (!smap)
return mail::account::getSendFolder(info, folder, errmsg);
if (folder)
{
sameServerFolderPtr=NULL;
folder->sameServerAsHelperFunc();
if (!sameServerFolderPtr)
return mail::account::getSendFolder(... | false | false | false | false | false | 0 |
be_cmd_modify_eqd(struct be_adapter *adapter, struct be_set_eqd *set_eqd,
int num)
{
int num_eqs, i = 0;
while (num) {
num_eqs = min(num, 8);
__be_cmd_modify_eqd(adapter, &set_eqd[i], num_eqs);
i += num_eqs;
num -= num_eqs;
}
return 0;
} | false | false | false | false | false | 0 |
__mytf_malloc(int32 size)
{
char *cp;
if ((cp = (char *) malloc((word32) size)) == NULL)
{
__crit_msg(
"**FATAL[1]: No more memory from tf_ call at file %s line %d - %ld bytes memory used\n",
__in_fils[__tfrec->tffnam_ind], __tfrec->tflin_cnt, __mem_use);
__my_exit(4, TRUE);
}
/* DBG remove ---
if... | false | false | false | false | false | 0 |
flushAttrList(ListElement** attrList){
int i;
ListElement *current;
for(i=0; i<256; i++){
current = attrList[i];
while( current !=NULL){
((OptionSet * )current->dataPtr)->name = NULL;
free( ((OptionSet * )current->dataPtr)->name );
if(current->next == NULL) {
free(current);
break;
}
curre... | false | false | false | false | false | 0 |
globus_l_gfs_file_cksm_verify(
globus_result_t result,
char * cksm,
void * user_arg)
{
globus_l_file_monitor_t * monitor;
GlobusGFSName(globus_l_gfs_file_cksm_verify);
GlobusGFSFileDebugEnter();
moni... | false | false | false | false | false | 0 |
ListColorInfo(FILE *file,
ExceptionInfo *exception)
{
char
tuple[MaxTextExtent];
const char
*path;
const ColorInfo
**color_info;
register ssize_t
i;
size_t
number_colors;
/*
List name and attributes of each color in the list.
*/
if (file == (const FILE *) NULL)
file=st... | true | true | false | false | false | 1 |
RemoveParticipantOnServer(const RakNetGUID &guid)
{
StrAndGuidAndRoom *strAndGuid;
if (guidToStrHash.Pop(strAndGuid, guid, _FILE_AND_LINE_))
{
LeaveGroup(&strAndGuid);
strToGuidHash.Remove(strAndGuid->str, _FILE_AND_LINE_);
RakNet::OP_DELETE(strAndGuid, _FILE_AND_LINE_);
}
} | false | false | false | false | false | 0 |
__drm_atomic_helper_connector_reset(struct drm_connector *connector,
struct drm_connector_state *conn_state)
{
if (conn_state)
conn_state->connector = connector;
connector->state = conn_state;
} | false | false | false | false | false | 0 |
setfname(Cell *p)
{
if (isarr(p))
SYNTAX("%s is an array, not a function", p->nval);
else if (isfcn(p))
SYNTAX("you can't define function %s more than once", p->nval);
curfname = p->nval;
} | false | false | false | false | false | 0 |
_e_mod_sft_win_cb_back(void *data, void *data2 __UNUSED__)
{
Sft_Win *swin;
if (!(swin = data)) return;
ecore_x_e_illume_focus_back_send(swin->zone->black_win);
} | false | false | false | false | false | 0 |
GetStmForOutDir(Module_table *mpt)
{
Block *bpt;
for (bpt = mpt->block_head->inner; bpt->next != NULL; bpt = bpt->next) {
}
return bpt->pre_head->stm_head;
} | false | false | false | false | false | 0 |
index_iterator__current(
const git_index_entry **entry, git_iterator *self)
{
index_iterator *ii = (index_iterator *)self;
const git_index_entry *ie = git_index_get_byindex(ii->index, ii->current);
if (ie != NULL && index_iterator__at_tree(ii)) {
ii->tree_entry.path = ii->partial.ptr;
ie = &ii->tree_entry;
}
... | false | false | false | false | false | 0 |
HandleMoverRelocation(MovementInfo& movementInfo)
{
movementInfo.UpdateTime(WorldTimer::getMSTime());
Unit* mover = _player->GetMover();
if (Player* plMover = mover->GetTypeId() == TYPEID_PLAYER ? (Player*)mover : NULL)
{
if (movementInfo.HasMovementFlag(MOVEFLAG_TAXI))
{
i... | false | false | false | false | false | 0 |
ExVariableGet (vargetArg *va)
{
gvar *gv;
if ((gv = (gvar *) _dxf_ExGlobalVariableSearch (va->name)) == NULL)
return (ERROR);
va->obj = gv->obj;
ExDelete (gv);
return (OK);
} | false | false | false | false | false | 0 |
sig_perl_statusbar(SBAR_ITEM_REC *item, int get_size_only)
{
char *function;
function = g_hash_table_lookup(perl_sbar_defs, item->config->name);
if (function != NULL)
perl_statusbar_event(function, item, get_size_only);
else {
/* use default function - this shouldn't actually happen.. */
statusbar_item_defau... | false | false | false | false | false | 0 |
write_metadata (GString *out,
MetaBuilder *builder,
GHashTable *key_hash)
{
GHashTable *strings;
GList *stringvs;
MetaFile *child, *file;
GList *l;
GList *files;
/* Root metadata */
if (builder->root->data != NULL)
{
strings = string_block_begin ();
stringvs = stringv_block_begin ();
... | false | false | false | false | false | 0 |
qla8044_read_reset_template(struct scsi_qla_host *vha)
{
uint8_t *p_buff;
uint32_t addr, tmplt_hdr_def_size, tmplt_hdr_size;
vha->reset_tmplt.seq_error = 0;
vha->reset_tmplt.buff = vmalloc(QLA8044_RESTART_TEMPLATE_SIZE);
if (vha->reset_tmplt.buff == NULL) {
ql_log(ql_log_fatal, vha, 0xb0b8,
"%s: Failed to... | false | false | false | false | false | 0 |
CloseDependentDatasets()
{
/* We need to call it before removing the sources, otherwise */
/* we would remove them from the serizalized VRT */
FlushCache();
int bHasDroppedRef = GDALDataset::CloseDependentDatasets();
for( int iBand = 0; iBand < nBands; iBand++ )
{
bHasDroppedRef |= ((VR... | false | false | false | false | false | 0 |
atof_withtest(char s[])
{
double val, power, ans;
int i, sign;
for (i = 0; isspace(s[i]); i++)
;
sign = (s[i] == '-') ? -1 : 1;
if (s[i] == '+' || s[i] == '-')
i++;
if (s[i] == '\0')
return NULL;
for (val = 0.0; isdigit(s[i]); i++)
val = 10.0 * val + (s[i] - '0');
if (s[i] == '.')
i... | false | false | false | false | true | 1 |
collect_interfaces (MonoClass *klass, GHashTable *ifaces, MonoError *error)
{
int i;
MonoClass *ic;
mono_class_setup_interfaces (klass, error);
if (!mono_error_ok (error))
return;
for (i = 0; i < klass->interface_count; i++) {
ic = klass->interfaces [i];
g_hash_table_insert (ifaces, ic, ic);
collect_int... | false | false | false | false | false | 0 |
compile_all_words(void)
{
CELL words = find_all_words();
REGISTER_ROOT(words);
CELL i;
CELL length = array_capacity(untag_object(words));
for(i = 0; i < length; i++)
{
F_WORD *word = untag_word(array_nth(untag_array(words),i));
REGISTER_UNTAGGED(word);
if(word->optimizedp == F)
jit_compile_word(word,wo... | false | false | false | false | false | 0 |
FreeProfile(profile_t *profile, int nPos, int nConstraints) {
if(profile==NULL) return(NULL);
myfree(profile->codes, nPos);
myfree(profile->weights, nPos);
myfree(profile->vectors, sizeof(numeric_t)*nCodes*profile->nVectors);
myfree(profile->codeDist, sizeof(numeric_t)*nCodes*nPos);
if (nConstra... | false | false | false | false | false | 0 |
gtkstatusbar_gtk_statusbar_push(ScmObj *SCM_FP, int SCM_ARGCNT, void *data_)
{
ScmObj statusbar_scm;
GtkStatusbar* statusbar;
ScmObj context_id_scm;
u_int context_id;
ScmObj text_scm;
const gchar * text;
ScmObj SCM_SUBRARGS[3];
int SCM_i;
SCM_ENTER_SUBR("gtk-statusbar-push");
for (SCM_i=0; SCM_i<3; ... | false | false | false | false | false | 0 |
rtw_evt_work(struct work_struct *work)
{
struct evt_work *ework;
struct rtw_adapter *adapter;
ework = container_of(work, struct evt_work, work);
adapter = ework->adapter;
c2h_evt_clear23a(adapter);
if (!c2h_evt_exist(&ework->u.c2h_evt)) {
kfree(ework);
return;
}
if (c2h_id_filter_ccx_8723a(ework->u.c2h_... | false | false | false | false | false | 0 |
is_pan_frame(Window w)
{
if (w == Scr.PanFrameTop.win || w == Scr.PanFrameBottom.win ||
w == Scr.PanFrameLeft.win || w == Scr.PanFrameRight.win)
{
return True;
}
else
{
return False;
}
} | false | false | false | false | false | 0 |
smart_ulltoa4(unsigned long long ul, char buf[4], const char *scale)
{
const char *fmt;
char c;
unsigned v, u, idx = 0;
if (ul > 9999) { // do not scale if 9999 or less
ul *= 10;
do {
ul /= 1024;
idx++;
} while (ul >= 10000);
}
v = ul; // ullong divisions are expensive, avoid them
fmt = " 123456789... | true | true | false | false | false | 1 |
get_package (pIIR_Identifier n)
{
pIIR_PackageDeclaration package = NULL;
vaul_design_unit *du = pool->get (pool->get_work_library(),
id_to_chars (n));
if (du == NULL)
error ("unknown package %n", n);
else if (du->is_error())
error ("%n: %s", n, du->get_error_desc());
else if (du->get_tree() ... | false | false | false | false | false | 0 |
PyvtkHardwareSelector_GenerateSelection_s2(PyObject *self, PyObject *args)
{
vtkPythonArgs ap(self, args, "GenerateSelection");
vtkObjectBase *vp = ap.GetSelfPointer(self, args);
vtkHardwareSelector *op = static_cast<vtkHardwareSelector *>(vp);
unsigned int temp0[4];
unsigned int save0[4];
const int size0 ... | false | false | false | false | false | 0 |
cs_engine_reset(cs_engine_t *e)
{
int i;
for(i = 0; i < CS_LAYERS; ++i)
while(e->objects[i])
cs_obj_free(e->objects[i]);
e->time = 0.0;
} | false | false | false | false | false | 0 |
GMT_strtok (const char *string, const char *sep, GMT_LONG *pos, char *token)
{
/* Reentrant replacement for strtok that uses no static variables.
* Breaks string into tokens separated by one of more separator
* characters (in sep). Set *pos to 0 before first call. Unlike
* strtok, always pass the original stri... | false | false | false | false | false | 0 |
noop_move_p (insn)
rtx insn;
{
rtx pat = PATTERN (insn);
if (INSN_CODE (insn) == NOOP_MOVE_INSN_CODE)
return 1;
/* Insns carrying these notes are useful later on. */
if (find_reg_note (insn, REG_EQUAL, NULL_RTX))
return 0;
/* For now treat an insn with a REG_RETVAL note as a
a special in... | false | false | false | false | false | 0 |
copy(dimeModel * const model) const
{
dimePoint *p = new(model->getMemHandler()) dimePoint;
p->coords = this->coords;
p->copyExtrusionData(this);
if (!this->copyRecords(p, model)) {
// check if allocated on heap.
if (!model->getMemHandler()) delete p;
p = NULL;
}
return p;
} | false | false | false | false | false | 0 |
amd64_inject_word_store(struct device *dev,
struct device_attribute *mattr,
const char *data, size_t count)
{
struct mem_ctl_info *mci = to_mci(dev);
struct amd64_pvt *pvt = mci->pvt_info;
unsigned long value;
int ret;
ret = kstrtoul(data, 10, &value);
if (ret < 0)
return ret;
if (value... | false | false | false | false | false | 0 |
__socket_reset_priv (socket_private_t *priv)
{
struct gf_sock_incoming *in = NULL;
/* used to reduce the indirection */
in = &priv->incoming;
if (in->iobref) {
iobref_unref (in->iobref);
in->iobref = NULL;
}
if (in->iobuf) {... | false | false | false | false | false | 0 |
PyEval_AcquireLock(void)
{
PyThreadState *tstate = PyThreadState_GET();
if (tstate == NULL)
Py_FatalError("PyEval_AcquireLock: current thread state is NULL");
take_gil(tstate);
} | false | false | false | false | false | 0 |
check_rls(void)
{
int i,ret;
rcheck_status = 0;
if(rlist[0].a){
if ((ret=check_actions(rlist[0].a,REQUEST_ROUTE))!=0){
LM_ERR("check failed for main request route\n");
return ret;
}
}
for(i=0;i<ONREPLY_RT_NO;i++){
if(onreply_rlist[i].a){
if ((ret=check_actions(onreply_rlist[i].a,ONREPLY_ROUTE))!=0... | false | false | false | false | false | 0 |
hex_document_new()
{
HexDocument *doc;
doc = HEX_DOCUMENT (g_object_new (hex_document_get_type(), NULL));
g_return_val_if_fail (doc != NULL, NULL);
doc->file_name = NULL;
doc->gap_size = 100;
doc->file_size = 0;
doc->buffer_size = doc->file_size + doc->gap_size;
doc->gap_pos = doc->buffer = (guchar *)g_mallo... | false | false | false | false | false | 0 |
nfs3svc_mkdir_setattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno,
struct iatt *preop, struct iatt *postop)
{
nfsstat3 stat = NFS3ERR_SERVERFAULT;
nfs3_call_state_t *cs = NULL;
... | false | false | false | false | false | 0 |
garcon_set_environment_xdg (const gchar *fallback_env)
{
const gchar *desktop;
desktop = g_getenv ("XDG_CURRENT_DESKTOP");
if (G_LIKELY (desktop == NULL))
desktop = fallback_env;
else if (*desktop == '\0')
desktop = NULL;
garcon_set_environment (desktop);
} | false | false | false | false | false | 0 |
gui_widget_hide( GuiWidget *widget )
{
ListEntry *entry;
if ( !widget->visible ) return;
gui_widget_show_intern( widget, 0 );
if ( widget->root == widget ) {
entry = list_entry( gui_visible_stack, widget );
if ( entry ) {
/* remove */
entry = entry->next;
... | false | false | false | true | false | 1 |
_check_context(pTHX_ PERL_CONTEXT *cx, UV *cx_type_mask_ptr)
{
COP *near_cop;
PERL_UNUSED_ARG(cx_type_mask_ptr);
if (CxTYPE(cx) == CXt_SUB) {
if (PL_debstash && CvSTASH(cx->blk_sub.cv) == PL_debstash)
return 0; /* skip subs in DB package */
near_cop ... | false | false | false | false | false | 0 |
handle_netdev_upper(struct ib_device *ib_dev, u8 port,
void *cookie,
void (*handle_netdev)(struct ib_device *ib_dev,
u8 port,
struct net_device *ndev))
{
struct net_device *ndev = (struct net_device *)cookie;
struct upper_list {
struct list_head list;
struct net_device *upper;
};
... | false | false | false | false | false | 0 |
cli_hashtab_insert(struct cli_hashtable *s, const char* key, const size_t len, const cli_element_data data)
{
struct cli_element* element;
struct cli_element* deleted_element = NULL;
size_t tries = 1;
size_t idx;
if(!s)
return NULL;
if(s->used > s->maxfill) {
cli_dbgmsg("hashtab.c:Growing hashtable %p, becaus... | false | false | false | false | false | 0 |
ReplaceOffset(HashTable ht, Object object, uint offset)
{
HashElement eltPtr;
eltPtr = (HashElement)DXQueryHashElement(ht, (Key)&object);
if (!eltPtr)
return NULL; /* should be there already */
eltPtr->data = offset;
return ht;
} | false | false | false | false | false | 0 |
record_check_type (gnutls_session_t session,
content_type_t recv_type, content_type_t type,
gnutls_handshake_description_t htype, opaque * data,
int data_size)
{
int ret;
if ((recv_type == type)
&& (type == GNUTLS_APPLICATION_DATA ||
type ==... | false | false | false | false | false | 0 |
save(Stream &stream) const
{
if (isGray())
stream << iRed;
else
stream << iRed << " " << iGreen << " " << iBlue;
} | false | false | false | false | false | 0 |
resize(int w_,int h_)
{
if (MSRect::width()!=w_||MSRect::height()!=h_)
{
if (w_>0) MSRect::width(w_);
if (h_>0) MSRect::height(h_);
setWMSize();
configure();
}
} | false | false | false | false | false | 0 |
formCmd(const char* name)
{
fxStr f(name);
f.raisecase();
for (u_int i = 0, n = N(formats); i < n; i++)
if (f == formats[i].name) {
if (formats[i].supported) {
form = i;
reply(200, "Format set to %s.", (const char*) f);
} else
reply(504, "Format %s not supported.", (const char*) f);
re... | false | false | false | false | false | 0 |
construct_menu (GladeWindow *window)
{
GError *error = NULL;
window->priv->static_actions = gtk_action_group_new (ACTION_GROUP_STATIC);
gtk_action_group_set_translation_domain (window->priv->static_actions, GETTEXT_PACKAGE);
gtk_action_group_add_actions (window->priv->static_actions,
static_entries,
... | false | false | false | false | false | 0 |
msg(int msgId, void* wParam, void* lParam)
{
bool handled = false;
switch (msgId)
{
case MSG_INIT:
init();
handled = true;
break;
case MSG_GET_LABELS:
getLabels((QList<InputData>*)wParam);
handled = true;
break;
case MSG_GET_ID:
getID((uint*) wParam);
handled = true;
break;
case MSG_GET_NAME:... | false | false | false | false | false | 0 |
ui_frame(void)
{
enum cb_action_tag action;
if(!use_ui)
return(non_ui_frame());
if(need_update)
{
need_update=0;
draw_frame();
draw_status(ay_filenames[ay_file],(char *)aydata.miscstr, (char *)aydata.authorstr,
ay_track+1, (char *)aydata.tracks[ay_track].namestr);
}
/* update time display *... | false | false | false | false | false | 0 |
find_idx_in_nid_list(hda_nid_t nid, const hda_nid_t *list, int nums)
{
int i;
for (i = 0; i < nums; i++)
if (list[i] == nid)
return i;
return -1;
} | false | false | false | false | false | 0 |
_timeout(gpointer data) {
TemporaryItem *tempitem = reinterpret_cast<TemporaryItem *>(data);
tempitem->timeout_id = 0;
tempitem->signal_timeout.emit(tempitem);
delete tempitem;
return FALSE;
} | false | false | false | false | false | 0 |
PrintTagName(char *buf, RfmType type)
{
TypeDict type_dict;
IdentDict ident_dict;
if ((buf == NULL) || (type == NULL)) {
return(buf);
}
type_dict = type->type_dict;
if ((type_dict->type_kind != TKIND_STRUCT) &&
(type_dict->type_kind != TKIND_UNION)) {
return(buf);
}... | false | false | false | false | false | 0 |
get_addr(const char *hostname, struct in_addr *oaddr)
{
struct hostent *hp;
#if !defined (__WIN32__)
char buf[1024];
struct hostent host;
int herror;
hp = ei_gethostbyname_r(hostname,&host,buf,1024,&herror);
#else
hp = ei_gethostbyname(hostname);
#endif
if (hp) {
memmove(oaddr,hp->h_addr_list[0],si... | false | false | false | false | false | 0 |
SetWorldPosition(double pos[3])
{
if (this->Renderer && this->PointPlacer)
{
if (this->PointPlacer->ValidateWorldPosition( pos ))
{
this->WorldPosition->SetValue(pos);
this->WorldPositionTime.Modified();
}
}
else
{
this->WorldPosition->SetValue(pos);
this->WorldPositionTim... | false | false | false | false | false | 0 |
get_value() const
{
string result;
AW_root *root = mask_global()->get_root();
const awt_item_type_selector *selector = mask_global()->get_selector();
GBDATA *gbd = selector->current(root);
if (gbd) {
char *... | false | false | false | false | false | 0 |
getWorkingDirectory()
{
EFileSystemType type = FileSystemType;
if (type != FILESYSTEM_NATIVE)
{
type = FILESYSTEM_VIRTUAL;
}
else
{
#if defined(_IRR_WINDOWS_CE_PLATFORM_)
// does not need this
#elif defined(_IRR_WINDOWS_API_)
fschar_t tmp[_MAX_PATH];
#if defined(_IRR_WCHAR_FILESYSTEM ... | false | false | false | false | false | 0 |
IoState_protoWithInitFunction_(IoState *self, const char *v)
{
IoObject *proto = PointerHash_at_(self->primitives, (void *)v);
//printf("1234 IoState_protoWithInitFunction_(self, %s)\n", v);
//printf("123 IoState_protoWithInitFunction_(self, %s)\n", v);
if (!proto)
{
//printf("*(int *)NULL = 0\n");
//*(int *... | false | false | false | false | false | 0 |
get_allowup(allowup_defn ** allowups, char *name)
{
for (; *allowups; allowups = &(*allowups)->next) {
if (strcmp((*allowups)->when, name) == 0)
break;
}
if (*allowups == NULL) {
*allowups = malloc(sizeof(allowup_defn));
if (*allowups == NULL)
return NULL;
... | 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.