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 |
|---|---|---|---|---|---|---|
twl6030_calibrate_channel(struct twl6030_gpadc_data *gpadc,
int channel, int d1, int d2)
{
int b, k, gain, x1, x2, i;
const struct twl6030_ideal_code *ideal = gpadc->pdata->ideal;
i = twl6030_gpadc_lookup(ideal, channel, gpadc->pdata->nchannels);
/* Gain */
gain = ((ideal[i].volt2 - ideal[i].volt1) * 1000) /
... | false | false | false | false | false | 0 |
AVI_print_error(char *str)
{
int aerrno;
aerrno = (AVI_errno>=0 && AVI_errno<num_avi_errors) ? AVI_errno : num_avi_errors-1;
fprintf(stderr,"%s: %s\n",str,avi_errors[aerrno]);
/* for the following errors, perror should report a more detailed reason: */
if(AVI_errno == AVI_ERR_OPEN ||
AVI_errno ... | false | true | false | false | false | 1 |
run()
{
thr_init initobj(dbctx, vshared.shutdown);
#ifdef __linux__
if (cshared.sockargs.use_epoll) {
while (!vshared.shutdown && dbctx->check_alive()) {
run_one_ep();
}
} else if (cshared.sockargs.nonblocking) {
while (!vshared.shutdown && dbctx->check_alive()) {
run_one_nb();
}
... | false | false | false | false | false | 0 |
toCBuffer2(OutBuffer *buf, HdrGenState *hgs, int mod)
{
//printf("TypePointer::toCBuffer2() next = %d\n", next->ty);
if (mod != this->mod)
{ toCBuffer3(buf, hgs, mod);
return;
}
next->toCBuffer2(buf, hgs, this->mod);
if (next->ty != Tfunction)
buf->writeByte('*');
} | false | false | false | false | false | 0 |
toHtml() const
{
// QStringList html;
// for(int i = 0; i < d->m_Edits.count(); ++i) {
// html << d->m_Edits.at(i)->text();
// }
// return html.join(" ");
return numberWithControlKey().replace(" ", " ");
} | false | false | false | false | false | 0 |
appendIterForce(StyleObjIter &iter) const
{
if (styleSpec_->forceSpecs.size())
iter.append(&styleSpec_->forceSpecs, this);
} | false | false | false | false | false | 0 |
_put_group_cache(char *group_name, void *group_uids, int uid_cnt)
{
struct group_cache_rec *cache_rec;
int sz;
pthread_mutex_lock(&group_cache_mutex);
if (!group_cache_list) {
group_cache_list = list_create(_cache_del_func);
if (!group_cache_list)
fatal("list_create: malloc failure:");
}
sz = sizeof(uid_... | false | false | false | false | false | 0 |
gmc_v7_0_mc_resume(struct amdgpu_device *adev,
struct amdgpu_mode_mc_save *save)
{
u32 tmp;
/* unblackout the MC */
tmp = RREG32(mmMC_SHARED_BLACKOUT_CNTL);
tmp = REG_SET_FIELD(tmp, MC_SHARED_BLACKOUT_CNTL, BLACKOUT_MODE, 0);
WREG32(mmMC_SHARED_BLACKOUT_CNTL, tmp);
/* allow CPU access */
tmp = REG_SET_FIELD(... | false | false | false | false | false | 0 |
AddError(const char *file, int line, const char *msg, const char *text, int hilit) {
ErrList.push_back(new Error(file, line, msg, text, hilit));
//fprintf(stderr, "Error %s %d %s %s\n", file, line, msg, text);
FindErrorFile((unsigned)ErrList.size() - 1);
if ((int)ErrList.size() > Count)
if (Row... | false | false | false | false | false | 0 |
OnSessionState(cricket::Call* call,
cricket::Session* session,
cricket::Session::State state) {
if (state == cricket::Session::STATE_RECEIVEDINITIATE) {
buzz::Jid jid(session->remote_name());
console_->PrintLine("Incoming call from '%s'", jid.Str... | false | false | false | false | false | 0 |
ene_ub6250_resume(struct usb_interface *iface)
{
u8 tmp = 0;
struct us_data *us = usb_get_intfdata(iface);
struct ene_ub6250_info *info = (struct ene_ub6250_info *)(us->extra);
mutex_lock(&us->dev_mutex);
if (us->suspend_resume_hook)
(us->suspend_resume_hook)(us, US_RESUME);
mutex_unlock(&us->dev_mutex);
i... | false | false | false | false | false | 0 |
BodyName(struct Promise *pp)
{ char *name,*sp;
int i,size = 0;
struct Constraint *cp;
/* Return a type template for the promise body for lock-type identification */
if ((name = malloc(CF_MAXVARSIZE)) == NULL)
{
FatalError("BodyName");
}
sp = pp->agentsubtype;
if (size + strlen(sp) < CF_MAXVARSIZE-CF_... | false | false | false | false | false | 0 |
updateKey (Tree pl, Tree key, Tree val)
{
if (isNil(pl)) return cons ( cons(key,val), nil );
if (left(hd(pl)) == key) return cons ( cons(key,val), tl(pl) );
if (isBefore(left(hd(pl)),key)) return cons ( hd(pl), updateKey( tl(pl), key, val ));
return cons(cons(key,val), pl);
} | false | false | false | false | false | 0 |
ntru_mult_int_16_base(int16_t *a, int16_t *b, int16_t *c, uint16_t len, uint16_t N, uint16_t modulus) {
memset(c, 0, 2*(2*len-1)); /* only needed if N < NTRU_KARATSUBA_THRESH_16 */
uint16_t c_idx = 0;
uint16_t k;
for (k=0; k<2*len-1; k++) {
int16_t ck = 0;
uint16_t i;
int16_t i... | false | false | false | false | false | 0 |
unregister_memory(MemAreaGroup *group)
{
group->remove(get_mem_ptr());
reload_mem_ptr();
delete group;
} | false | false | false | false | false | 0 |
gsb_data_category_get_pointer_from_sub_name_in_glist ( struct_sub_category *sub_category,
const gchar *name )
{
if ( !sub_category -> sub_category_name
||
!name )
return 1;
return ( my_strcasecmp ( sub_category -> sub_category_name, name ) );
} | false | false | false | false | false | 0 |
pnfs_try_to_read_data(struct nfs_pgio_header *hdr,
const struct rpc_call_ops *call_ops,
struct pnfs_layout_segment *lseg)
{
struct inode *inode = hdr->inode;
struct nfs_server *nfss = NFS_SERVER(inode);
enum pnfs_try_status trypnfs;
hdr->mds_ops = call_ops;
dprintk("%s: Reading ino:%lu %u@%llu\... | false | false | false | false | false | 0 |
ipcache_unlinkresolveid (struct ipcache_item *rp)
{
unsigned short bashnum;
g_assert(rp);
bashnum = ipcache_getidbash (rp->id);
if (idbash[bashnum] == rp)
{
if (rp->previousid)
idbash[bashnum] = rp->previousid;
else
idbash[bashnum] = rp->nextid;
}
if (rp->nextid)
rp->nextid->previou... | false | false | false | false | false | 0 |
do_wep_crack(struct cracker *c, struct network *n, int len,
int limit)
{
ssize_t unused;
unsigned char key[PTW_KEYHSBYTES];
int (*all)[256];
int i, j;
all = xmalloc(256 * 32 * sizeof(int));
//initial setup (complete keyspace)
for (i = 0; i < 32; i++) {
... | false | false | false | false | false | 0 |
memmap(uae_u32 addr, uae_u32 len)
{
addrbank *bank_data = &get_mem_bank (addr);
if (!bank_data->check (addr, len))
return NULL;
return bank_data->xlateaddr (addr);
} | false | false | false | false | false | 0 |
__db_ovref_recover(env, dbtp, lsnp, op, info)
ENV *env;
DBT *dbtp;
DB_LSN *lsnp;
db_recops op;
void *info;
{
__db_ovref_args *argp;
DB_THREAD_INFO *ip;
DB *file_dbp;
DBC *dbc;
DB_MPOOLFILE *mpf;
PAGE *pagep;
int cmp, ret;
ip = ((DB_TXNHEAD *)info)->thread_info;
pagep = NULL;
REC_PRINT(__db_ovref_print);... | false | false | false | false | false | 0 |
forcedeth_poll(struct nic *nic, int retrieve)
{
/* return true if there's an ethernet packet ready to read */
/* nic->packet should contain data on return */
/* nic->packetlen should contain length of data */
int len;
int i;
u32 Flags;
i = np->cur_rx % RX_RING;
Flags = le32_to_cpu(rx_ring[i].FlagLen);
len =... | false | false | false | false | false | 0 |
ast_xmldoc_build_syntax(const char *type, const char *name, const char *module)
{
struct ast_xml_node *node;
node = xmldoc_get_node(type, name, module, documentation_language);
if (!node) {
return NULL;
}
return _ast_xmldoc_build_syntax(node, type, name);
} | false | false | false | false | false | 0 |
get_df_full(char *dir_name)
{
struct statfs fs_buf;
float df_used, used_blocks;
int df_percent_used;
if (statfs(dir_name, &fs_buf) == -1) {
fprintf(stderr, "fs_mark: statfs failed on %s %s\n", dir_name,
strerror(errno));
cleanup_exit();
}
used_blocks = (float)(fs_buf.f_blocks - fs_buf.f_bavail);
df_use... | false | false | false | false | false | 0 |
script_free_code(struct script_code* code)
{
script_free_vars( &code->script_vars );
aFree( code );
} | false | false | false | false | false | 0 |
removeMicrocodeFromCache( const String & name )
{
String nameWithRenderSystem = addRenderSystemToName(name);
MicrocodeMap::iterator foundIter = mMicrocodeCache.find(nameWithRenderSystem);
if (foundIter != mMicrocodeCache.end())
{
mMicrocodeCache.erase( foundIter );
... | false | false | false | false | false | 0 |
account_qif_get_child_transfer(Transaction *src, GList *list)
{
Transaction *item;
//DB( g_print("(transaction) transaction_get_child_transfer\n") );
//DB( g_print(" search: %d %s %f %d=>%d\n", src->date, src->wording, src->amount, src->account, src->kxferacc) );
list = g_list_first(list);
while (list != NULL)
... | false | false | false | false | false | 0 |
invalidate_nonnull_info (x, setter, data)
rtx x;
rtx setter ATTRIBUTE_UNUSED;
void *data;
{
unsigned int regno;
struct null_pointer_info *npi = (struct null_pointer_info *) data;
while (GET_CODE (x) == SUBREG)
x = SUBREG_REG (x);
/* Ignore anything that is not a register or is a hard regist... | false | false | false | false | false | 0 |
param_equal_or_not_default (const struct SdpParam *sdp_param,
FsCodec *local_codec, FsCodecParameter *local_param,
FsCodec *remote_codec, FsCodecParameter *remote_param,
FsCodec *negotiated_codec)
{
if (local_param && remote_param &&
!strcmp (local_param->value, remote_param->value))
fs_codec_ad... | false | false | false | false | false | 0 |
hp_colour_open(gx_device * pdev)
{
int retCode;
cdj970->PageCtr = 0;
/* Set up colour params if put_params has not already done so */
if (pdev->color_info.num_components == 0) {
int code = cdj_set_bpp(pdev, pdev->color_info.depth,
... | false | false | false | false | false | 0 |
custom_arginfo(const struct printf_info *info, size_t n, int *argtypes
#ifdef HAVE_PRINTF_SPECIFIER
, int *size
#endif
)
{
int i;
printf_hook_handler_t *handler;
handler = printf_hooks[SPEC_TO_INDEX(info->spec)];
if (handler->numargs <= n)
{
for (i = 0; i < handler->numargs; ++i)
{
argtypes... | false | false | false | false | false | 0 |
rc4InitKey(Guchar *key, int keyLen, Guchar *state) {
Guchar index1, index2;
Guchar t;
int i;
for (i = 0; i < 256; ++i)
state[i] = i;
if (unlikely(keyLen == 0))
return;
index1 = index2 = 0;
for (i = 0; i < 256; ++i) {
index2 = (key[index1] + state[i] + index2) % 256;
t = state[i];
st... | false | false | false | false | false | 0 |
compute_dfdv_between(
Variable* r, Variable* const v, Variable* const u,
const Direction dir = NONE, bool changedDirection = false) {
double dfdv=v->weight*(v->position() - v->desiredPosition);
Constraint *m=NULL;
for(Cit it(v->in.begin());it!=v->in.end();++it) {
Constraint *c=*it;
if(canFollowLeft(c,u)) {
... | false | false | false | false | false | 0 |
MkStructOrUnion(int type, struct Identifier * id, struct __ecereNameSpace__ecere__sys__OldList * definitions)
{
struct Specifier * spec = (spec = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Specifier), spec->type = type, spec->id = id, spec);
if(id && FindType(curContext, id->string))
structDeclMode = 0;
... | false | false | false | false | false | 0 |
saveDefaults ()
{
UT_ASSERT(m_app);
if (m_app == NULL) return;
XAP_Prefs * pPrefs = m_app->getPrefs ();
if (pPrefs == NULL) return;
XAP_PrefsScheme * pPScheme = pPrefs->getCurrentScheme ();
if (pPScheme == NULL) return;
UT_UTF8String pref;
if (m_exp_opt->bIs4)
{
if (pref.byteLength ()) pref += ",";
... | false | false | false | false | false | 0 |
ComputeJoinedWeight(const LiveInterval &Other) {
// If either of these intervals was spilled, the weight is the
// weight of the non-spilled interval. This can only happen with
// iterative coalescers.
if (Other.weight != HUGE_VALF) {
weight += Other.weight;
}
else if (weight == HUGE_VALF &&
!Ta... | false | false | false | false | false | 0 |
configure(Vector<String> &conf, ErrorHandler *errh)
{
click_ether_vlan ethh;
String vlan_word;
int vlan = 0, vlan_pcp = 0, native_vlan = -1;
uint16_t ether_vlan_encap_proto;
ethh.ether_vlan_proto = htons(ETHERTYPE_8021Q);
if (Args(conf, this, errh)
.read_mp("ETHERTYPE", ether_vlan_encap_proto)
... | false | false | false | false | false | 0 |
krb5_ldap_db_single_init(krb5_ldap_context *ldap_context)
{
krb5_error_code st=0;
int cnt=0;
krb5_ldap_server_info *server_info=NULL;
while (ldap_context->server_info_list[cnt] != NULL) {
server_info = ldap_context->server_info_list[cnt];
if ((s... | false | false | false | false | false | 0 |
uncheckAllParameterPositions(ParameterPosition parameterPositions[]) {
int position;
for (position = 0; position < MAXPARAMS; position++) {
parameterPositions[position].checked = FALSE;
}
} | false | false | false | false | false | 0 |
uuid_gen(uuid *u)
{
static uint64_t s_last = 0;
static uint64_t s_cnt = 0;
if (!s_seed)
uuid_seed(time(0));
struct timeval tp;
gettimeofday(&tp, 0);
uint64_t now = tp.tv_sec;
now *= 1000L * 1000L;
now += tp.tv_usec;
if (now != s_last)
{
s_last = now;
s_cnt = 1;
}
u->u1 = now;
u->u2 = s_cnt++ << B... | false | false | false | false | false | 0 |
apply_envelope(struct ml_effect_state *state, int value,
struct ff_envelope *envelope)
{
struct ff_effect *effect = state->effect;
unsigned long now = jiffies;
int time_from_level;
int time_of_envelope;
int envelope_level;
int difference;
if (envelope->attack_length &&
time_before(now,
state->play_... | false | false | false | false | false | 0 |
sharedInitPool( CoreDFB *core,
CoreSurfacePool *pool,
void *pool_data,
void *pool_local,
void *system_data,
CoreSurfacePoolDescription *ret_desc... | false | false | false | false | false | 0 |
clear_vses(Stream_t *Dir, int entrySlot, size_t last)
{
direntry_t entry;
dirCache_t *cache;
int error;
entry.Dir = Dir;
entry.entry = entrySlot;
/*maximize(last, entry.entry + MAX_VFAT_SUBENTRIES);*/
cache = allocDirCache(Dir, last);
if(!cache) {
fprintf(stderr, "Out of memory error in clear_vses\n");
ex... | false | false | false | false | false | 0 |
C_peek_char(C_word port)
{
C_FILEPTR fp = C_port_file(port);
int c = C_getc(fp);
if(c == EOF) {
if(ferror(fp)) {
clearerr(fp);
return C_fix(-1);
}
/* see above */
#if defined(_WIN32) && !defined(__CYGWIN__)
else if(GetLastError() == ERROR_OPERATION_ABORTED) return C_fix(-1);
#endif
... | false | false | false | false | false | 0 |
dca_get_domain(struct device *dev)
{
struct pci_bus *rc;
struct dca_domain *domain;
rc = dca_pci_rc_from_dev(dev);
domain = dca_find_domain(rc);
if (!domain) {
if (dca_provider_ioat_ver_3_0(dev) && !list_empty(&dca_domains))
dca_providers_blocked = 1;
}
return domain;
} | false | false | false | false | false | 0 |
a2dp_suspend(struct avdtp *session, struct a2dp_sep *sep,
a2dp_stream_cb_t cb, void *user_data)
{
struct a2dp_setup_cb *cb_data;
struct a2dp_setup *setup;
setup = a2dp_setup_get(session);
if (!setup)
return 0;
cb_data = setup_cb_new(setup);
cb_data->suspend_cb = cb;
cb_data->user_data = user_data;
setu... | false | false | false | false | false | 0 |
dumphb(char *tbl, int beg)
{
int i, j, k;
char *p = &tbl[beg - CHAR_MIN];
unsigned char c;
for (i = 0; i <= SCHAR_MAX; i += ROWSIZE)
{
k = i + ROWSIZE - 1;
if (k > SCHAR_MAX)
k = SCHAR_MAX;
c = (unsigned char)(beg + i);
printf("/*");
if ((c > 0) && (c < SCHAR_MAX) && (isprint(c)) &&... | false | false | false | false | false | 0 |
bt_string_declaration_new(enum ctf_string_encoding encoding)
{
struct declaration_string *string_declaration;
string_declaration = g_new(struct declaration_string, 1);
string_declaration->p.id = CTF_TYPE_STRING;
string_declaration->p.alignment = CHAR_BIT;
string_declaration->p.declaration_free = _string_declarati... | false | false | false | false | false | 0 |
ario_playlist_get_indice (GtkTreePath *path)
{
ARIO_LOG_FUNCTION_START;
GtkTreePath *parent_path = NULL;
int *indices = NULL;
int indice = -1;
/* Get indice from a path depending on if search is activated or not */
if (instance->priv->in_search) {
parent_... | false | false | false | false | false | 0 |
start_output_gif (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo)
{
gif_dest_ptr dest = (gif_dest_ptr) dinfo;
if (cinfo->quantize_colors)
emit_header(dest, cinfo->actual_number_of_colors, cinfo->colormap);
else
emit_header(dest, 256, (JSAMPARRAY) NULL);
} | false | false | false | false | false | 0 |
execute( Chuck_VM * vm, Chuck_VM_Shred * shred )
{
t_CKUINT *& reg_sp = (t_CKUINT *&)shred->reg->sp;
Chuck_String * lhs = NULL;
t_CKFLOAT rhs = 0;
Chuck_String * result = NULL;
// pop word from reg stack
pop_( reg_sp, 3 );
// left
lhs = (Chuck_String *)(*(reg_sp));
// right
rhs ... | false | false | false | false | false | 0 |
set_result(void) {
result.clear();
GSList* file_list_p = gtk_file_chooser_get_filenames(GTK_FILE_CHOOSER(get_win()));
void* elem = g_slist_nth_data(file_list_p, 0); // first element
for (guint count = 1; elem; count++) {
result.push_back((const char*)elem);
g_free(elem);
elem = g_slist_nth_data(fil... | false | false | false | false | false | 0 |
Perl_av_push(pTHX_ AV *av, SV *val)
{
dVAR;
MAGIC *mg;
PERL_ARGS_ASSERT_AV_PUSH;
assert(SvTYPE(av) == SVt_PVAV);
if (SvREADONLY(av))
Perl_croak_no_modify();
if ((mg = SvTIED_mg((const SV *)av, PERL_MAGIC_tied))) {
Perl_magic_methcall(aTHX_ MUTABLE_SV(av), mg, "PUSH", G_DISCARD,... | false | false | false | false | false | 0 |
setException(ScriptableExtension* /*caller*/,
const QString& message)
{
kWarning(6031) << "ignoring:" << message;
return false;
}
} | false | false | false | false | false | 0 |
rt9455_remove(struct i2c_client *client)
{
int ret;
struct rt9455_info *info = i2c_get_clientdata(client);
ret = rt9455_register_reset(info);
if (ret)
dev_err(&info->client->dev, "Failed to set charger to its default values\n");
#if IS_ENABLED(CONFIG_USB_PHY)
if (info->nb.notifier_call)
usb_unregister_notifi... | false | false | false | false | false | 0 |
ibus_observed_path_copy (IBusObservedPath *dest,
const IBusObservedPath *src)
{
gboolean retval;
retval = IBUS_SERIALIZABLE_CLASS (ibus_observed_path_parent_class)->copy ((IBusSerializable *)dest, (IBusSerializable *)src);
g_return_val_if_fail (retval, FALSE);
dest->path... | false | false | false | false | false | 0 |
AllocateGraphics() {
if (!pixmapLine)
pixmapLine = Surface::Allocate(technology);
if (!pixmapSelMargin)
pixmapSelMargin = Surface::Allocate(technology);
if (!pixmapSelPattern)
pixmapSelPattern = Surface::Allocate(technology);
if (!pixmapIndentGuide)
pixmapIndentGuide = Surface::Allocate(technology);
if (!p... | false | false | false | false | false | 0 |
pack(DG *d, int e, int s, int l, N a)
{
int i, j;
for (i = l - 1; i >= 0; --i, --e)
if (d[i] != 0)
break;
if (i < 0) {
/* number is zero */
cpy(zero, a);
} else {
EXA = e;
SGNA = s;
if (i >= LEN - 1) {
for (j = LEN - 1; j >= 0; --i, --j)
AD[j] = d[i];
... | false | false | false | false | false | 0 |
get_obj_index(struct h_t *hp)
{
register word32 av;
register struct hrec_t *hrp;
vpiHandle ihref;
struct h_t *rhp;
hrp = hp->hrec;
switch (hrp->htyp) {
case vpiMemoryWord: case vpiNetBit: case vpiRegBit: case vpiVarSelect:
/* case 1, alternate form for expr. handle is fixed index */
if (hrp->bith_ndx)
... | false | false | false | false | false | 0 |
append_entry_point(struct drccore *drc)
{
_pushad(); // pushad
if (drc->uses_fp)
{
_fnstcw_m16abs(&drc->fpcw_save); // fstcw [fpcw_save]
_fldcw_m16abs(&drc->fpcw_curr); // fldcw [fpcw_curr]
}
drc_append_restore_volatiles(drc); // load volatiles
if (drc->cb_entrygen)
... | false | false | false | false | false | 0 |
annotEditSetOnset(long long onset)
{
QTime ta;
if(onset < 0LL)
{
onset_daySpinbox->setValue((-(onset)) / TIME_DIMENSION / 86400);
ta.setHMS(((-(onset)) / TIME_DIMENSION / 3600) % 24,
(((-(onset)) / TIME_DIMENSION) % 3600) / 60,
((-(onset)) / TIME_DIMENSION) % 60,
((-(... | false | false | false | false | false | 0 |
paf(A a,I f,I x)
{
I t;
C *ix=x?"":" ";
BRK;
switch(aplusMask&(I)a)
{
CS(2,H("%s`%s",ix,pp((I)a)));
case 4:if(U(a)>9){H("[paf case 4!]");pcxv(XV(a));break;}
/* conditional fall-thru from 4 */
case 6:CS(7,H("%s%s",ix,(f)?pp((I)a):ppd((I)a)));
CS(1,pcxv(XV(a)));
CS(3,paf((A)(XE(a)->f),f+1,x... | false | false | false | false | false | 0 |
add_sorted_dtp(List *head,
Dtp *dst_dtp,
Module_table *mpt)
{
List *l;
int count;
if (head == NULL)
return list_append(head, dst_dtp);
if (is_already_appended_dtp(head, dst_dtp, mpt))
return head;
count = 0;
for (l = head; l != NULL; l = l->next) {
... | false | false | false | false | false | 0 |
bch_btree_keys_free(struct btree_keys *b)
{
struct bset_tree *t = b->set;
if (bset_prev_bytes(b) < PAGE_SIZE)
kfree(t->prev);
else
free_pages((unsigned long) t->prev,
get_order(bset_prev_bytes(b)));
if (bset_tree_bytes(b) < PAGE_SIZE)
kfree(t->tree);
else
free_pages((unsigned long) t->tree,
g... | false | false | false | false | false | 0 |
hw_card_stop(struct hw *hw)
{
unsigned int data;
/* disable transport bus master and queueing of request */
hw_write_20kx(hw, TRNCTL, 0x00);
/* disable pll */
data = hw_read_20kx(hw, PLLCTL);
hw_write_20kx(hw, PLLCTL, (data & (~(0x0F<<12))));
/* TODO: Disable interrupt and so on... */
if (hw->irq >= 0)
syn... | false | false | false | false | false | 0 |
subst_placeholders(char *str, char *tty)
{
char *p,*q;
static char buf[4096];
#if defined(HAVE_UNAME)
struct utsname uts;
#endif
#if !defined(HAVE_STRUCT_UTSNAME_DOMAINNAME) && defined(HAVE_GETDOMAINNAME)
char domainname[256];
#endif
#if defined(HAVE_UNAME)
uname(&uts);
#endif
p = str;
q = buf;
while (*p != ... | false | false | false | false | false | 0 |
normalize_codeset (const char *codeset)
{
char *normalized_codeset;
const char *p;
char *q;
normalized_codeset = g_strdup (codeset);
if (codeset != NULL) {
for (p = codeset, q = normalized_codeset;
*p != '\0'; p++) {
... | false | false | false | false | false | 0 |
c_ekkftjup(COIN_REGISTER3 const EKKfactinfo * COIN_RESTRICT2 fact,
double * COIN_RESTRICT dwork1, int last,
double * COIN_RESTRICT dworko , int * COIN_RESTRICT mpt)
{
const double * COIN_RESTRICT dluval = fact->xeeadr;
const int * COIN_RESTRICT hrowi = fact->xeradr;
const int * COIN_RESTRICT mcstrt = ... | false | false | false | false | false | 0 |
gst_index_entry_free (GstIndexEntry * entry)
{
switch (entry->type) {
case GST_INDEX_ENTRY_ID:
if (entry->data.id.description) {
g_free (entry->data.id.description);
entry->data.id.description = NULL;
}
break;
case GST_INDEX_ENTRY_ASSOCIATION:
if (entry->data.assoc.asso... | false | false | false | false | false | 0 |
convert(const Value& value, const QString& toUnit)
{
if ((toUnit.isEmpty() || d->unitMap.contains(toUnit)) && value.unit()->isValid()) {
UnitPtr to = toUnit.isEmpty() ? defaultUnit() : d->unitMap[toUnit];
return convert(value, to);
}
return Value();
} | false | false | false | false | false | 0 |
buf_name_changed(buf)
buf_T *buf;
{
/*
* If the file name changed, also change the name of the swapfile
*/
if (buf->b_ml.ml_mfp != NULL)
ml_setname(buf);
if (curwin->w_buffer == buf)
check_arg_idx(curwin); /* check file name for arg list */
#ifdef FEAT_TITLE
maketitle(); /* set window ... | false | false | false | false | false | 0 |
test_one(hid_t file)
{
hid_t work = -1, grp = -1;
herr_t status;
/* Create a test group */
if((work = H5Gcreate2(file, "/test_one", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Delete by absolute name */
TESTING("unlink by absolute name");
if((grp = H5Gcreate2(work, "fo... | false | false | false | false | false | 0 |
cdrom_command_unpause (void)
{
#if AKIKO_DEBUG_IO_CMD
write_log (_T("CD32: unpause: %d, %d\n"), cdrom_paused, cdrom_playing);
#endif
cdrom_result_buffer[0] = cdrom_command;
if (checkerr ())
return 2;
cdrom_result_buffer[1] = cdrom_playing ? CDS_PLAYING : 0;
if (!cdrom_paused)
return 2;
cdrom_paused = 0;
if (... | false | false | false | false | false | 0 |
set_page_table_entry (void *p, page_entry *entry)
{
page_entry ***base;
size_t L1, L2;
#if HOST_BITS_PER_PTR <= 32
base = &G.lookup[0];
#else
page_table table;
uintptr_t high_bits = (uintptr_t) p & ~ (uintptr_t) 0xffffffff;
for (table = G.lookup; table; table = table->next)
if (table->high_bits == high... | false | false | false | false | false | 0 |
blk_flush_queue_rq(struct request *rq, bool add_front)
{
if (rq->q->mq_ops) {
struct request_queue *q = rq->q;
blk_mq_add_to_requeue_list(rq, add_front);
blk_mq_kick_requeue_list(q);
return false;
} else {
if (add_front)
list_add(&rq->queuelist, &rq->q->queue_head);
else
list_add_tail(&rq->queuelis... | false | false | false | false | false | 0 |
PyVTKAddFile_vtkContourRepresentation(
PyObject *dict, const char *modulename)
{
PyObject *o;
o = PyvtkContourRepresentationPoint_TypeNew(modulename);
if (o && PyDict_SetItemString(dict, (char *)"vtkContourRepresentationPoint", o) != 0)
{
Py_DECREF(o);
}
o = PyvtkContourRepresentationNode_TypeNe... | false | false | false | false | false | 0 |
UpdatePortItem(
void *theEnv,
void *buf,
long obji)
{
struct bsavePortItem *bdp;
bdp = (struct bsavePortItem *) buf;
if (bdp->moduleName != -1L)
{
DefmoduleData(theEnv)->PortItemArray[obji].moduleName = SymbolPointer(bdp->moduleName);
IncrementSymbolCount(DefmoduleData(theEnv)->PortI... | false | false | false | false | false | 0 |
tm6000_i2c_register(struct tm6000_core *dev)
{
int rc;
dev->i2c_adap.owner = THIS_MODULE;
dev->i2c_adap.algo = &tm6000_algo;
dev->i2c_adap.dev.parent = &dev->udev->dev;
strlcpy(dev->i2c_adap.name, dev->name, sizeof(dev->i2c_adap.name));
dev->i2c_adap.algo_data = dev;
i2c_set_adapdata(&dev->i2c_adap, &dev->v4l2_... | false | false | false | false | false | 0 |
endHeapProfiling(void)
{
StgDouble seconds;
if (! RtsFlags.ProfFlags.doHeapProfile) {
return;
}
#ifdef PROFILING
if (doingRetainerProfiling()) {
endRetainerProfiling();
}
#endif
#ifdef PROFILING
if (doingLDVProfiling()) {
nat t;
LdvCensusKillAll();
aggregateCensusInfo();
for (t =... | false | false | false | false | false | 0 |
streq_except_trailing_slash(const char *s1, const char *s2)
{
int equal;
if (!s1 && !s2)
return 1;
if (!s1 || !s2)
return 0;
equal = !strcmp(s1, s2);
if (!equal) {
size_t len1 = strlen(s1);
size_t len2 = strlen(s2);
if (len1 && *(s1 + len1 - 1) == '/')
len1--;
if (len2 && *(s2 + len2 - 1) == '/'... | false | false | false | false | false | 0 |
report_parse_error(int code, int myargc, char **myargv) {
int i;
switch (code) {
case PARSE_ERROR_ZERO_STEP:
fatal("A step of 0 (zero) is invalid.");
break;
case PARSE_ERROR_UNKNOWN_TYPE:
fatal("Unidentified token:");
break;
case PARSE_ERROR_INVALID_INPUT:
fatal("Combination of command line arguments co... | false | false | false | false | false | 0 |
history_def_insert(history_t *h, TYPE(HistEvent) *ev, const Char *str)
{
hentry_t *c;
c = h_malloc(sizeof(*c));
if (c == NULL)
goto oomem;
if ((c->ev.str = h_strdup(str)) == NULL) {
h_free(c);
goto oomem;
}
c->data = NULL;
c->ev.num = ++h->eventid;
c->next = h->list.next;
c->prev = &h->list;
h->list.ne... | false | false | false | false | false | 0 |
getMips16SPAliasReg() {
// Return if it has already been initialized.
if (Mips16SPAliasReg)
return Mips16SPAliasReg;
const TargetRegisterClass *RC = &Mips::CPU16RegsRegClass;
return Mips16SPAliasReg = MF.getRegInfo().createVirtualRegister(RC);
} | false | false | false | false | false | 0 |
send_network_available() {
if (!app_client_shm.shm) return;
process_control_queue.msg_queue_send(
"<network_available/>",
app_client_shm.shm->process_control_request
);
return;
} | false | false | false | false | false | 0 |
bgav_mxf_content_storage_dump(int indent, mxf_content_storage_t * s)
{
int i;
bgav_diprintf(indent, "Content storage\n");
bgav_diprintf(indent+2, "UID: "); dump_ul(s->common.uid);
bgav_diprintf(indent+2, "Generation UL: "); dump_ul(s->common.generation_ul);
if(s->num_package_refs)
{
bga... | false | false | false | false | false | 0 |
ConvertFilename(fstring& str)
{
FUStringBuilder xmlBuilder;
const fchar* s = str.c_str();
fchar c;
for (; (c = *s) != 0; ++s)
{
if (filenameValidityTable[(uint8) c]) xmlBuilder.append(c);
else
{
xmlBuilder.append((fchar) '%');
xmlBuilder.appendHex((uint8) c);
}
}
str = x... | false | false | false | false | false | 0 |
icalcomponent_end_component(icalcomponent* component,icalcomponent_kind kind)
{
struct icalcomponent_impl *impl = (struct icalcomponent_impl*)component;
icalcompiter itr;
pvl_elem i;
itr.kind = kind;
icalerror_check_arg_re( (component!=0),"component",icalcompiter_null);
for( i = pvl_tail(imp... | false | false | false | false | false | 0 |
PROC_LUP(Gen_node g)
{ Sym_ent nd;
Gen_node res,g1;
if (Gen_length(g)!=1||Gen_type(g1=Gen_elt(g,1))!=Idf_T)
return Rerror("null or non identifier passed to PROC_LUP",g);
nd=Slookup(Gen_idval(g));
if ( nd == 0 ) return g;
free_Gen_node(g);
res=copy_Gen_list(nd->def);
return res;
} | false | false | false | false | false | 0 |
check_pv_segments(struct volume_group *vg)
{
struct physical_volume *pv;
struct pv_list *pvl;
struct pv_segment *peg;
unsigned s, segno;
uint32_t start_pe, alloced;
uint32_t pv_count = 0, free_count = 0, extent_count = 0;
int ret = 1;
dm_list_iterate_items(pvl, &vg->pvs) {
pv = pvl->pv;
segno = 0;
start_... | false | false | false | false | false | 0 |
lang_specific_pre_link (void)
{
free (spec_file);
if (spec_file == NULL && library)
do_spec ("%:include(libgfortran.spec)");
return 0;
} | false | false | false | false | false | 0 |
dict_alloc()
{
dict_T *d;
d = (dict_T *)alloc(sizeof(dict_T));
if (d != NULL)
{
/* Add the list to the list of dicts for garbage collection. */
if (first_dict != NULL)
first_dict->dv_used_prev = d;
d->dv_used_next = first_dict;
d->dv_used_prev = NULL;
first_dict = d;
hash_init(&d->dv_hashta... | false | false | false | false | false | 0 |
param_set_kgdboc_var(const char *kmessage, struct kernel_param *kp)
{
int len = strlen(kmessage);
if (len >= MAX_CONFIG_LEN) {
printk(KERN_ERR "kgdboc: config string too long\n");
return -ENOSPC;
}
/* Only copy in the string if the init function has not run yet */
if (configured < 0) {
strcpy(config, kmess... | false | false | false | false | false | 0 |
roles_cache_role_object_nested_free(role_object_nested *this_role)
{
slapi_log_error(SLAPI_LOG_PLUGIN,
ROLES_PLUGIN_SUBSYSTEM, "--> roles_cache_role_object_nested_free\n");
if ( this_role == NULL )
{
return;
}
slapi_sdn_free(&this_role->dn);
/* Free the object */
slapi_ch_free((void**)&this_role);
s... | false | false | false | false | false | 0 |
pdf_load_encoding(char **estrings, char *encoding)
{
char **bstrings = NULL;
int i;
if (!strcmp(encoding, "StandardEncoding"))
bstrings = (char**) pdf_standard;
if (!strcmp(encoding, "MacRomanEncoding"))
bstrings = (char**) pdf_mac_roman;
if (!strcmp(encoding, "MacExpertEncoding"))
bstrings = (char**) pdf_m... | false | false | false | false | false | 0 |
cmd_log_message(cmd_parms *cmd, void *dconf_, const char *arg1,
const char *arg2, const char *arg3)
{
msg_entry *entry = apr_pcalloc(cmd->pool, sizeof(msg_entry));
log_debug_dirconf *dconf = dconf_;
int i, j;
const char *err;
const char *args[2];
args[0] = arg2... | false | false | false | false | false | 0 |
WriteData(int in_clid, void *in_data, int in_len) {
if (write_buf_map.find(in_clid) == write_buf_map.end()) {
snprintf(errstr, STATUS_MAX, "NetworkServer::WriteData called with invalid "
"client ID %d", in_clid);
globalreg->messagebus->InjectMessage(errstr, MSGFLAG_ERROR);
r... | false | false | false | false | false | 0 |
gth_sa_exon_score(const GthSA *sa, unsigned long exon)
{
Exoninfo *exoninfo;
gt_assert(sa);
exoninfo = gth_sa_get_exon(sa, exon);
return exoninfo->exonscore;
} | false | false | false | false | false | 0 |
initialize(XRef *xrefA, Catalog *catalog, Dict* dict) {
Object obj1;
if (dict->lookup("FS", &obj1)->isDict() || dict->lookup("FS", &obj1)->isString()) {
obj1.copy(&file);
} else {
error(-1, "Bad Annot File Attachment");
ok = gFalse;
}
obj1.free();
if (dict->lookup("Name", &obj1)->isName()) {
... | false | false | false | false | false | 0 |
arpd_lookup(struct addr *addr)
{
struct arp_entry arpent;
int error;
if (addr_cmp(addr, &arpd_ifent.intf_addr) == 0) {
syslog(LOG_DEBUG, "%s: %s at %s", __func__,
addr_ntoa(addr), addr_ntoa(&arpd_ifent.intf_link_addr));
return (0);
}
memcpy(&arpent.arp_pa, addr, sizeof(*addr));
error = arp_get(arpd_a... | false | false | false | false | false | 0 |
getValueTypeFromNode(const DSRXMLCursor &cursor) const
{
E_ValueType valueType = VT_invalid;
if (cursor.valid())
{
if (xmlStrcmp(cursor.Node->name, OFreinterpret_cast(const xmlChar *, "item")) == 0)
{
/* check for "ref" attribute */
if (xmlHasProp(cursor.Node, OFreint... | 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.