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 |
|---|---|---|---|---|---|---|
vector_op_expand(
vector* tgt, /*!< Pointer to vector to store results in */
const vector* left, /*!< Pointer to vector containing expansion multiplier value */
const vector* right /*!< Pointer to vector that will be multiplied */
) { PROFILE(VECTOR_OP_EXPAND);
bool retval; /* Return value for this ... | false | false | false | false | true | 1 |
lpfc_free_bsg_buffers(struct lpfc_hba *phba, struct lpfc_dmabuf *mlist)
{
struct lpfc_dmabuf *mlast, *next_mlast;
if (mlist) {
list_for_each_entry_safe(mlast, next_mlast, &mlist->list,
list) {
lpfc_mbuf_free(phba, mlast->virt, mlast->phys);
list_del(&mlast->list);
kfree(mlast);
}
lpfc_mbuf_free(... | false | true | false | false | false | 1 |
rwlock_test()
{
OFString errmsg;
mutex = new OFMutex();
if ((!mutex)||(! mutex->initialized())) bailout("creation of mutex failed", __LINE__);
mutex2 = new OFMutex();
if ((!mutex2)||(! mutex2->initialized())) bailout("creation of mutex failed", __LINE__);
rwlock = new OFReadWriteLock();
if ((!rwlock)||(!... | false | false | false | false | false | 0 |
BlockUntilStart(net_gamesettings_t *settings,
netgame_startup_callback_t callback)
{
while (!NET_CL_GetSettings(settings))
{
NET_CL_Run();
NET_SV_Run();
if (!net_client_connected)
{
I_Error("Lost connection to server");
}
... | false | false | false | false | false | 0 |
ap_check_leaf_bl(AP_tree_nlen *node){
if (node->is_leaf){
if (!node->father->father){
if (node->father->leftlen + node->father->rightlen == ap_undef_bl){
ap_calc_leaf_branch_length(node);
}
}else if (node->father->leftson == node){
if (node->father... | false | false | false | false | false | 0 |
bytevector_TOstring(ScmUVector* v,int start,int end){{
#line 1521 "uvlib.stub"
{int len=SCM_UVECTOR_SIZE(v);
SCM_CHECK_START_END(start,end,len);
return (Scm_MakeString((((char* )(SCM_UVECTOR_ELEMENTS(v))))+(start),
(end)-(start),-1,SCM_STRING_COPYING));}}} | false | false | false | false | false | 0 |
string_repeat_command(
Th_Interp *interp, void *ctx, int argc, const char **argv, int *argl
){
int n;
int i;
int nByte;
char *zByte;
if( argc!=4 ){
return Th_WrongNumArgs(interp, "string repeat string n");
}
if( Th_ToInt(interp, argv[3], argl[3], &n) ){
return TH_ERROR;
}
nByte = argl[2] *... | false | false | false | false | false | 0 |
user_return_notifier_unregister(struct user_return_notifier *urn)
{
hlist_del(&urn->link);
if (hlist_empty(this_cpu_ptr(&return_notifier_list)))
clear_tsk_thread_flag(current, TIF_USER_RETURN_NOTIFY);
} | false | false | false | false | false | 0 |
gio_read_socket(GIOChannel * gio, GIOCondition condition, gpointer data)
{
struct gio_to_qb_poll *adaptor = (struct gio_to_qb_poll *)data;
gint fd = g_io_channel_unix_get_fd(gio);
crm_trace("%p.%d %d", data, fd, condition);
if (condition & G_IO_NVAL) {
crm_trace("Marking failed adaptor %p unus... | false | false | false | false | false | 0 |
buffer_release(struct videobuf_queue *q, struct videobuf_buffer *vb)
{
struct file *file = q->priv_data;
struct saa7146_fh *fh = file->private_data;
struct saa7146_dev *dev = fh->dev;
struct saa7146_buf *buf = (struct saa7146_buf *)vb;
DEB_CAP("vbuf:%p\n", vb);
saa7146_dma_free(dev,q,buf);
release_all_pagetab... | false | false | false | false | false | 0 |
monitor(const string &peer)
{
//the basic working flow is:
//1) get all sessions
//2) check each session and collect running sessions or
//3) peak one session with the given peer and monitor it
vector<DBusObject_t> sessions = DBusClientCall1< vector<DBusObject_t> >(*this, "GetSessions")();
if (... | false | false | false | false | false | 0 |
cdb_bread(int fd, void *buf, int len)
{
int l;
while(len > 0) {
do l = read(fd, buf, len);
while(l < 0 && errno == EINTR);
if (l <= 0) {
if (!l)
errno = EIO;
return -1;
}
buf = (char*)buf + l;
len -= l;
}
return 0;
} | false | true | false | false | true | 1 |
ECPGget_var(int number)
{
struct var_list *ptr;
for (ptr = ivlist; ptr != NULL && ptr->number != number; ptr = ptr->next);
return (ptr) ? ptr->pointer : NULL;
} | false | false | false | false | false | 0 |
libbfio_file_close(
libbfio_file_io_handle_t *file_io_handle,
libcerror_error_t **error )
{
static char *function = "libbfio_file_close";
if( file_io_handle == NULL )
{
libcerror_error_set(
error,
LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
"%s: invalid file IO ... | false | false | false | false | false | 0 |
fosfat_open (const char *dev, fosfat_disk_t disk, unsigned int flag)
{
fosfat_disk_t fboot;
fosfat_t *fosfat = NULL;
if (!dev)
return NULL;
fosfat = malloc (sizeof (fosfat_t));
if (!fosfat)
return NULL;
fosfat->fosboot = -1;
fosfat->foschk = 0;
fosfat->viewdel = (flag & F_UNDELETE) == ... | false | false | false | false | true | 1 |
setData( const DOMString &_data, int &exceptioncode )
{
// NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly
if (isReadOnly()) {
exceptioncode = DOMException::NO_MODIFICATION_ALLOWED_ERR;
return;
}
if(str == _data.impl) return; // ### fire DOMCharacterDataModified if modifie... | false | false | false | false | false | 0 |
subbandsynthesis(REAL *fractionL,REAL *fractionR)
{
if(downfrequency)
{
subbandsynthesis_2(fractionL,fractionR);
return;
}
computebuffer(fractionL,calcbufferL);
if(!outputstereo)generatesingle();
else
{
computebuffer(fractionR,calcbufferR);
generate();
}
if(calcbufferoffset<15)calcbu... | false | false | false | false | false | 0 |
load_image(struct swap_map_handle *handle,
struct snapshot_handle *snapshot,
unsigned int nr_to_read)
{
unsigned int m;
int ret = 0;
ktime_t start;
ktime_t stop;
struct hib_bio_batch hb;
int err2;
unsigned nr_pages;
hib_init_batch(&hb);
printk(KERN_INFO "PM: Loadin... | true | true | false | false | false | 1 |
gimmix_timer (void)
{
gchar time[32] = "";
int new_status;
float fraction;
if (mpd_check_connected(gmo)==FALSE)
{
gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR(progress), 0.0);
gtk_progress_bar_set_text (GTK_PROGRESS_BAR(progress), "");
gimmix_show_ver_info ();
#ifdef HAVE_COVER_PLUGIN
if (gimmix_co... | false | false | false | false | false | 0 |
_seeknocomment(const int key, int move)
{
int go = (move > 0) ? 1 : -1;
for (int i = key + 1; abs(key-i)-1 < abs(move); i += go) {
if (i < 0 || i > csstokens.size()) {
return -1;
}
if (csstokens[i].type == COMMENT) {
move += 1;
continue;
}
... | false | false | false | false | false | 0 |
b_unpack (lua_State *L) {
Header h;
const char *fmt = luaL_checkstring(L, 1);
size_t ld;
const char *data = luaL_checklstring(L, 2, &ld);
size_t pos = luaL_optinteger(L, 3, 1) - 1;
defaultoptions(&h);
lua_settop(L, 2);
while (*fmt) {
int opt = *fmt++;
size_t size = optsize(L, opt, &fmt);
pos... | false | true | false | false | false | 1 |
DoAll(boolean *Chars_,boolean *Processed,boolean *Rarer_,long tcount)
{
/* print out a clique and its tree */
long i, j;
ChPtr Count;
aChars = (aPtr)Malloc((long)chars*sizeof(boolean));
SpOrder = (SpPtr)Malloc((long)spp*sizeof(long));
ChOrder = (ChPtr)Malloc((long)chars*sizeof(long));
Count = (ChPtr)Mall... | false | true | false | false | false | 1 |
idle_delete (void *arg)
{
delete static_cast<PopUp*> (arg);
return FALSE;
} | false | false | false | false | false | 0 |
dib807x_tuner_attach(struct dvb_usb_adapter *adap)
{
struct dib0700_adapter_state *st = adap->priv;
struct i2c_adapter *tun_i2c = st->dib8000_ops.get_i2c_master(adap->fe_adap[0].fe,
DIBX000_I2C_INTERFACE_TUNER, 1);
if (adap->id == 0) {
if (dvb_attach(dib0070_attach, adap->fe_adap[0].fe, tun_i2c,
&dib807x_d... | false | false | false | false | false | 0 |
iscsi_sysfs_scan_host(int hostno, int async)
{
char id[NAME_SIZE];
char *write_buf = "- - -";
pid_t pid = 0;
if (async)
pid = fork();
if (pid == 0) {
/* child */
log_debug(4, "scanning host%d", hostno);
snprintf(id, sizeof(id), ISCSI_HOST_ID, hostno);
sysfs_set_param(id, SCSI_HOST_SUBSYS, "scan", write... | false | false | false | false | false | 0 |
ipAddressLastChanged_get(ipAddressTable_rowreq_ctx * rowreq_ctx,
u_long * ipAddressLastChanged_val_ptr)
{
/** we should have a non-NULL pointer */
netsnmp_assert(NULL != ipAddressLastChanged_val_ptr);
DEBUGMSGTL(("verbose:ipAddressTable:ipAddressLastChanged_get",
"c... | false | false | false | true | false | 1 |
dbinform(const char *message, void *opaque){
jstring msgobj;
jobject opobj;
jclass cls;
jmethodID mid;
if(!(msgobj = (*infoenv)->NewStringUTF(infoenv, message))) return;
opobj = (jobject)opaque;
cls = (*infoenv)->GetObjectClass(infoenv, opobj);
mid = (*infoenv)->GetMethodID(infoenv, cls, "inform", "(L" ... | false | false | false | false | false | 0 |
removeCounter(Audio::Counter *counter) {
vector<Audio::Counter *>::iterator i
= find(facadeCounters.begin(), facadeCounters.end(), counter);
if (i != facadeCounters.end()) {
facadeCounters.erase(i);
}
else {
cout << "WARNING: Counter does not exist" << endl;
}
// If ther... | false | false | false | false | false | 0 |
del_trailing_spaces(ptr)
char_u *ptr;
{
char_u *q;
q = ptr + STRLEN(ptr);
while (--q > ptr && vim_iswhite(q[0]) && q[-1] != '\\' && q[-1] != Ctrl_V)
*q = NUL;
} | false | false | false | false | false | 0 |
innobase_control(
/*=============*/
handlerton*, /*!< in: Innodb handlerton */
const char* cmd, /*!< in: Control command. */
Item** args, /*!< in: Arguments. */
uint args_count) /*!< in: Number of arguments. */
{
if (0 == innobase_strcasecmp(cmd, "prefetch_pages")) {
return(setup_and_prefetch_pages(args, ... | false | false | false | false | false | 0 |
init(unsigned int samplingFreq)
{
fSamplingFreq = samplingFreq;
IOTA = 0;
iConst0 = min(192000, max(1, fSamplingFreq));
fConst1 = (6.283185307179586 / double(iConst0));
fConst2 = (0.5 * iConst0);
clear_state_f();
} | false | false | false | false | false | 0 |
heim_json_copy_serialize(heim_object_t obj, heim_json_flags_t flags, heim_error_t *error)
{
heim_string_t str;
struct heim_strbuf strbuf;
int ret;
if (error)
*error = NULL;
memset(&strbuf, 0, sizeof (strbuf));
strbuf.str = malloc(STRBUF_INIT_SZ);
if (strbuf.str == NULL) {
if (error)
... | false | false | false | false | false | 0 |
hts_isStringAscii(const char *s, size_t size) {
size_t i;
for(i = 0; i < size; i++) {
const unsigned char c = (const unsigned char) s[i];
if (c >= 0x80) {
return 0;
}
}
return 1;
} | false | false | false | false | false | 0 |
LoadString ( Obj string )
{
UInt i, len;
UInt1 c;
UInt1 *p = (UInt1*)CHARS_STRING(string);
len = LoadUInt();
SET_LEN_STRING(string, len);
for (i=0; i<len; i++) {
c = LOAD_BYTE();
p[i] = c;
}
} | false | false | false | false | false | 0 |
calcPeNoAH(Word16 *pe,
Word16 *constPart,
Word16 *nActiveLines,
PE_DATA *peData,
Word16 ahFlag[MAX_CHANNELS][MAX_GROUPED_SFB],
PSY_OUT_CHANNEL psyOutChannel[MA... | false | false | false | false | false | 0 |
wacom_wac_event(struct hid_device *hdev, struct hid_field *field,
struct hid_usage *usage, __s32 value)
{
struct wacom *wacom = hid_get_drvdata(hdev);
if (wacom->wacom_wac.features.type != HID_GENERIC)
return 0;
if (WACOM_PEN_FIELD(field))
return wacom_wac_pen_event(hdev, field, usage, value);
if (WACOM_FI... | false | false | false | false | false | 0 |
__gl_projectPolygon( GLUtesselator *tess )
{
GLUvertex *v, *vHead = &tess->mesh->vHead;
GLdouble norm[3];
GLdouble *sUnit, *tUnit;
int i, computedNormal = FALSE;
norm[0] = tess->normal[0];
norm[1] = tess->normal[1];
norm[2] = tess->normal[2];
if( norm[0] == 0 && norm[1] == 0 && norm[2] == 0 ) {
Com... | false | false | false | false | false | 0 |
listkinds ()
{
int i;
for (i = 0; i < nkinds; i++)
{
Fputws (kinds[i].kind, stdout);
putchar ('\n');
}
} | false | false | false | false | false | 0 |
AlignOutput(ostream &strm) {
for (int i = 0; i < MappedFile::kArchAlignment; ++i) {
int64 pos = strm.tellp();
if (pos < 0) {
LOG(ERROR) << "AlignOutput: can't determine stream position";
return false;
}
if (pos % MappedFile::kArchAlignment == 0) break;
strm.write("", 1);
}
return t... | false | false | false | false | false | 0 |
L172()
{register object *base=vs_base;
register object *sup=base+VM172; VC172
vs_check;
{object V1096;
register object V1097;
register object V1098;
V1096=(base[0]);
V1097=(base[1]);
V1098=(base[2]);
vs_top=sup;
goto TTL;
TTL:;
base[3]= (V1096);
base[4]= immnum_minus((V1097),small_fixnum(10));
base[5]= imm... | false | false | false | false | false | 0 |
atomic(int status)
{
static sigset_t oldmask;
sigset_t newmask;
if (status==1)
{
current_process->atomic_count = current_process->atomic_count + 1;
if (current_process->atomic_count == 1)
{
sigemptyset(&newmask);
// sigfillset(&newmask);
sigaddset(&newmask, 14); //the alarm signal
sigaddset(&... | false | false | false | false | false | 0 |
readCadGeometry()
{
struct emf_ObjectData_X my_ObjectData;
emf_ObjectData = &my_ObjectData;
// Set callback functions
//int my_readDataCB(void**);
emf_readDataCB = readEgfGeometryCB;
emf_readMessageCB = readEgfGeometryMsgCB;
InputEgf* ci = this;
char msg_buffer[256];
// Start parser by calling the... | false | false | false | false | false | 0 |
print_absolute_relocs(FILE *f)
{
int i, printed = 0;
for (i = 0; i < ehdr.e_shnum; i++) {
struct section *sec = &secs[i];
struct section *sec_applies, *sec_symtab;
char *sym_strtab;
Elf32_Sym *sh_symtab;
int j;
if (sec->shdr.sh_type != SHT_REL) {
continue;
}
sec_symtab = sec->link;
sec_applies ... | false | false | false | false | false | 0 |
prepare_create_database(const Glib::ustring& provider,
const Glib::ustring& db_name)
{
GError* gerror = 0;
Glib::RefPtr<ServerOperation> op =
Glib::wrap(gda_server_operation_prepare_create_database(provider.c_str(), db_name.c_str(), &gerror)... | false | false | false | false | false | 0 |
Reset()
{
SeqStop();
sys_time_offset = 0;
seq_time_offset = 0;
play_mode = false;
stop_mode = true;
if ( notifier )
{
notifier->Notify ( sequencer, MIDISequencerGUIEvent ( MIDISequencerGUIEvent::GROUP_ALL ) );
}
} | false | false | false | false | false | 0 |
rtl8723a_SetBeaconRelatedRegisters(struct rtw_adapter *padapter)
{
u32 value32;
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
/* reset TSF, enable update TSF, correcting TSF On Beacon */
/* REG_BCN_INTERVAL */
/* REG_BCNDMATIM */
/* REG_ATIMW... | false | false | false | false | false | 0 |
DrawLLArcs(GWindow gw, GRect *rect,int inset,int radius, Color col1, Color col2) {
GRect r;
if ( inset>=radius )
return;
GetLLRect(&r,rect,inset,radius);
if ( col1==col2 )
GDrawDrawArc(gw,&r,-180*64,90*64,col2);
else {
GDrawDrawArc(gw,&r,-135*64,45*64,col1);
GDrawDrawArc(gw,&r,-180*64,45*64,col2)... | false | false | false | false | false | 0 |
image_find_hash(char *str)
{
uint32 hash = image_hash_name(str, IMAGE_HASH), newhash;
newhash = hash;
do {
/* No entry - return immediately */
if (image_cache[newhash].image_name == NULL) return -1;
if (!strcmp(image_cache[newhash].image_name, str)) return newhash;
newhash ... | false | false | false | false | false | 0 |
multi_team_process_team_update(ubyte *data)
{
ubyte stop,flags;
short player_id;
int player_index;
int offset = 0;
// if I'm the server, bail
Assert(!MULTIPLAYER_MASTER);
// process all players
GET_DATA(stop);
while(stop != 0xff){
// get the net address and flags for the guy
GET_SHORT(player_id);
GET... | false | false | false | false | false | 0 |
my_wc_mb_8bit(CHARSET_INFO *cs,my_wc_t wc,
uchar *str,
uchar *end)
{
MY_UNI_IDX *idx;
if (str >= end)
return MY_CS_TOOSMALL;
for (idx=cs->tab_from_uni; idx->tab ; idx++)
{
if (idx->from <= wc && idx->to >= wc)
{
str[0]= idx->tab[wc - idx->from];
return (!str[0] && wc) ? MY_CS... | false | false | false | false | false | 0 |
range_flip_h (GnmRange *range, Sheet const *sheet, int const *data)
{
int t;
g_return_val_if_fail (range != NULL, TRUE);
t = *data - range->end.col;
range->end.col = *data - range->start.col;
range->start.col = t;
return FALSE;
} | false | false | false | false | false | 0 |
zoran_close_end_session(struct zoran_fh *fh)
{
struct zoran *zr = fh->zr;
/* overlay */
if (fh->overlay_active != ZORAN_FREE) {
fh->overlay_active = zr->overlay_active = ZORAN_FREE;
zr->v4l_overlay_active = 0;
if (!zr->v4l_memgrab_active)
zr36057_overlay(zr, 0);
zr->overlay_mask = NULL;
}
if (fh->map_... | false | false | false | false | false | 0 |
acctexp2(comp2_t ct)
{
count_t exp;
count_t val;
exp = (ct >> 20) & 0xfff; /* obtain 5 bits base-2 exponent */
val = ct & 0xfffff; /* obtain 20 bits mantissa */
while (exp-- > 0)
val <<= 2;
return val;
} | false | false | false | false | false | 0 |
cursor_down()
{
u16 n, y;
n = param[0];
if (n < 1) n = 1;
y = cursor_y + n;
if (y >= height) y = height - 1;
move_cursor(cursor_x, y);
} | false | false | false | false | false | 0 |
cx_config_save(void)
{
/* cursor -2 = ACCEPT, -1 = SAVE */
config_changes();
config_apply();
if (panel_cfg.pd->curs == -1)
config_save();
} | false | false | false | false | false | 0 |
t_show(struct seq_file *m, void *v)
{
struct tracer *t = v;
if (!t)
return 0;
seq_puts(m, t->name);
if (t->next)
seq_putc(m, ' ');
else
seq_putc(m, '\n');
return 0;
} | false | false | false | false | false | 0 |
_dxf_gi_importDatafile(void **data,FILE **fp)
{
int size, gd=ERROR;
/*size = _dxfnumGridPoints();*/
size = _dxfnumGridPoints(-1);
if(!*fp && !_dxf_gi_OpenFile(_dxd_gi_filename, fp, 0)) /* 0 = data file */
goto error;
if ((_dxd_gi_header.type != SKIP_NOTHING)&& !skip_header(*fp,&_dxd_gi_header))
... | false | false | false | false | false | 0 |
fread(string &str)
{
// GNASH_REPORT_FUNCTION;
int ret = -1;
if (_stream) {
char buf[BUFSIZE];
memset(buf, 0, BUFSIZE);
ret = ::fread(buf, 1, BUFSIZE, _stream);
if (ret) {
str = buf;
}
}
return ret;
} | false | false | false | false | false | 0 |
processFinished(int, QProcess::ExitStatus)
{
if (state != Finished) {
state = Finished;
ProgressInterface::instance()->processFinished(cmd_);
}
} | false | false | false | false | false | 0 |
getPatternList() const {
FXString pat;
for(FXint i=0; i<filefilter->getNumItems(); i++){
if(!pat.empty()) pat+='\n';
pat+=filefilter->getItemText(i);
}
return pat;
} | false | false | false | false | false | 0 |
iscsi_parse_root_path ( struct iscsi_session *iscsi,
const char *root_path ) {
char rp_copy[ strlen ( root_path ) + 1 ];
char *rp_comp[NUM_RP_COMPONENTS];
char *rp = rp_copy;
int i = 0;
int rc;
/* Split root path into component parts */
strcpy ( rp_copy, root_path );
while ( 1 ) {
rp_comp[i++] = rp;
... | true | true | false | false | false | 1 |
sendq_flush(connection_t * cptr)
{
mowgli_node_t *n, *tn;
struct sendq *sq;
int l;
return_if_fail(cptr != NULL);
MOWGLI_ITER_FOREACH_SAFE(n, tn, cptr->sendq.head)
{
sq = (struct sendq *)n->data;
if (sq->firstused == sq->firstfree)
... | false | false | false | false | false | 0 |
amdgpu_gem_object_close(struct drm_gem_object *obj,
struct drm_file *file_priv)
{
struct amdgpu_bo *rbo = gem_to_amdgpu_bo(obj);
struct amdgpu_device *adev = rbo->adev;
struct amdgpu_fpriv *fpriv = file_priv->driver_priv;
struct amdgpu_vm *vm = &fpriv->vm;
struct amdgpu_bo_va *bo_va;
int r;
r = amdgpu_bo... | false | false | false | false | false | 0 |
encode_evs(char *buffer, uint8_t *output, size_t outlen)
{
int vendor;
int attr;
int length;
char *p;
vendor = decode_vendor(buffer, &p);
if (vendor == 0) return 0;
attr = decode_attr(p, &p);
if (attr == 0) return 0;
output[0] = 0;
output[1] = (vendor >> 16) & 0xff;
output[2] = (vendor >> 8) & 0xff;
outp... | false | false | false | false | false | 0 |
gst_curl_file_sink_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec)
{
GstCurlFileSink *sink;
g_return_if_fail (GST_IS_CURL_FILE_SINK (object));
sink = GST_CURL_FILE_SINK (object);
switch (prop_id) {
case PROP_CREATE_DIRS:
g_value_set_boolean (value, sink->create... | false | false | false | false | false | 0 |
fillnull(Object *list, Object o)
{
char *string;
char **cp=NULL;
Class class;
int i,item,size,*ifree=NULL;
Object newlist;
class = DXGetObjectClass((Object)o);
/* extract strings */
if (!DXGetArrayInfo((Array)*list,&item,NULL,NULL,NULL,&size))
return NULL;
size=12;
cp... | false | true | false | false | false | 1 |
show_filesystem( const FS & fs )
{
treerow = *( liststore_filesystems ->append() );
treerow[ treeview_filesystems_columns .filesystem ] = Utils::get_filesystem_string( fs .filesystem ) ;
treerow[ treeview_filesystems_columns .create ] = fs .create ? icon_yes : icon_no ;
treerow[ treeview_filesystems_columns .grow... | false | false | false | false | false | 0 |
evd_daemon_new (gint *argc, gchar **argv[])
{
EvdDaemon *self;
gboolean daemonize = FALSE;
GOptionContext *context;
const GOptionEntry entries[] =
{
{ "daemonize", 'D', 0, G_OPTION_ARG_NONE, &daemonize, NULL, NULL },
{ NULL }
};
context = g_option_context_new (NULL);
g_option_context_a... | false | false | false | false | false | 0 |
mock_backend_new_for_begin (void)
{
QofBackend *be = NULL;
be = g_new0 (QofBackend, 1);
g_assert (be);
be->session_begin = mock_session_begin;
session_begin_struct.be = be;
session_begin_struct.backend_new_called = TRUE;
return be;
} | false | false | false | false | false | 0 |
Solve() {
// Process the work lists until they are empty!
while (!BBWorkList.empty() || !InstWorkList.empty() ||
!OverdefinedInstWorkList.empty()) {
// Process the overdefined instruction's work list first, which drives other
// things to overdefined more quickly.
while (!OverdefinedInstWorkLis... | false | false | false | false | false | 0 |
charger_manager_remove(struct platform_device *pdev)
{
struct charger_manager *cm = platform_get_drvdata(pdev);
struct charger_desc *desc = cm->desc;
int i = 0;
int j = 0;
/* Remove from the list */
mutex_lock(&cm_list_mtx);
list_del(&cm->entry);
mutex_unlock(&cm_list_mtx);
cancel_work_sync(&setup_polling);
... | false | false | false | false | false | 0 |
gst_binding_unload (gstPlay *play) {
if (isValid (play)) {
gst_element_set_state (play->element, GST_STATE_NULL);
g_free (play->video_info);
play->video_info = NULL;
play->info_loaded = FALSE;
}
} | false | false | false | false | false | 0 |
gda_value_new_blob_from_file (const gchar *filename)
{
GValue *value;
GdaBlob *blob;
blob = g_new0 (GdaBlob, 1);
blob->op = _gda_dir_blob_op_new (filename);
value = g_new0 (GValue, 1);
g_value_init (value, GDA_TYPE_BLOB);
g_value_take_boxed (value, blob);
return value;
} | false | false | false | false | false | 0 |
getsqlextradata (glong *poi_id, gchar *field_name, gchar *field_entry, gchar *result)
{
gchar sql_query[5000];
glong result_id = 0;
if (field_entry == NULL)
{
g_snprintf (sql_query, sizeof (sql_query),
"SELECT poi_id,entry FROM poi_extra "
"WHERE (poi_id='%ld' AND field_name='%s') LIMIT 1;",
*po... | false | false | false | false | false | 0 |
ath9k_configure_filter(struct ieee80211_hw *hw,
unsigned int changed_flags,
unsigned int *total_flags,
u64 multicast)
{
struct ath_softc *sc = hw->priv;
struct ath_chanctx *ctx;
u32 rfilt;
changed_flags &= SUPPORTED_FILTERS;
*total_flags &= SUPPORTED_FILTERS;
spin_lock_bh(&sc->chan_lock);
... | false | false | false | false | false | 0 |
exists(const std::string& key)
{
if (type != type_hash)
return false;
return u.hash->find(key) != u.hash->end();
} | false | false | false | false | false | 0 |
pushtoken (const gchar* token) {
gint _tmp0_;
gint _tmp1_;
const gchar* _tmp2_;
gchar* _tmp3_;
gchar* _tmp4_;
g_return_if_fail (token != NULL);
_tmp0_ = tok_idx;
if (_tmp0_ >= 64) {
g_error ("gtkonparser.vala:27: Cannot push more tokens");
}
_tmp1_ = tok_idx;
tok_idx = _tmp1_ + 1;
_tmp2_ = token;
_tmp3_ ... | false | false | false | false | false | 0 |
showtree(int indent, mp3entry *entry)
{
char *start;
int i;
if(!entry)
return;
start = malloc(4 * indent + 1);
*start = 0;
for(i = 0; i < indent; i++)
sprintf((start + 4 * i), "| ");
if(IS_DIR(entry)) {
debug(1, "%s|---<%s>\n", start, entry->name);
showtree(indent + 1, entry->child);
} else {
... | false | true | false | false | false | 1 |
base64_decode_binary(std::string const& encoded_string) {
int in_len = encoded_string.size();
int i = 0;
int j = 0;
int in_ = 0;
unsigned char char_array_4[4] = {0};
unsigned char char_array_3[3] = {0};
std::vector<char> ret;
while (in_len-- && ( encoded_string[in_] != '=') && is_base64(encoded_string[in_])) {... | false | false | false | false | false | 0 |
dump_lists (FILE *dump, rtx insn, sd_list_types_def types, int flags)
{
sd_iterator_def sd_it;
dep_t dep;
int all;
all = (flags & 1);
if (all)
flags |= DUMP_LISTS_ALL;
fprintf (dump, "[");
if (flags & DUMP_LISTS_SIZE)
fprintf (dump, "%d; ", sd_lists_size (insn, types));
if (flags & DUMP_LIS... | false | false | false | false | false | 0 |
plot_trace(float *data, double dy, double x0, int n_samp, int do_fill, int negative, int plot_wig, float toffset)
/* shell function to loop over all samples in the current trace, determine plot options
* and call the appropriate bitmap routine */
{
int iy;
int paint_wiggle;
double y0 = 0.0, y1;
for(iy=1; iy<n_sa... | false | false | false | false | false | 0 |
make_restricted_coeff_matrix (const GRETL_VAR *v)
{
gretl_matrix *b = NULL;
gretl_matrix *rbeta = NULL;
int rank = v->jinfo->rank;
int nr = n_restricted_terms(v);
double x;
int j, k, err = 0;
b = gretl_matrix_alloc(rank, nr);
if (b == NULL) {
return NULL;
}
for (j=0; j<rank; j... | false | false | false | false | false | 0 |
kick_blockers(env, conn, unused)
ENV *env;
REPMGR_CONNECTION *conn;
void *unused;
{
int ret, t_ret;
COMPQUIET(unused, NULL);
ret = __repmgr_signal(&conn->drained);
if ((t_ret = __repmgr_wake_waiters(env,
&conn->response_waiters)) != 0 && ret == 0)
ret = t_ret;
return (ret);
} | false | false | false | false | false | 0 |
rx_queue_entry_next (hrz_dev * dev) {
u32 rx_queue_entry;
spin_lock (&dev->mem_lock);
rx_queue_entry = rd_mem (dev, &dev->rx_q_entry->entry);
if (dev->rx_q_entry == dev->rx_q_wrap)
dev->rx_q_entry = dev->rx_q_reset;
else
dev->rx_q_entry++;
wr_regw (dev, RX_QUEUE_RD_PTR_OFF, dev->rx_q_entry - dev->rx... | false | false | false | false | false | 0 |
process_rx_indicator(t38_core_state_t *t, void *user_data, int indicator)
{
t31_state_t *s;
t31_t38_front_end_state_t *fe;
s = (t31_state_t *) user_data;
fe = &s->t38_fe;
if (t->current_rx_indicator == indicator)
{
/* This is probably due to the far end repeating itself. Ignore it.... | false | false | false | false | false | 0 |
tick_check_preferred(struct clock_event_device *curdev,
struct clock_event_device *newdev)
{
/* Prefer oneshot capable device */
if (!(newdev->features & CLOCK_EVT_FEAT_ONESHOT)) {
if (curdev && (curdev->features & CLOCK_EVT_FEAT_ONESHOT))
return false;
if (tick_oneshot_mode_active())
return false;
}
... | false | false | false | false | false | 0 |
txBufInit(pTXBUFFER txBuf, uint32_t sizeInit)
{
BC_STATUS sts = BC_STS_SUCCESS;
int ret = 0;
if(txBuf->buffer != NULL)
return BC_STS_INV_ARG;
ret = posix_memalign((void**)&txBuf->buffer, 128, sizeInit);
if(ret)
return BC_STS_INSUFF_RES;
if(txBuf->buffer != NULL)
{
txBuf->basePointer = txBuf->buffer;
txBu... | false | false | false | false | false | 0 |
dfb_surface_buffer_read( CoreSurfaceBuffer *buffer,
void *destination,
int pitch,
const DFBRectangle *prect )
{
DFBResult ret;
DFBRectangle rect;
int i, y;
... | false | false | false | false | true | 1 |
SplitVecRes_ExtendOp(SDNode *N, SDValue &Lo,
SDValue &Hi) {
SDLoc dl(N);
EVT SrcVT = N->getOperand(0).getValueType();
EVT DestVT = N->getValueType(0);
EVT LoVT, HiVT;
std::tie(LoVT, HiVT) = DAG.GetSplitDestVTs(DestVT);
// We can do better than a generic split ope... | false | false | false | false | false | 0 |
resetColumnLocations(void)
{
for (unsigned i=0;i<columnList()->count();i++) reportColumn(i)->column(i);
} | false | false | false | false | false | 0 |
tracker_data_update_statement (const gchar *graph,
const gchar *subject,
const gchar *predicate,
const gchar *object,
GError **error)
{
... | false | false | false | false | false | 0 |
v60_try_irq(void)
{
if(v60.irq_line == CLEAR_LINE)
return;
if((PSW & (1<<18)) != 0) {
int vector;
if(v60.irq_line != ASSERT_LINE)
v60.irq_line = CLEAR_LINE;
vector = v60.irq_cb(0);
v60_do_irq(vector + 0x40);
} else if(v60.irq_line == PULSE_LINE)
v60.irq_line = CLEAR_LINE;
} | false | false | false | false | false | 0 |
asn1_enc_save(ASN1_VALUE **pval, const unsigned char *in, int inlen,
const ASN1_ITEM *it)
{
ASN1_ENCODING *enc;
enc = asn1_get_enc_ptr(pval, it);
if (!enc)
return 1;
if (enc->enc)
OPENSSL_free(enc->enc);
enc->enc = OPENSSL_malloc(inlen);
if (!enc->enc)
return 0;
memcpy(enc->enc, in, inlen);
enc-... | false | true | false | false | false | 1 |
CgGenerateAmlOpcodeLength (
ACPI_PARSE_OBJECT *Op)
{
/* Check for two-byte opcode */
if (Op->Asl.AmlOpcode > 0x00FF)
{
Op->Asl.AmlOpcodeLength = 2;
}
else
{
Op->Asl.AmlOpcodeLength = 1;
}
/* Does this opcode have an associated "PackageLength" field? */
O... | false | false | false | false | false | 0 |
AddStyle(const char *pszStyleName,
const char *pszStyleString)
{
const char *pszStyle;
if (pszStyleString)
pszStyle = pszStyleString;
else
pszStyle = m_pszStyleString;
if (m_poDataSetStyleTable)
{
return m_poDataSetStyleTable->AddStyle(pszStyleName,... | false | false | false | false | false | 0 |
table_INRANGE (struct GMTMATH_INFO *info, double **stack[], GMT_LONG *constant, double *factor, GMT_LONG last, GMT_LONG col, GMT_LONG n_row)
/*OPERATOR: INRANGE 3 1 1 if B <= A <= C, else 0. */
{
GMT_LONG i, prev1, prev2;
GMT_LONG inrange;
double a = 0.0, b = 0.0, c = 0.0;
/* last is C */
prev1 = last - 1; /* Th... | false | false | false | false | false | 0 |
setSourceDirectory(const QString& _dir)
{
QString dir =
QString::fromLocal8Bit(cmSystemTools::GetActualCaseForPath(_dir.toLocal8Bit().data()).c_str());
if(this->SourceDirectory != dir)
{
this->SourceDirectory = QDir::fromNativeSeparators(dir);
emit this->sourceDirChanged(this->SourceDirectory);
... | false | false | false | false | false | 0 |
read ( tnstream& stream )
{
stream.readInt();
ASCString id = stream.readString();
GameTransferMechanism* m = networkTransferMechanismFactory::Instance().createObject( id );
m->readChildData( stream );
return m;
} | false | false | false | false | false | 0 |
FSM_create(gchar *alphabet, FSM_Join_Func merge_func,
FSM_Join_Func combine_func, gpointer user_data){
register FSM *f = g_new0(FSM, 1);
register guchar *p;
g_assert(alphabet);
g_assert(merge_func);
g_assert(combine_func);
for(p = ((guchar*)alphabet); *p; p++)
f->index[*p... | false | false | false | false | true | 1 |
board_score(search_info &info, int player)
{
pthread_testcancel();
if (info.board->board_black_score() == 0
|| info.board->board_white_score() == 0)
return end_board_score(info);
return get_random() + pattern_eval(info.board)
+ parity_eval_alpha_beta(info, player);
} | 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.