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 |
|---|---|---|---|---|---|---|
multi_team_report()
{
int i;
char report[400] = "";
// a little header
SEND_AND_DISPLAY("----****");
// display scores
for (i = 0; i < Num_teams; i++)
{
// Retail FS2 teams (i.e red or green)
if (i <= 1)
{
sprintf(report, XSTR("<Team %d had %d points>", (1275+i)), Multi_team_score[i]);
}
// Kara... | false | false | false | false | true | 1 |
gt_spmfind_state_delete(bool eqlen, GtBUstate_spm *state)
{
if (state != NULL)
{
gt_logger_log(state->verbose_logger, "number of %ssuffix-prefix matches "
"[thread %u] = %lu", state->elimtrans ? "irreducible " : "",
state->threadnum, state->nofvalidspm);
if (state->elimtrans)
gt_logger... | false | false | false | false | false | 0 |
gst_ogg_pad_reset (GstOggPad * pad)
{
ogg_stream_reset (&pad->map.stream);
GST_DEBUG_OBJECT (pad, "doing reset");
/* clear continued pages */
g_list_foreach (pad->continued, (GFunc) gst_ogg_page_free, NULL);
g_list_free (pad->continued);
pad->continued = NULL;
pad->last_ret = GST_FLOW_OK;
pad->last_s... | false | false | false | false | false | 0 |
drag_end (AisleriotBoard *board,
gboolean moved)
{
AisleriotBoardPrivate *priv = board->priv;
if (priv->moving_cards_window != NULL) {
gdk_window_hide (priv->moving_cards_window);
gdk_window_destroy (priv->moving_cards_window);
priv->moving_cards_window = NULL;
}
/* FIXMEchpe: check that... | false | false | false | false | false | 0 |
storeUfsDirCleanLogNextEntry(SwapDir * sd)
{
const StoreEntry *entry = NULL;
struct _clean_state *state = sd->log.clean.state;
if (state->walker)
entry = state->walker->Next(state->walker);
return entry;
} | false | false | false | false | false | 0 |
rdataset_next(dns_rdataset_t *rdataset) {
unsigned int count;
unsigned int length;
unsigned char *raw;
count = rdataset->privateuint4;
if (count == 0)
return (ISC_R_NOMORE);
count--;
rdataset->privateuint4 = count;
raw = rdataset->private5;
length = raw[0] * 256 + raw[1];
raw += length + 2;
rdataset->priv... | false | false | false | false | false | 0 |
CreateFileDownloadBlockSizeDataMsg(unsigned short sizeFile, char *pFile)
{
FileTransferMsg fileDownloadBlockSizeDataMsg;
int length = sz_rfbFileDownloadDataMsg + sizeFile;
rfbFileDownloadDataMsg *pFDD = NULL;
char *pFollow = NULL;
char *pData = (char*) calloc(length, sizeof(char));
memset(&fileDownloadBlockSize... | false | false | false | false | false | 0 |
H5Pget_fapl_family(hid_t fapl_id, hsize_t *msize/*out*/,
hid_t *memb_fapl_id/*out*/)
{
H5FD_family_fapl_t *fa;
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE3("e", "ixx", fapl_id, msize, memb_fapl_id)... | false | true | false | false | false | 1 |
WriteLauncherConfig()
{
this->WriteScrapeMatchers("Warning",
this->Handler->ReallyCustomWarningMatches);
this->WriteScrapeMatchers("WarningSuppress",
this->Handler->ReallyCustomWarningExceptions);
// Give some testing configuration information to the launch... | false | false | false | false | false | 0 |
test_empty_argparse(PyObject *self)
{
/* Test that formats can begin with '|'. See issue #4720. */
PyObject *tuple, *dict = NULL;
static char *kwlist[] = {NULL};
int result;
tuple = PyTuple_New(0);
if (!tuple)
return NULL;
if ((result = PyArg_ParseTuple(tuple, "|:test_empty_argparse"... | false | false | false | false | false | 0 |
FuncAddAbelianRelator (
Obj self,
Obj rels, /* relators list */
Obj number )
{
Obj * ptRels; /* pointer to relators list */
Obj * pt1; /* pointer to a relator ... | false | false | false | false | false | 0 |
getImage(struct soap *soap, char *name)
{ ns__Data image;
arrayOfName temp;
temp.resize(1);
temp[0] = name;
soap->user = (void*)temp.__ptr;
if (soap_call_ns__getImage(soap, endpoint, NULL, name, image))
soap_print_fault(soap, stderr);
else if (image.id)
{ if (image.__size)
printf("Got image %s s... | false | false | false | false | false | 0 |
createStatusBar()
{
statusBar()->showMessage(tr("Ready"));
mViewXLabel = new QLabel( "X = 0" , this);
mViewXLabel->setMinimumWidth(75);
mViewXLabel->setMaximumWidth(75);
mViewXLabel->setAlignment(Qt::AlignLeft);
mViewYLabel = new QLabel( "Y = 0" , this);
mViewYLabel->setMinimumWidth(75);
mViewYLabel->setMa... | false | false | false | false | false | 0 |
dna_init(Slapi_PBlock *pb)
{
int status = DNA_SUCCESS;
char *plugin_identity = NULL;
char *plugin_type = NULL;
int preadd = SLAPI_PLUGIN_BE_PRE_ADD_FN;
int premod = SLAPI_PLUGIN_BE_PRE_MODIFY_FN;
slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM,
"--> dna_init\n");
... | false | false | false | false | false | 0 |
hasBoundaryExpression() const
{
return (__fExpression->hasBoundaryExpression()
or __gExpression->hasBoundaryExpression());
} | false | false | false | false | false | 0 |
btrfs_find_all_leafs(struct btrfs_trans_handle *trans,
struct btrfs_fs_info *fs_info, u64 bytenr,
u64 time_seq, struct ulist **leafs,
const u64 *extent_item_pos)
{
int ret;
*leafs = ulist_alloc(GFP_NOFS);
if (!*leafs)
return -ENOMEM;
ret = find_parent_nodes(trans, fs_info, bytenr,
time_seq, *lea... | false | false | false | false | false | 0 |
gst_avdtp_sink_stop(GstBaseSink *basesink)
{
GstAvdtpSink *self = GST_AVDTP_SINK(basesink);
GST_INFO_OBJECT(self, "stop");
if (self->watch_id != 0) {
g_source_remove(self->watch_id);
self->watch_id = 0;
}
if (self->server) {
bt_audio_service_close(g_io_channel_unix_get_fd(self->server));
g_io_channel_un... | false | false | false | false | false | 0 |
free_temp_keyname_list(gs_memory_t * mem, keyname_link_list_t * plist)
{
keyname_link_list_t * pthis_elem;
while (plist != NULL) {
pthis_elem = plist;
plist = plist->next;
gs_free_object(mem, (byte *)pthis_elem, "free_temp_keyname_list");
}
return 0;
} | false | false | false | false | false | 0 |
_dl_start(void)
{
static Elf32_Addr last_load_address = 0;
struct link_map map;
size_t cnt;
/* Partly clean the `map' structure up. Don't use `memset'
since it might nor be built in or inlined and we cannot make function
calls at this point. */
for (cnt = 0; cnt < sizeof(map.l_info) / sizeof(map.l_info... | false | false | false | false | false | 0 |
press(const Event& e) {
if (elevator_->inside(e) || elevator_->grabbing()) {
elevator_->press(e);
} else {
cable_->press(e);
}
ActiveHandler::press(e);
} | false | false | false | false | false | 0 |
select_restore_job_resource(UAContext *ua)
{
char name[MAX_NAME_LENGTH];
JOB *job;
start_prompt(ua, _("The defined Restore Job resources are:\n"));
LockRes();
foreach_res(job, R_JOB) {
if (job->JobType == JT_RESTORE && acl_access_ok(ua, Job_ACL, job->name())) {
add_prompt(ua, job->name())... | false | false | false | false | false | 0 |
ECPGnumeric_lvalue(char *name)
{
const struct variable *v = find_variable(name);
switch (v->type->type)
{
case ECPGt_short:
case ECPGt_int:
case ECPGt_long:
case ECPGt_long_long:
case ECPGt_unsigned_short:
case ECPGt_unsigned_int:
case ECPGt_unsigned_long:
case ECPGt_unsigned_long_long:
case ECPGt... | false | false | false | false | false | 0 |
ajFtpRead(const AjPStr dbname,
const AjPStr host,
ajint port, ajlong fpos, const AjPStr dbpath)
{
AjPStr get = NULL;
AjPStr newhost = NULL;
AjPStr path = NULL;
AjPFilebuff buff = NULL;
FILE* fp = NULL;
AjOSysSocket sock;
AjOSy... | false | false | false | false | false | 0 |
Perl_utf8_to_bytes(pTHX_ U8 *s, STRLEN *len)
{
U8 * const save = s;
U8 * const send = s + *len;
U8 *d;
PERL_ARGS_ASSERT_UTF8_TO_BYTES;
/* ensure valid UTF-8 and chars < 256 before updating string */
while (s < send) {
U8 c = *s++;
if (!UTF8_IS_INVARIANT(c) &&
(!UTF... | false | false | false | false | false | 0 |
imageInfo(uint64 len, const MD5Sum& md5, size_t blockLength) {
files.reserve((files.size() + 16) % 16);
files.push_back(new JigdoDesc::ImageInfo(len, md5, blockLength));
} | false | false | false | false | false | 0 |
ext4_trim_fs(struct super_block *sb, struct fstrim_range *range)
{
struct ext4_group_info *grp;
ext4_group_t group, first_group, last_group;
ext4_grpblk_t cnt = 0, first_cluster, last_cluster;
uint64_t start, end, minlen, trimmed = 0;
ext4_fsblk_t first_data_blk =
le32_to_cpu(EXT4_SB(sb)->s_es->s_first_data_blo... | false | false | false | false | false | 0 |
mx_progress_bar_fill_style_changed_cb (MxProgressBarFill *self)
{
guint height;
mx_stylable_get (MX_STYLABLE (self),
"height", &height,
NULL);
if (self->height != height)
{
self->height = height;
clutter_actor_queue_relayout (CLUTTER_ACTOR (self));
}
} | false | false | false | false | false | 0 |
camel_stream_process_connect (CamelStreamProcess *stream,
const gchar *command,
const gchar **env,
GError **error)
{
gint sockfds[2];
g_return_val_if_fail (CAMEL_IS_STREAM_PROCESS (stream), -1);
g_return_val_if_fail (command !... | false | false | false | false | false | 0 |
stream_init_multi(int channels,const char **names,const int *default_mixing_levels,
int sample_rate,
int param,void (*callback)(int param,INT16 **buffer,int length))
{
int channel,i;
channel = mixer_allocate_channels(channels,default_mixing_levels);
stream_joined_channels[channel] = channels;
for... | false | false | false | false | false | 0 |
optimize(int backup)
{
struct line_s *cur, *lp;
int i;
int in_asm = 0;
/* Scan through all lines in the input file */
cur = infile;
while (cur != NULL) {
if (cur->comment_flg || in_asm)
{
lp=cur->next;
if (memcmp(cur->text, "!BCC_", 5) == 0)
in_asm = (memcmp(cur->text+5, "ASM", 3) == 0);
}
else
... | false | false | false | false | false | 0 |
TouchDirectory(struct File *ptr) /* True if file path in /. */
{ char *sp;
if (ptr->action == touch||ptr->action == create)
{
sp = ptr->path+strlen(ptr->path)-2;
if (strcmp(sp,"/.") == 0)
{
return(true);
}
else
{
return false;
}
}
else
{
re... | false | false | false | false | false | 0 |
zfgetspace (qdaemon, pclen)
struct sdaemon *qdaemon ATTRIBUTE_UNUSED;
size_t *pclen;
{
*pclen = CFBUFSIZE;
if (zFbuf == NULL)
zFbuf = (char *) xmalloc (CFBUFSIZE);
return zFbuf;
} | false | false | false | false | false | 0 |
updateForeground(unsigned long oldfg_)
{
MSWidgetCommon::updateForeground(oldfg_);
int i,n;
n=itemVector().length();
MSMenuItem *mi;
for(i=0;i<n;i++)
{
mi=(MSMenuItem*)itemVector()(i);
// Only modify my child's foreground if his foreground is same as my old foreground
if (mi->foreground()==o... | false | false | false | false | false | 0 |
add_string (char ***argv, size_t *n_used, size_t *n_alloc, const char *str)
{
char *new_str;
if (*n_used >= *n_alloc)
*argv = x2nrealloc (*argv, n_alloc, sizeof (char *));
if (str)
new_str = xstrdup (str);
else
new_str = NULL;
(*argv)[*n_used] = new_str;
(*n_used)++;
} | false | false | false | false | false | 0 |
hso_mux_serial_write_data(struct hso_serial *serial)
{
if (NULL == serial)
return -EINVAL;
return mux_device_request(serial,
USB_CDC_SEND_ENCAPSULATED_COMMAND,
serial->parent->port_spec & HSO_PORT_MASK,
serial->tx_urb,
&serial->ctrl_req_tx,
serial->tx_data, serial->tx_data_count);
} | false | false | false | false | false | 0 |
ECIES_decryptkeygen(uint8_t *rx, uint8_t *ry,
uint8_t k1[16], uint8_t k2[16], const char *privkey)
{
elem_t Rx, Ry, Zx, Zy;
exp_t d;
bitstr_import(Rx, (char*)rx);
bitstr_import(Ry, (char*)ry);
if (ECIES_embedded_public_key_validation(Rx, Ry) < 0)
return -1;
bitstr_parse(d, privkey);
point... | false | false | false | false | false | 0 |
core_dev_release_virtual_lun0(void)
{
struct se_hba *hba = lun0_hba;
if (!hba)
return;
if (g_lun0_dev)
target_free_device(g_lun0_dev);
core_delete_hba(hba);
} | false | false | false | false | false | 0 |
udp_init(void)
{
int err;
static __lowmem struct s_PXENV_UDP_OPEN udp_open;
udp_open.src_ip = IPInfo.myip;
err = pxe_call(PXENV_UDP_OPEN, &udp_open);
if (err || udp_open.status) {
printf("Failed to initialize UDP stack ");
printf("%d\n", udp_open.status);
kaboom();
}
} | false | false | false | false | false | 0 |
constructVertex(tSubProPtr sub) {
// Hard proces external particles
ParticleVector hdp = hardParticles(sub);
// wavefunctions with real momenta
SpinorVector sp;
SpinorBarVector spbar;
VBVector vec;
bool mv(hdp[2]->dataPtr()->mass() == ZERO);
SpinorWaveFunction (sp, hdp[0], incoming, false);
Spin... | false | false | false | false | false | 0 |
hfsplus_validate_catalog(cli_ctx *ctx, hfsPlusVolumeHeader *volHeader, hfsHeaderRecord *catHeader)
{
hfsPlusForkData *catFork;
UNUSEDPARAM(ctx);
catFork = &(volHeader->catalogFile);
if (catFork->totalBlocks >= volHeader->totalBlocks) {
cli_dbgmsg("hfsplus_getnodelimit: catFork totalBlocks too ... | false | false | false | false | false | 0 |
remove_network(gpointer user_data)
{
struct connman_dhcp *dhcp = user_data;
DBG("dhcp %p", dhcp);
dhcp_invalidate(dhcp, FALSE);
dhcp_release(dhcp);
g_free(dhcp);
} | false | false | false | false | false | 0 |
glade_project_read_requires (GladeProject *project,
GladeXmlNode *root_node,
const gchar *path,
gboolean *has_gtk_dep)
{
GString *string = g_string_new (NULL);
GladeXmlNode *node;
gchar *required_lib = NULL;
gboolean loadable = TRUE;
guint16 major, minor;
for... | false | false | false | false | false | 0 |
s48_call_scheme(s48_value proc, long nargs, ...)
{
int i;
va_list arguments;
s48_value value;
s48_value unwind, stack_block;
S48_DECLARE_GC_PROTECT(2);
S48_GC_PROTECT_2(unwind, proc);
va_start(arguments, nargs);
S48_SHARED_BINDING_CHECK(s48_deref(callback_binding));
/* It would be nice to push a... | false | false | false | false | false | 0 |
arp_spoof_list_items(void)
{
struct list_iterator li;
struct arp_spoof_info *asi;
char buf[BUFSIZE];
int i = 0;
list_iter_set(&li, &l_arp_spoof);
while ((asi = list_iter_get(&li))) {
if (asi->in_range)
break;
sprintf_eth_mac(buf, asi->src_fake_mac);
printf("%2d) on %-16s is %-16s as %s refresh %ds\n", ... | false | false | false | false | false | 0 |
PrintSelf(ostream& os, vtkIndent indent)
{
this->Superclass::PrintSelf(os,indent);
os << indent << "Point Ids: " << (this->PointIds ? "On\n" : "Off\n");
os << indent << "Cell Ids: " << (this->CellIds ? "On\n" : "Off\n");
os << indent << "Field Data: " << (this->FieldData ? "On\n" : "Off\n");
os << i... | false | false | false | false | false | 0 |
alog_open(char *fname, int use_localtm, int use_markers)
{
FILE *f;
use_localtime = use_localtm;
markers = use_markers;
if (file != NULL) {
warning(0, "Opening an already opened access log");
alog_close();
}
if (strlen(fname) > FILENAME_MAX) {
error(0, "Access Log f... | false | true | false | false | true | 1 |
create_hf_name (char const *left, char const *middle, char const *right)
{
char *this, *res;
res = g_strdup_printf ("%s%s%s%s%s",
left," \xe2\x90\xa3 ", middle, " \xe2\x90\xa3 ", right);
this = res;
while (*this) {
if (*this == '\n') {
char *newstring;
*this = 0;
newstring = g_strco... | false | false | false | false | false | 0 |
point_interpolate(const fn_call& fn)
{
as_value x0val;
as_value y0val;
as_value x1val;
as_value y1val;
as_value muval;
if ( fn.nargs < 3 )
{
IF_VERBOSE_ASCODING_ERRORS(
std::stringstream ss; fn.dump_args(ss);
log_aserror(_("Point.interpolate(%s): %s"), ss.str(),
... | false | false | false | false | false | 0 |
core_scsi3_lunacl_undepend_item(struct se_dev_entry *se_deve)
{
struct se_lun_acl *lun_acl;
struct se_node_acl *nacl;
struct se_portal_group *tpg;
/*
* For nacl->dynamic_node_acl=1
*/
lun_acl = rcu_dereference_check(se_deve->se_lun_acl,
atomic_read(&se_deve->pr_kref.refcount) != 0);
if (!lun_acl) {
kref... | false | false | false | false | false | 0 |
VBO_DerefBusyObj(struct worker *wrk, struct busyobj **pbo)
{
struct busyobj *bo;
struct vbo *vbo;
unsigned r;
CHECK_OBJ_NOTNULL(wrk, WORKER_MAGIC);
AN(pbo);
bo = *pbo;
*pbo = NULL;
CHECK_OBJ_NOTNULL(bo, BUSYOBJ_MAGIC);
vbo = bo->vbo;
CHECK_OBJ_NOTNULL(vbo, VBO_MAGIC);
Lck_Lock(&vbo->mtx);
assert(vbo->refco... | false | false | false | true | false | 1 |
anx9805_bus_xfer(struct nvkm_i2c_bus *base, struct i2c_msg *msgs, int num)
{
struct anx9805_bus *bus = anx9805_bus(base);
struct anx9805_pad *pad = bus->pad;
struct i2c_adapter *adap = &pad->bus->i2c;
struct i2c_msg *msg = msgs;
int ret = -ETIMEDOUT;
int i, j, cnt = num;
u8 seg = 0x00, off = 0x00, tmp;
tmp = n... | false | false | false | false | false | 0 |
pruneCCSTree (CostCentreStack *ccs)
{
CostCentreStack *ccs1;
IndexTable *i, **prev;
prev = &ccs->indexTable;
for (i = ccs->indexTable; i != 0; i = i->next) {
if (i->back_edge) { continue; }
ccs1 = pruneCCSTree(i->ccs);
if (ccs1 == NULL) {
*prev = i->next;
} ... | false | false | false | false | false | 0 |
get_varp_scope(p, opt_flags)
struct vimoption *p;
int opt_flags;
{
if ((opt_flags & OPT_GLOBAL) && p->indir != PV_NONE)
{
if (p->var == VAR_WIN)
return (char_u *)GLOBAL_WO(get_varp(p));
return p->var;
}
if ((opt_flags & OPT_LOCAL) && ((int)p->indir & PV_BOTH))
{
switch ((int)p->ind... | false | false | false | false | false | 0 |
grab_kbd(saver_info *si, Window w, int screen_no)
{
saver_preferences *p = &si->prefs;
int status = XGrabKeyboard (si->dpy, w, True,
/* I don't really understand Sync vs Async,
but these seem to work... */
GrabModeSync, GrabModeAsync,
CurrentTime);
if (status == GrabSuccess)
{
... | false | false | false | false | false | 0 |
gp_cairo_get_encoding(plot_struct *plot)
{
const char * charset;
switch (plot->encoding) {
case S_ENC_ISO8859_2 : return "ISO-8859-2";
case S_ENC_ISO8859_15 : return "ISO-8859-15";
case S_ENC_CP437 : return "cp437";
case S_ENC_CP850 : return "cp850";
case S_ENC_CP852 : return "cp852";
case S_ENC_CP1250 : ret... | false | false | false | false | false | 0 |
is_ASCII_name(const char *hostname)
{
const unsigned char *ch = (const unsigned char*)hostname;
while(*ch) {
if(*ch++ & 0x80)
return FALSE;
}
return TRUE;
} | false | false | false | false | false | 0 |
zset_row(mat,row,vec)
ZMAT *mat;
ZVEC *vec;
int row;
{
u_int /* j, */ lim;
if ( mat==ZMNULL || vec==ZVNULL )
error(E_NULL,"zset_row");
if ( row < 0 || row >= mat->m )
error(E_RANGE,"zset_row");
lim = min(mat->n,vec->dim);
/* for ( j=j0; j<lim; j++ ) */
/* mat->me[row][j] = vec->ve[j]; */
MEMCOPY(vec->ve... | false | false | false | true | false | 1 |
featTagval(const AjPFeature thys, const AjPStr tag)
{
AjIList iter = NULL;
AjPTagval ret = NULL;
AjPTagval tv = NULL;
iter = ajListIterNewread(thys->Tags);
while(!ajListIterDone(iter))
{
tv = ajListIterGet(iter);
if(ajStrMatchCaseS(MAJTAGVALGETTAG(tv), tag))
{
/* ajDebug("featTag... | false | false | false | false | false | 0 |
processLoopStoreOfLoopLoad(
StoreInst *SI, unsigned StoreSize, const SCEVAddRecExpr *StoreEv,
const SCEVAddRecExpr *LoadEv, const SCEV *BECount) {
// If we're not allowed to form memcpy, we fail.
if (!TLI->has(LibFunc::memcpy))
return false;
LoadInst *LI = cast<LoadInst>(SI->getValueOperand());
//... | false | false | false | false | false | 0 |
rapl_check_hw_unit(void)
{
u64 msr_rapl_power_unit_bits;
int i;
/* protect rdmsrl() to handle virtualization */
if (rdmsrl_safe(MSR_RAPL_POWER_UNIT, &msr_rapl_power_unit_bits))
return -1;
for (i = 0; i < NR_RAPL_DOMAINS; i++)
rapl_hw_unit[i] = (msr_rapl_power_unit_bits >> 8) & 0x1FULL;
return 0;
} | false | false | false | false | false | 0 |
TextShell(const wxString &prompt)
{
char buffer[2048];
wxString buf;
bool The_End = false;
do {
GetCommand(prompt, buffer, sizeof buffer);
buf = char2unicode(buffer);
The_End = Parse_Command(buf);
} while ((!The_End) && (m_ECClient->IsSocketConnected()));
} | false | false | false | false | false | 0 |
dosave1(BW *bw, unsigned char *s, struct savereq *req, int *notify)
{
int f;
if (req->name)
vsrm(req->name);
req->name = s;
if (s[0] != '!' && !(s[0] == '>' && s[1] == '>')) {
/* It's a normal file: not a pipe or append */
if (!bw->b->name || strcmp(s, bw->b->name)) {
/* Newly named file or name is diffe... | false | false | false | false | true | 1 |
unicode_lbc_init(int (*cb_func)(int, unicode_char, void *),
void *cb_arg)
{
unicode_lbc_info_t h=
(unicode_lbc_info_t)calloc(1, sizeof(struct unicode_lbc_info));
if (!h)
return NULL;
h->cb_func=cb_func;
h->cb_arg=cb_arg;
if ((h->handle=unicode_lb_init(unicode_lbc_callback, h)) == NULL)
{
free(h);... | false | false | false | false | false | 0 |
diffdate(char *date1, char *date2)
{
int jdate1, jdate2;
int year1, year2;
int month1, month2;
int day1, day2;
int hour1, hour2;
int min1, min2;
int sec1, sec2;
int diff;
int f;
if (date1 == NULL || date2 == NULL) {
cpl_msg_error("diffdate", "NULL inpu... | false | false | false | false | false | 0 |
rndis_response_available(void *_rndis)
{
struct f_rndis *rndis = _rndis;
struct usb_request *req = rndis->notify_req;
struct usb_composite_dev *cdev = rndis->port.func.config->cdev;
__le32 *data = req->buf;
int status;
if (atomic_inc_return(&rndis->notify_count) != 1)
return;
/* Send RNDIS RESPONSE_... | false | false | false | false | false | 0 |
fz_paint_affine_alpha_N_lerp(byte *dp, byte *sp, int sw, int sh, int u, int v, int fa, int fb, int w, int n, int alpha, byte *hp)
{
int k;
int n1 = n-1;
while (w--)
{
int ui = u >> 16;
int vi = v >> 16;
if (ui >= 0 && ui < sw && vi >= 0 && vi < sh)
{
int uf = u & 0xffff;
int vf = v & 0xffff;
byte ... | false | false | false | false | false | 0 |
wait_for_peercallno(struct chan_iax2_pvt *pvt)
{
unsigned short callno = pvt->callno;
if (!pvt->peercallno) {
/* We don't know the remote side's call number, yet. :( */
int count = 10;
while (count-- && pvt && !pvt->peercallno) {
DEADLOCK_AVOIDANCE(&iaxsl[callno]);
pvt = iaxs[callno];
}
if (!pvt || ... | false | false | false | false | false | 0 |
gen_determ_combis(int beg,
int len,
int &pos_counter,
probe_combi_statistic *p)
{
int i, j;
probe_combi_statistic *bastel_probe_combi;
if (len == 0)
{
probe_combi_stat_array[pos_counte... | false | false | false | true | true | 1 |
node_proxy_cancel_all(void)
{
GSList *sl;
for (sl = sl_nodes; sl; sl = g_slist_next(sl)) {
gnutella_node_t *n = sl->data;
if (is_host_addr(n->proxy_addr)) {
if (NODE_IS_WRITABLE(n))
vmsg_send_proxy_cancel(n);
n->proxy_addr = zero_host_addr;
n->proxy_port = 0;
}
}
pproxy_set_free_null(&proxies)... | false | false | false | false | false | 0 |
load_unicode(Unpicklerobject *self)
{
PyObject *str = 0;
Py_ssize_t len;
char *s;
if ((len = self->readline_func(self, &s)) < 0) return -1;
if (len < 1) return bad_readline();
if (!( str = PyUnicode_DecodeRawUnicodeEscape(s, len - 1, NULL)))
return -1;
PDATA_PUSH(self->stack, str,... | false | false | false | false | false | 0 |
parse_option(struct isl_arg *decl, char **arg,
struct isl_prefixes *prefixes, void *opt)
{
int i;
for (i = 0; decl[i].type != isl_arg_end; ++i) {
int parsed = 0;
switch (decl[i].type) {
case isl_arg_choice:
parsed = parse_choice_option(&decl[i], arg,
prefixes, opt);
break;
case isl_arg_flags:
... | false | false | false | false | false | 0 |
gnc_tree_model_split_reg_iter_n_children (GtkTreeModel *tree_model, GtkTreeIter *iter)
{
/* Returns the number of children that iter has. As a special case,
if iter is NULL, then the number of toplevel nodes is returned. */
GncTreeModelSplitReg *model = GNC_TREE_MODEL_SPLIT_REG (tree_model);
GList *... | false | false | false | false | false | 0 |
dfb_agp_deallocate( int key )
{
if (ioctl( dfb_agp->fd, AGPIOC_DEALLOCATE, key )) {
D_PERROR( "DirectFB/FBDev/agp: "
"Deallocate failed (key = %d)!\n", key );
return errno2result( errno );
}
return DFB_OK;
} | false | false | false | false | false | 0 |
segment_erase_middle_ (GtkSourceContextEngine *ce,
Segment *segment,
gint start,
gint end)
{
Segment *new_segment, *child;
SubPattern *sp;
new_segment = segment_new (ce,
segment->parent,
segment->context,
end,
... | false | false | false | false | false | 0 |
compiler_unit_check(struct compiler_unit *u)
{
basicblock *block;
for (block = u->u_blocks; block != NULL; block = block->b_list) {
assert((void *)block != (void *)0xcbcbcbcb);
assert((void *)block != (void *)0xfbfbfbfb);
assert((void *)block != (void *)0xdbdbdbdb);
if (block->b_... | false | false | false | false | false | 0 |
nmea_set_waypoint_time(waypoint* wpt, struct tm* time, int microseconds)
{
if (time->tm_year == 0) {
wpt->creation_time = ((((time_t)time->tm_hour * 60) + time->tm_min) * 60) + time->tm_sec;
wpt->microseconds = microseconds;
if (wpt->wpt_flags.fmt_use == 0) {
wpt->wpt_flags.fmt_use = 1;
}
} el... | false | false | false | false | false | 0 |
init_macke() {
/* void Freespace(); */
/* char *Dupstr(); */
int indi;
/* initialize macke format */
Freespace(&(data.macke.seqabbr));
Freespace(&(data.macke.name));
Freespace(&(data.macke.atcc));
Freespace(&(data.macke.rna));
Freespace(&(data.macke.date));
Freespace... | true | true | false | false | true | 1 |
qla1280_abort_command(struct scsi_qla_host *ha, struct srb * sp, int handle)
{
uint16_t mb[MAILBOX_REGISTER_COUNT];
unsigned int bus, target, lun;
int status;
ENTER("qla1280_abort_command");
bus = SCSI_BUS_32(sp->cmd);
target = SCSI_TCN_32(sp->cmd);
lun = SCSI_LUN_32(sp->cmd);
sp->flags |= SRB_ABORT_PENDING;... | false | false | false | false | false | 0 |
cleanupTestCase()
{
qDeleteAll(m_gooStrings);
delete globalParams;
} | false | false | false | false | false | 0 |
si476x_core_config_pinmux(struct si476x_core *core)
{
int err;
dev_dbg(&core->client->dev, "Configuring pinmux\n");
err = si476x_core_cmd_dig_audio_pin_cfg(core,
core->pinmux.dclk,
core->pinmux.dfs,
core->pinmux.dout,
core->pinmux.xout);
if (err < 0) {
dev_err(&core->client->dev,
"Faile... | false | false | false | false | false | 0 |
get_bool_option(int argc, char *argv[], char *option)
{
int i = 0, rv = 0;
for(i = 0; i < argc; i++) {
if(strcmp(argv[i], option) == 0) {
rv = 1;
goto DONE;
}
}
DONE:
return(rv);
} | false | false | false | false | false | 0 |
ringdiff(const Ring &r1, const Ring &r2, const BitGrid &mask) {
Mpoly mp1, mp2;
mp1.rings.push_back(r1);
mp2.rings.push_back(r2);
Bbox bb = box_union(r1.getBbox(), r2.getBbox());
//int min_x = (int)floor(bb.min_x);
int min_y = (int)floor(bb.min_y);
int max_x = (int)ceil (bb.max_x);
int max_y = (int)ceil (bb.ma... | false | false | false | false | false | 0 |
rd_iports(char *inam)
{
for (__cphdr = NULL;;)
{
/* read the cell-pin reference and one token past */
/* illegal forms caught during fix up */
if (!rd_cpin_conn()) goto bad_trynxt;
if (__toktyp == RPAR) break;
if (__toktyp == COMMA) { __get_vtok(); continue; }
__pv_ferr(1051,
"instance/gate %s... | false | false | false | false | false | 0 |
visit_reachable(PyObject *op, PyGC_Head *reachable)
{
if (PyObject_IS_GC(op)) {
PyGC_Head *gc = AS_GC(op);
const Py_ssize_t gc_refs = _PyGCHead_REFS(gc);
if (gc_refs == 0) {
/* This is in move_unreachable's 'young' list, but
* the traversal hasn't yet gotten to it. ... | false | false | false | false | false | 0 |
on_tooltip_show(int x, int y, bool key_mode, const Glib::RefPtr<Gtk::Tooltip>& tooltip)
{
Gtk::TreeModel::Path path;
Gtk::TreeViewColumn * column;
int cell_x, cell_y;
if (this->
get_path_at_pos(x, y, path, column, cell_x,
cell_y)) {
Gtk::TreeModel::iterator iter =
this->get_model()->get_iter(path);
if... | false | false | false | false | false | 0 |
globus_l_guc_print_url_line(
FILE * fp,
char * src_url,
char * dst_url,
globus_off_t offset,
globus_off_t length,
globus_l_guc_url_info_t * info,
cha... | false | false | false | false | false | 0 |
urfkill_wwan_state_changed_cb (NMUrfkillManager *mgr,
gboolean enabled,
gpointer user_data)
{
NMManager *self = NM_MANAGER (user_data);
NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (self);
GError *error = NULL;
manager_update_radio_enabled (self,
... | false | false | false | false | false | 0 |
glade_inspector_set_project (GladeInspector *inspector, GladeProject *project)
{
g_return_if_fail (GLADE_IS_INSPECTOR (inspector));
g_return_if_fail (GLADE_IS_PROJECT (project) || project == NULL);
GladeInspectorPrivate *priv = inspector->priv;
if(priv->project == project)
return;
if (inspector->priv->... | false | false | false | false | false | 0 |
generate_slow_canonicalize(int size,
char * name, int left, int scalarsetleft)
{
if (elementtype->issimple())
fprintf(codefile,
"\n"
" // canonicalize\n"
" temp = *this;\n"
" for (i=0; i<%d; i++)\n"
" for (j=0; j<%d; j++)\n"
... | false | false | false | false | false | 0 |
bvw_download_buffering_done (BaconVideoWidget *bvw)
{
/* When we set buffering left to 0, that means it's ready to play */
if (bvw->priv->buffering_left == 0) {
GST_DEBUG ("Buffering left is 0, so buffering done");
return TRUE;
}
if (bvw->priv->stream_length <= 0)
return FALSE;
/* When queue2 does... | false | false | false | false | false | 0 |
rdbuf_state(PLStream *pls)
{
U_CHAR op;
dbug_enter("rdbuf_state");
rd_data(pls, &op, sizeof(U_CHAR));
switch (op) {
case PLSTATE_WIDTH:{
U_CHAR width;
rd_data(pls, &width, sizeof(U_CHAR));
pls->width = width;
plP_state(PLSTATE_WIDTH);
break;
}
case PLSTATE_COLOR0:{
short icol0;
... | true | true | false | false | false | 1 |
write(const Value &root) {
document_ = "";
writeValue(root);
if (!omitEndingLineFeed_)
document_ += "\n";
return document_;
} | false | false | false | false | false | 0 |
sat_cfg_set_str (sat_cfg_str_e param, const gchar *value)
{
if (param < SAT_CFG_STR_NUM) {
if (config == NULL) {
sat_log_log (SAT_LOG_LEVEL_BUG,
_("%s: Module not initialised\n"),
__FUNCTION__);
}
else {
if (... | false | false | false | false | false | 0 |
v_bignum_add_digit(VBigDig *x, VBigDig y)
{
unsigned int i, s = *x++, t;
t = x[0] + y;
x[0] = t;
if(t > MAX_DIG)
{
for(i = 1; i < s; i++)
{
if(++x[i])
break;
}
}
} | false | false | false | false | false | 0 |
print_verifying(int cylinder, int head)
{
if (verbosity >= 5) {
printf("verifying cylinder %d head %d\n",
cylinder, head);
} else if (verbosity >= 3) {
printf("\r Verifying cylinder %2d, head %d ", cylinder, head);
fflush(stdout);
} else if (verbosity == 2) {
if (!verify_later && !dosverify) {
if (head... | false | false | false | false | false | 0 |
yy_include_push (char *file)
{
if (include_stack_ptr >= MAX_INCLUDE_DEPTH)
error (1, 0, _("too many includes"));
include_stack[include_stack_ptr] = YY_CURRENT_BUFFER;
lineno_stack[include_stack_ptr] = smaplineno;
filename_stack[include_stack_ptr++] = yyfilename;
message (msg_file, (stderr, "%s:%d: inclu... | false | false | false | false | false | 0 |
AddIpoptStrOption(IpoptProblem ipopt_problem, char* keyword, char* val)
{
std::string tag(keyword);
std::string value(val);
return (Bool) ipopt_problem->app->Options()->SetStringValue(tag, value);
} | false | false | false | false | false | 0 |
ntom_frameoff(mpg123_handle *fr, off_t soff)
{
off_t ioff = 0; /* frames or samples */
off_t ntm = ntom_val(fr,0);
#ifdef SAFE_NTOM
if(soff <= 0) return 0;
for(ioff=0; 1; ++ioff)
{
ntm += spf(fr)*fr->ntom_step;
if(ntm/NTOM_MUL > soff) break;
soff -= ntm/NTOM_MUL;
ntm -= (ntm/NTOM_MUL)*NTOM_MUL;
}
retur... | false | false | false | false | false | 0 |
string_gcd (s1, s2)
char *s1, *s2;
{
register int i;
if (s1 == NULL || s2 == NULL)
return (0);
for (i = 0; *s1 && *s2; ++s1, ++s2, ++i)
{
if (*s1 != *s2)
break;
}
return (i);
} | false | false | false | false | false | 0 |
read_message(dap_connection& c, bool block)
{
unsigned char type;
char *b;
dap_message *m = NULL;
if (!c.read_if_necessary(block))
return NULL;
b = c.getbytes(1);
if (!b) return NULL;
type = *b;
switch(type)
{
case CONFIG:
m = new dap_config_message();
break;
case ATT... | 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.