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 |
|---|---|---|---|---|---|---|
csbe_write_array_table_item_hook(cx, a)
csbe_context *cx;
Array_table *a;
{
if( (a->kind == MEM_CM && !opt_mpi_task_code) ||
(a->kind == MEM_OCSM && !opt_mpi_task_code) ||
(a->kind == MEM_LM && a->address_head != NULL && opt_cmp) ||
(a->kind == MEM_DSM && opt_cmp) )
{
re... | false | false | false | false | false | 0 |
tg3_nvram_write_block_using_eeprom(struct tg3 *tp,
u32 offset, u32 len, u8 *buf)
{
int i, j, rc = 0;
u32 val;
for (i = 0; i < len; i += 4) {
u32 addr;
__be32 data;
addr = offset + i;
memcpy(&data, buf + i, 4);
/*
* The SEEPROM interface expects the data to always be opposite
* the native ... | false | true | false | false | false | 1 |
LUKS_hdr_backup(
const char *backup_file,
const char *device,
struct luks_phdr *hdr,
struct crypt_device *ctx)
{
int r = 0, devfd = -1;
size_t buffer_size;
char *buffer = NULL;
struct stat st;
if(stat(backup_file, &st) == 0) {
log_err(ctx, _("Requested file %s already exist.\n"), backup_file);
return -EIN... | false | false | false | false | false | 0 |
runModal(XAP_Frame * pFrame)
{
// Build the dialog's window
m_windowMain = _constructWindow();
UT_return_if_fail(m_windowMain);
// Populate the window's data items
_populateWindowData();
switch ( abiRunModalDialog ( GTK_DIALOG(m_windowMain),
pFrame, this, CUSTOM_RESPONSE_INSERT, false ) )
{
case ... | false | false | false | false | false | 0 |
update(const std::string& messages) {
if (World::question() && messages.find(MESSAGE_WHAT_TO_WIELD) != std::string::npos) {
_sequence = 1;
} else if (_sequence == 1 || messages.find(WIELD_WEAPON_CURSED) != std::string::npos) {
/* also mark the inventory dirty when we do this */
Inventory::update();
_sequence ... | false | false | false | false | false | 0 |
siesta_phonon_cleanup(struct model_pak *model)
{
GSList *list;
struct core_pak *core;
g_assert(model != NULL);
for (list=model->cores ; list; list=g_slist_next(list))
{
core = list->data;
VEC3SET(core->offset, 0.0, 0.0, 0.0);
}
} | false | false | false | false | false | 0 |
publishFinished()
{
PEPPublishTask* task = (PEPPublishTask*) sender();
if (task->success()) {
emit publish_success(task->node(),task->item());
}
else {
qWarning(QString("[%3] PEP Publish failed: '%1' (%2)").arg(task->statusString()).arg(QString::number(task->statusCode())).arg(client_->jid().full()));
emit pu... | false | false | false | false | false | 0 |
chooseLevelSet()
{
// will delete itself on close
ChooseLevelSetDialog* dlg = new ChooseLevelSetDialog(this);
connect(dlg, SIGNAL(levelSetChanged(QString)), SLOT(changeLevelSet(QString)));
dlg->setCurrentLevelSet(m_gameWid->levelSet().name());
dlg->show();
} | false | false | false | false | false | 0 |
ECGroup_consGFp_mont(const mp_int *irr, const mp_int *curvea,
const mp_int *curveb, const mp_int *genx,
const mp_int *geny, const mp_int *order, int cofactor)
{
mp_err res = MP_OKAY;
ECGroup *group = NULL;
group = ECGroup_new();
if (group == NULL)
return NULL;
group->meth = GFMethod_consGFp_mont(ir... | false | false | false | false | false | 0 |
Mapper252_Init(CartInfo *info) {
info->Power = M252Power;
info->Close = M252Close;
MapIRQHook = M252IRQ;
CHRRAMSIZE = 2048;
CHRRAM = (uint8*)FCEU_gmalloc(CHRRAMSIZE);
SetupCartCHRMapping(0x10, CHRRAM, CHRRAMSIZE, 1);
AddExState(CHRRAM, CHRRAMSIZE, 0, "CRAM");
WRAMSIZE = 8192;
WRAM = (uint8*)FCEU_g... | false | false | false | false | false | 0 |
listpfdirs(struct stringvec *sv, const struct spptr *current_prin)
{
struct stringvec prins;
stringvec_init(&prins);
p_prins(&prins);
if (stringvec_count(prins) != 0) {
int cnt;
for (cnt = 0; cnt < stringvec_count(prins); cnt++)
listdir(sv, ptdir, stringvec_nth(prins, cnt), isform);
}
stringvec_free... | false | false | false | false | false | 0 |
xfs_reclaim_inodes_ag(
struct xfs_mount *mp,
int flags,
int *nr_to_scan)
{
struct xfs_perag *pag;
int error = 0;
int last_error = 0;
xfs_agnumber_t ag;
int trylock = flags & SYNC_TRYLOCK;
int skipped;
restart:
ag = 0;
skipped = 0;
while ((pag = xfs_perag_get_tag(mp, ag, XFS_ICI_RECLAIM_TAG))) ... | false | false | false | false | false | 0 |
print_cts_constraints(pe_working_set_t * data_set)
{
xmlNode *xml_obj = NULL;
xmlNode *lifetime = NULL;
xmlNode *cib_constraints = get_object_root(XML_CIB_TAG_CONSTRAINTS, data_set->input);
for (xml_obj = __xml_first_child(cib_constraints); xml_obj != NULL;
xml_obj = __xml_next(xml_obj)) {
... | false | false | false | false | false | 0 |
bnx2x_tx_int(struct bnx2x *bp, struct bnx2x_fp_txdata *txdata)
{
struct netdev_queue *txq;
u16 hw_cons, sw_cons, bd_cons = txdata->tx_bd_cons;
unsigned int pkts_compl = 0, bytes_compl = 0;
#ifdef BNX2X_STOP_ON_ERROR
if (unlikely(bp->panic))
return -1;
#endif
txq = netdev_get_tx_queue(bp->dev, txdata->txq_index... | false | false | false | false | false | 0 |
load_from_outline(Outline *outline)
{
if (!outline) {
return 0;
}
GooList *items = outline->getItems();
if (!items || items->getLength() < 1) {
return 0;
}
toc *newtoc = new toc();
newtoc->d->root.d->is_open = true;
newtoc->d->root.d->load_children(items);
return n... | false | false | false | false | false | 0 |
soap_getindependent(struct soap *soap)
{
int t;
if (soap->version == 1)
{ for (;;)
{ if (!soap_getelement(soap, &t))
if (soap->error || soap_ignore_element(soap))
break;
}
}
if (soap->error == SOAP_NO_TAG || soap->error == SOAP_EOF)
soap->error = SOAP_OK;
return soap->error;
} | false | false | false | false | false | 0 |
grabkeys(void) {
updatenumlockmask();
{
unsigned int i, j;
unsigned int modifiers[] = { 0, LockMask, numlockmask, numlockmask|LockMask };
KeyCode code;
XUngrabKey(dpy, AnyKey, AnyModifier, root);
for(i = 0; i < LENGTH(keys); i++) {
if((code = XKeysymToKeycode(dpy, keys[i].keysym)))
for(j = 0; j < LE... | false | false | false | false | false | 0 |
loadFromConfigFile(
const mrpt::utils::CConfigFileBase &iniFile,
const std::string §ion)
{
MRPT_LOAD_CONFIG_VAR(mapAltitude,float, iniFile, section );
MRPT_LOAD_CONFIG_VAR(maxDistanceInsertion,float, iniFile, section );
MRPT_LOAD_CONFIG_VAR(maxOccupancyUpdateCertainty,float, iniFile, section );
M... | false | false | false | false | false | 0 |
set_contours_values(gint N,gdouble* cvalues,gint ii0,gint ii1,gint inumPlane,gdouble igap)
{
if(values) g_free(values);
values = cvalues;
numberOfContours = N;
i0Contours = ii0;
i1Contours = ii1;
numPlaneContours = inumPlane;
gapContours = igap;
if(values)
{
newContours = TRUE;
nPlanesContours++;
if(!con... | false | false | false | false | false | 0 |
sgen_init_internal_allocator (void)
{
int i, size;
for (i = 0; i < INTERNAL_MEM_MAX; ++i)
fixed_type_allocator_indexes [i] = -1;
for (i = 0; i < NUM_ALLOCATORS; ++i) {
allocator_block_sizes [i] = block_size (allocator_sizes [i]);
mono_lock_free_allocator_init_size_class (&size_classes [i], allocator_sizes [i... | false | false | false | false | false | 0 |
dlm_hb_node_up_cb(struct o2nm_node *node, int idx, void *data)
{
struct dlm_ctxt *dlm = data;
if (!dlm_grab(dlm))
return;
spin_lock(&dlm->spinlock);
set_bit(idx, dlm->live_nodes_map);
/* do NOT notify mle attached to the heartbeat events.
* new nodes are not interesting in mastery until joined. */
spin_unlo... | false | false | false | false | false | 0 |
__ldexpf(float value, int exp)
{
if(!__finitef(value)||value==(float)0.0) return value;
value = __scalbnf(value,exp);
if(!__finitef(value)||value==(float)0.0) __set_errno (ERANGE);
return value;
} | false | false | false | false | false | 0 |
lpfc_init_iocb_list(struct lpfc_hba *phba, int iocb_count)
{
struct lpfc_iocbq *iocbq_entry = NULL;
uint16_t iotag;
int i;
/* Initialize and populate the iocb list per host. */
INIT_LIST_HEAD(&phba->lpfc_iocb_list);
for (i = 0; i < iocb_count; i++) {
iocbq_entry = kzalloc(sizeof(struct lpfc_iocbq), GFP_KERNEL... | false | false | false | false | false | 0 |
readback_attributes( FL_OBJECT * obj )
{
int spstyle;
char name[ 128],
cbname[ 128 ];
char tmpbuf[ 128 ];
obj->boxtype = fl_get_choice( fd_generic_attrib->boxobj ) - 1;
/* Label style consists of two parts */
obj->lstyle = fl_get_choice( fd_generic_attrib->fontobj ) - 1;
spstyle ... | false | false | false | false | false | 0 |
notify(Sea::Player player, const Coord& c, const HitInfo& info)
{
foreach (Entity* entity, m_entities) {
entity->notify(player, c, info);
if (player == entity->player()) {
entity->stats()->addInfo(info);
}
}
} | false | false | false | false | false | 0 |
WriteStr(ostream & out,char * str)
{
int i=0;
char c;
out << '"' ;
while (i++,c=*str++) {
if (i==70)
cout << " //\n",i=0;
if (c == '"') out << "\"\"" ;
else out << c ;}
out << '"' ;
} | false | false | false | false | false | 0 |
npw_run_action (NPWInstall* this)
{
gchar *msg;
NPWAction *action = (NPWAction *)this->action->data;
if (this->launcher == NULL)
{
this->launcher = anjuta_launcher_new ();
}
g_signal_connect (G_OBJECT (this->launcher), "child-exited", G_CALLBACK (on_run_terminated), this);
/* The %s is a name of a unix comman... | false | false | false | false | false | 0 |
AM_updateLightLev(void)
{
static int nexttic = 0;
//static int litelevels[] = { 0, 3, 5, 6, 6, 7, 7, 7 };
static int litelevels[] = { 0, 4, 7, 10, 12, 14, 15, 15 };
static int litelevelscnt = 0;
// Change light level
if (amclock>nexttic)
{
lightlev = litelevels[litelevelscnt++];
if (li... | false | false | false | false | false | 0 |
CompileRegExpToAST(JSContext* cx, JSTokenStream* ts,
JSString* str, uintN flags, CompilerState& state)
{
uintN i;
size_t len;
len = str->length();
state.context = cx;
state.tokenStream = ts;
state.cp = js_UndependString(cx, str);
if (!state.cp)
return JS_FALSE;
... | false | false | false | false | false | 0 |
ReadNasaThermo()
{
//Do all NasaThermo data here
OBNasaThermoData* pTD = new OBNasaThermoData;
pTD->SetOrigin(fileformatInput);
_pmol->SetData(pTD);
for(;;)
{
xmlTextReaderRead(reader());
int typ = xmlTextReaderNodeType(reader());
if(typ==XML_READER_TYPE_SIGNIFICANT_W... | false | false | false | false | false | 0 |
log_method(ts_ur_super_session* ss, const char *method, int err_code, const u08bits *reason)
{
if(ss) {
if(!method) method = "unknown";
if(!err_code) {
if(ss->origin[0]) {
TURN_LOG_FUNC(TURN_LOG_LEVEL_INFO,
"session %018llu: origin <%s> realm <%s> user <%s>: incoming packet %s processed, success\n... | false | false | false | false | false | 0 |
cx_tree_count(const cx_tree *tree, cxcptr key)
{
cx_tnode *x, *y;
cxsize count = 0;
cx_assert(tree != NULL);
cx_assert(key != NULL);
x = _cx_tree_lower_bound(tree, key);
y = _cx_tree_upper_bound(tree, key);
/*
* Only if key is not present in the tree x and y are identical,
* p... | false | false | false | false | false | 0 |
slot_show_tree()
{
#ifdef _DEBUG
std::cout << "SelectListDialog::slot_show_tree\n";
#endif
if( m_bt_show_tree.get_active() ){
if( ! m_selectview ) m_selectview = dynamic_cast< SelectListView* > ( Gtk::manage( CORE::ViewFactory( CORE::VIEW_SELECTLIST, get_url() ) ) );
if( m_selectview ){
... | false | false | false | false | false | 0 |
emoticon_add(const char *name, const char *value) {
emoticon_t *e, *el;
if (!name || !value)
return -1;
for (el = emoticons; el; el = el->next) {
e = el;
if (!xstrcasecmp(name, e->name)) {
xfree(e->value);
e->value = xstrdup(value);
return 0;
}
}
e = xmalloc(sizeof(emoticon_t));
e->name = xstrd... | false | false | false | false | false | 0 |
gth_tags_file_to_file (GthTagsFile *tags,
GFile *file,
GError **error)
{
char *data;
GError *data_error, *write_error;
gsize len;
gboolean retval;
g_return_val_if_fail (tags != NULL, FALSE);
g_return_val_if_fail (file != NULL, FALSE);
data_e... | false | false | false | false | false | 0 |
cbf_get_integerarrayparameters_wdims (cbf_handle handle,
unsigned int *compression,
int *id,
size_t *elsize,
int *elsigned,
... | false | false | false | false | false | 0 |
main (argc, argv)
int argc; /* Argument count */
char * argv[]; /* Argument vector */
{
int c; /* Next character read from stdin */
/*
* Since the deformatter needs to produce exactly one character
* of output for each character of input, we need to preserve
* the end-of-line fo... | false | false | false | false | false | 0 |
ceph_fscache_unregister_fs(struct ceph_fs_client* fsc)
{
if (fsc->revalidate_wq)
destroy_workqueue(fsc->revalidate_wq);
fscache_relinquish_cookie(fsc->fscache, 0);
fsc->fscache = NULL;
} | false | false | false | false | false | 0 |
new_node(
simplat *s,
int *x, /* Index */
int hash /* Hash */
) {
int di = s->di;
int b = 0; /* NZ if a boundary point */
int nn; /* New node index */
int hp; /* Hash chain index */
int i, j;
/* Make room for it */
if ((s->np+1) >= s->np_a) {
s->np_a *= 2;
if ((s->nodes = (sptnode *)realloc(s-... | false | false | false | false | false | 0 |
plain_groups_for_user(apr_pool_t *p, char *user, char *grpfile)
{
ap_configfile_t *f;
apr_table_t *grps = apr_table_make(p, 15);
apr_pool_t *sp;
char l[MAX_STRING_LEN];
const char *group_name, *ll, *w;
apr_status_t status;
if ((status = ap_pcfg_openfile(&f, p, grpfile)) != APR_SUCCESS) {
/*... | false | false | false | false | false | 0 |
splcurve_yval(spldat *sd, int spc, double xval)
{
int ii;
double x1, x2, y1, y2, y3;
if (xval <= 0) return sd->yval[spc][0];
if (xval >= 0.999) return sd->yval[spc][999];
x2 = 1000.0 * xval;
ii = x2;
x1 = ii;
y1 = sd->yval[spc][ii];
y2 = sd->yval[spc][ii+1];
y3 = y1 + (y2 - ... | false | false | false | false | false | 0 |
result(int i)
{
if (i >= (signed) results.size() || i < 0) { // reality check
return ""; // maybe exception?
}
return results[i];
} | false | false | false | false | false | 0 |
option_changed(struct option *poption)
{
fc_assert_ret(NULL != poption);
if (!options_fully_initialized) {
/* Prevent to use non-initialized datas. */
return;
}
if (poption->changed_callback) {
poption->changed_callback(poption);
}
option_gui_update(poption);
} | false | false | false | false | false | 0 |
pnp_printf(pnp_info_buffer_t * buffer, char *fmt, ...)
{
va_list args;
int res;
if (buffer->stop || buffer->error)
return 0;
va_start(args, fmt);
res = vsnprintf(buffer->curr, buffer->len - buffer->size, fmt, args);
va_end(args);
if (buffer->size + res >= buffer->len) {
buffer->stop = 1;
return 0;
}
buf... | false | false | false | false | true | 1 |
caldav_server_download_attachment (ECalBackendCalDAV *cbdav,
const gchar *attachment_uri,
gchar **content,
gsize *len,
GError **error)
{
SoupMessage *message;
g_return_val_if_fa... | false | false | false | false | false | 0 |
sun4i_codec_create_card(struct device *dev)
{
struct snd_soc_card *card;
card = devm_kzalloc(dev, sizeof(*card), GFP_KERNEL);
if (!card)
return ERR_PTR(-ENOMEM);
card->dai_link = sun4i_codec_create_link(dev, &card->num_links);
if (!card->dai_link)
return ERR_PTR(-ENOMEM);
card->dev = dev;
card->name = "... | false | false | false | false | false | 0 |
hbfile_sanity_check(void)
{
GList *list;
DB( g_print("\n[hbfile] sanity_check\n") );
list = g_list_first(GLOBALS->ope_list);
while (list != NULL)
{
Transaction *entry = list->data;
da_transaction_consistency(entry);
list = g_list_next(list);
}
list = g_list_first(GLOBALS->arc_list);
while (list != NUL... | false | false | false | false | false | 0 |
main(int argc, char ** argv) {
Fl_Window *window = new Fl_Window(320,130);
Fl_Button *b = new Fl_Button(10, 10, 130, 30, "Fl_Button");
b->tooltip("This is a Tooltip.");
new Fl_Return_Button(150, 10, 160, 30, "Fl_Return_Button");
new Fl_Repeat_Button(10,50,130,30,"Fl_Repeat_Button");
new Fl_Light_Button(10,9... | false | false | false | false | false | 0 |
GetRootName(const std::string & filename)
{
const std::string fileExt = GetExtension(filename);
// Create a base filename
// i.e Image.hdr --> Image
if ( fileExt.length() > 0 //Ensure that an extension was
// found
&& filename.length() > ... | false | false | false | false | false | 0 |
get_equalprg()
{
if (*curbuf->b_p_ep == NUL)
return p_ep;
return curbuf->b_p_ep;
} | false | false | false | false | false | 0 |
odf_func_r_dchisq_handler (GnmConventionsOut *out, GnmExprFunction const *func)
{
if (func->argc == 2) {
GString *target = out->accum;
GnmExprConstPtr const *ptr = func->argv;
g_string_append (target, "CHISQDIST(");
gnm_expr_as_gstring (ptr[0], out);
g_string_append_c (out->accum, ';');
gnm_expr_as_gstring... | false | false | false | false | false | 0 |
setIlluminationValue(const double value)
{
int status = DiDisplayFunction::setIlluminationValue(value);
if (status && ((DeviceType == EDT_Printer) || (DeviceType == EDT_Scanner)))
Valid = calculateJNDBoundaries(); // check validity
return status;
} | false | false | false | false | false | 0 |
SetRemoteContent_w(const MediaContentDescription* content,
ContentAction action) {
ASSERT(worker_thread() == talk_base::Thread::Current());
LOG(LS_INFO) << "Setting remote video description";
const VideoContentDescription* video =
static_cast<const VideoContentDescript... | false | false | false | false | false | 0 |
write_font_resources(gx_device_pdf *pdev, pdf_resource_list_t *prlist)
{
int j;
pdf_resource_t *pres;
for (j = 0; j < NUM_RESOURCE_CHAINS; ++j)
for (pres = prlist->chains[j]; pres != 0; pres = pres->next) {
pdf_font_resource_t *const pdfont = (pdf_font_resource_t *)pres;
if... | false | false | false | false | false | 0 |
resurrectBonusTaken()
{
for(int i = 0; i < m_players.length(); i++)
{
if(!(m_players[i]->isAlive()))
{
m_players[i]->resurrect();
}
}
} | false | false | false | false | false | 0 |
nrrdResampleSamplesSet(NrrdResampleContext *rsmc,
unsigned int axIdx,
size_t samples) {
static const char me[]="nrrdResampleSamplesSet";
PER_AXIS_ERROR_CHECK;
if (rsmc->axis[axIdx].samples != samples) {
if (rsmc->verbose) {
fprintf(stderr, "%s: axis %u sam... | false | false | false | false | false | 0 |
check(int argc, const char* const argv[])
{
CppCheck cppCheck(*this);
if (!parseFromArgs(&cppCheck, argc, argv))
{
return EXIT_FAILURE;
}
if (cppCheck.settings().reportProgress)
time1 = std::time(0);
_settings = cppCheck.settings();
if (_settings._xml)
{
reportE... | false | false | false | false | false | 0 |
print_plugin_info (void)
{
GList *l;
if (elements) {
g_print ("gstreamer:Elements=");
for (l = elements; l; l = l->next) {
if (l->next)
g_print ("%s, ", (gchar *) l->data);
else
g_print ("%s\n", (gchar *) l->data);
}
}
if (provides) {
g_print ("gstreamer:Provides=")... | false | false | false | false | false | 0 |
Fd_Tell_Interv_Interv(WamWord *fdv_adr, int min, int max)
{
int nb_elem;
int propag;
int min1, max1;
min1 = Min(fdv_adr);
max1 = Max(fdv_adr);
min = math_max(min, min1);
max = math_min(max, max1);
if (min > max) /* detects also if the initial */
return FALSE; /* interval (min, max) was empty... | false | false | false | false | false | 0 |
fdisk_table_is_empty(struct fdisk_table *tb)
{
return tb == NULL || list_empty(&tb->parts) ? 1 : 0;
} | false | false | false | false | false | 0 |
clear_entry()
{
if(0 != entry_.entry) {
free(entry_.entry);
entry_.entry = 0;
entry_.length = 0;
}
} | false | false | false | false | false | 0 |
get_if_list()
{
std::ifstream proc_net_dev(proc::NET_DEV);
std::list<std::string> ret;
// skip the first 2 lines
//
proc_net_dev >> more::ignore_line >> more::ignore_line;
more::string_token if_name(":");
while (proc_net_dev >> if_name)
{
... | false | false | false | false | false | 0 |
ath6kl_commit_ch_switch(struct ath6kl_vif *vif, u16 channel)
{
struct ath6kl *ar = vif->ar;
vif->profile.ch = cpu_to_le16(channel);
switch (vif->nw_type) {
case AP_NETWORK:
/*
* reconfigure any saved RSN IE capabilites in the beacon /
* probe response to stay in sync with the supplicant.
*/
if (vif->... | false | false | false | false | false | 0 |
TimecodeComposer( const QString & name )
: m_name( name )
{
} | false | false | false | false | false | 0 |
fm10k_features_check(struct sk_buff *skb,
struct net_device *dev,
netdev_features_t features)
{
if (!skb->encapsulation || fm10k_tx_encap_offload(skb))
return features;
return features & ~(NETIF_F_ALL_CSUM | NETIF_F_GSO_MASK);
} | false | false | false | false | false | 0 |
fork_binh(hfsfile *ofile, unsigned long size)
{
char buf[HFS_BLOCKSZ * 4];
long chunk, bytes;
while (size)
{
chunk = (size > sizeof(buf)) ? sizeof(buf) : size;
bytes = bh_read(buf, chunk);
if (bytes == -1)
{
ERROR(errno, bh_error);
return -1;
}
else if (bytes != chunk)
{
... | false | false | false | false | false | 0 |
toLong(long n) const
{
return value_.get() == 0 ? -1 : value_->toLong(n);
} | false | false | false | false | false | 0 |
c67x00_fill_frame(struct c67x00_hcd *c67x00)
{
struct c67x00_td *td, *ttd;
/* Check if we can proceed */
if (!list_empty(&c67x00->td_list)) {
dev_warn(c67x00_hcd_dev(c67x00),
"TD list not empty! This should not happen!\n");
list_for_each_entry_safe(td, ttd, &c67x00->td_list, td_list) {
dbg_td(c67x00, td,... | false | false | false | false | false | 0 |
free_rdg_components (vec<rdgc> components)
{
int i;
rdgc x;
FOR_EACH_VEC_ELT (components, i, x)
{
x->vertices.release ();
free (x);
}
components.release ();
} | false | false | false | false | false | 0 |
stb_vorbis_stream_length_in_samples(stb_vorbis *f)
{
unsigned int restore_offset, previous_safe;
unsigned int end, last_page_loc;
if (IS_PUSH_MODE(f)) return error(f, VORBIS_invalid_api_mixing);
if (!f->total_samples) {
int last;
uint32 lo,hi;
char header[6];
// first, s... | false | false | false | false | false | 0 |
checkExecutionPrecondition() const
{
if ( getMap()->getCurrentPlayer().diplomacy.isAllied( getContainer() ))
return ActionResult(0);
else
return ActionResult(101);
} | false | false | false | false | false | 0 |
last_boss_horizon_circle_sights(double *result,
const double *v1, const double *v2)
{
double dot;
double length;
double c;
double o_x = (double) (WINDOW_WIDTH / 2);
double o_y = (double) (WINDOW_HEIGHT / 4);
/* sanity check */
if (result == NULL)
{
fprintf(stderr, "la... | false | false | false | false | false | 0 |
EvaluateInflation(double point[3])
{
if (this->InflationImage == NULL) {
return 1.0;
}
int ijk[3];
double pcoords[3];
double weights[8];
int inBounds;
int i;
double inflation = 0.0;
inBounds = this->InflationImage->ComputeStructuredCoordinates(point,ijk,pcoords);
if (!inBounds)
// if (!inBo... | false | false | false | false | false | 0 |
snic_wq_cmpl_handler(struct snic *snic, int work_to_do)
{
unsigned int work_done = 0;
unsigned int i;
snic->s_stats.misc.last_ack_time = jiffies;
for (i = 0; i < snic->wq_count; i++) {
work_done += svnic_cq_service(&snic->cq[i],
work_to_do,
snic_wq_cmpl_handler_cont,
NULL);
}
... | false | false | false | false | false | 0 |
generic_file_llseek_size(struct file *file, loff_t offset, int whence,
loff_t maxsize, loff_t eof)
{
switch (whence) {
case SEEK_END:
offset += eof;
break;
case SEEK_CUR:
/*
* Here we special-case the lseek(fd, 0, SEEK_CUR)
* position-querying operation. Avoid rewriting the "same"
* f_pos value bac... | false | false | false | false | false | 0 |
ff_h264_decode_rbsp_trailing(H264Context *h, const uint8_t *src){
int v= *src;
int r;
tprintf(h->s.avctx, "rbsp trailing %X\n", v);
for(r=1; r<9; r++){
if(v&1) return r;
v>>=1;
}
return 0;
} | false | false | false | false | false | 0 |
_soap_env_xml_io_read(void *ctx, char *buffer, int len)
{
int readed;
http_input_stream_t *in = (http_input_stream_t *) ctx;
if (!http_input_stream_is_ready(in))
return 0;
readed = http_input_stream_read(in, buffer, len);
if (readed == -1)
return 0;
return readed;
} | false | false | false | false | false | 0 |
ibnd_load_fabric(const char *file, unsigned int flags)
{
unsigned int node_count = 0;
unsigned int port_count = 0;
ibnd_fabric_cache_t *fabric_cache = NULL;
ibnd_fabric_t *fabric = NULL;
ibnd_node_cache_t *node_cache = NULL;
int fd = -1;
unsigned int i;
if (!file) {
IBND_DEBUG("file parameter NULL\n");
ret... | false | false | false | false | false | 0 |
parse(char * buffer, char ** cmd)
{
int i; /* Buffer */
int j; /* Word */
int k; /* Letter of word */
/* Freeing last cmd */
for (i=0; cmd[i] != NULL; i++)
{
free(cmd[i]);
cmd[i] = NULL;
}
/* Allocatin' place for the first word */
cmd[0] = malloc(BUFFERSIZE * sizeof(char));
/* Cleaning word */
... | false | false | false | false | false | 0 |
ario_shell_cmd_about (GtkAction *action,
ArioShell *shell)
{
ARIO_LOG_FUNCTION_START;
/* Create about dialog window */
const char *authors[] = {
#include "AUTHORS.tab"
"",
NULL
};
const char *artists[] = {
"Lu... | false | false | false | false | false | 0 |
handle_typeahead (saver_info *si)
{
passwd_dialog_data *pw = si->pw_data;
int i;
if (!si->unlock_typeahead)
return;
pw->passwd_changed_p = True;
i = strlen (si->unlock_typeahead);
if (i >= sizeof(pw->typed_passwd) - 1)
i = sizeof(pw->typed_passwd) - 1;
memcpy (pw->typed_passwd, si->unlock_typea... | false | false | false | false | false | 0 |
dvbdmx_allocate_ts_feed(struct dmx_demux *dmx,
struct dmx_ts_feed **ts_feed,
dmx_ts_cb callback)
{
struct dvb_demux *demux = (struct dvb_demux *)dmx;
struct dvb_demux_feed *feed;
if (mutex_lock_interruptible(&demux->mutex))
return -ERESTARTSYS;
if (!(feed = dvb_dmx_feed_alloc(demux))) {
mutex_un... | false | false | false | false | false | 0 |
free_schedulelist(void)
{
SCHEDULEITEM *s1 = TAILQ_FIRST(&schedule);
SCHEDULEITEM *s2;
while (s1) {
s2 = TAILQ_NEXT(s1, entries);
free(s1);
s1 = s2;
}
TAILQ_INIT(&schedule);
} | false | false | false | false | false | 0 |
getLastLineInColumn(fp_Column * pCol)
{
fp_TableContainer * pTab = NULL;
fp_TableContainer * pBroke = NULL;
fp_CellContainer * pCell = NULL;
if(!isThisBroken())
{
pTab = this;
}
else
{
pBroke = this;
pTab = getMasterTable();
}
UT_return_val_if_fail(pTab,NULL);
if(pTab->countCons() == 0)
{
return NUL... | false | false | false | false | false | 0 |
xml_write_name (GnmOutputXML *state, GnmNamedExpr *nexpr)
{
char *expr_str;
g_return_if_fail (nexpr != NULL);
gsf_xml_out_start_element (state->output, GNM "Name");
gsf_xml_out_simple_element (state->output, GNM "name",
expr_name_name (nexpr));
expr_str = expr_name_as_string (nexpr, NULL, state->convs);
... | false | false | false | false | false | 0 |
SelectConstantFP(SDNode *N) {
SDLoc dl(N);
ConstantFPSDNode *CN = dyn_cast<ConstantFPSDNode>(N);
APFloat APF = CN->getValueAPF();
if (N->getValueType(0) == MVT::f32) {
return CurDAG->getMachineNode(Hexagon::TFRI_f, dl, MVT::f32,
CurDAG->getTargetConstantFP(APF.convertToFloat(), dl, MVT::f32));... | false | false | false | false | false | 0 |
SNAT_print(const void *ip, const struct xt_entry_target *target,
int numeric)
{
const struct ipt_natinfo *info = (const void *)target;
unsigned int i = 0;
printf(" to:");
for (i = 0; i < info->mr.rangesize; i++) {
print_range(&info->mr.range[i]);
if (info->mr.range[i].flags & IP_NAT_RANG... | false | false | false | false | false | 0 |
has_more_commands()
{
int i = 0;
while(isprint(*(current_command+i))) { ++i; }
if(*(current_command+i) == '\0') { return 0; }
if(isspace(*(current_command+i)))
{
do {
++i;
} while (isspace(*(current_command+i)));
if(*(current_command+i) == '\0') { return 0; }
}
return 1;
} | false | false | false | false | false | 0 |
gs_parse_file_name(gs_parsed_file_name_t * pfn, const char *pname, uint len,
const gs_memory_t *memory)
{
uint dlen;
const char *pdelim;
gx_io_device *iodev;
if (len == 0)
return_error(gs_error_undefinedfilename); /* null name not allowed */
if (pname[0] != '%') { /* no d... | false | false | false | false | false | 0 |
ibus_registry_deserialize (IBusRegistry *registry,
GVariant *variant)
{
GVariant *var;
GVariantIter *iter;
gint retval;
retval = IBUS_SERIALIZABLE_CLASS (ibus_registry_parent_class)->
deserialize ((IBusSerializable *)registry, variant);
g_return_val_if_fail (r... | false | false | false | false | false | 0 |
getHeight(float x, float y, float z, float maxSearchDist, uint32 phasemask) const
{
Vector3 v(x, y, z);
G3D::Ray r(v, Vector3(0, 0, -1));
DynamicTreeIntersectionCallback callback(phasemask);
impl.intersectZAllignedRay(r, callback, maxSearchDist);
if (callback.didHit())
return v.z - maxSearc... | false | false | false | false | false | 0 |
qof_object_is_choice(QofIdTypeConst type)
{
gpointer value = NULL;
if (!qof_choice_is_initialized())
{
return FALSE;
}
g_return_val_if_fail(type != NULL, FALSE);
value = g_hash_table_lookup(qof_choice_table, type);
if ((GHashTable*)value)
{
return TRUE;
}
DEBUG (... | false | false | false | false | false | 0 |
read_attributes(FILE *in)
{
long marker;
int count;
int len = 0;
int l;
marker = ftell(in);
for (count = 0; count < attributes_count; count++)
{
//attributes[count] = ftell(in) - marker;
attributes[count] = len;
fseek(in, 2, SEEK_CUR);
l=read_int32(in);
fseek(in, l, SEEK_CUR);
len += siz... | false | false | false | false | true | 1 |
search_files_present (SearchFiles* sf)
{
g_return_if_fail (sf != NULL && SEARCH_IS_FILES(sf));
gtk_entry_set_text (GTK_ENTRY (sf->priv->search_entry),
search_box_get_search_string(sf->priv->search_box));
gtk_entry_set_text (GTK_ENTRY (sf->priv->replace_entry),
search_box_ge... | false | false | false | false | false | 0 |
check_posix_syntax(const uschar *ptr, const uschar **endptr)
{
int terminator; /* Don't combine these lines; the Solaris cc */
terminator = *(++ptr); /* compiler warns about "non-constant" initializer. */
for (++ptr; *ptr != 0; ptr++)
{
if (*ptr == CHAR_BACKSLASH && ptr[1] == CHAR_RIGHT_SQUARE_BRACKET) p... | false | false | false | false | false | 0 |
GetPlusMinusVertex( BN_STRUCT *pBNS, ALL_TC_GROUPS *pTCGroups, int bCheckForbiddenPlus, int bCheckForbiddenMinus )
{
int k, ePlusSuper, eMinusSuper, vPlusSuper, vMinusSuper, vPlusMinus1 = NO_VERTEX, vPlusMinus2 = NO_VERTEX;
BNS_EDGE *pEdge;
if ( (k = pTCGroups->nGroup[TCG_Plus]) >= 0 &&
(e... | false | false | false | false | false | 0 |
dump_regmap() {
sblog << "# REGMAP :\n";
for(rv_map::iterator I = regmap.begin(), E = regmap.end(); I != E; ++I) {
sblog << " # " << I->first << " => " << *(I->second) << "\n";
}
if (alu.current_ar)
sblog << " current_AR: " << *alu.current_ar << "\n";
if (alu.current_pr)
sblog << " current_PR: " <<... | false | false | false | false | false | 0 |
snd_cmipci_spdif_stream_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
struct cmipci *chip = snd_kcontrol_chip(kcontrol);
int i;
spin_lock_irq(&chip->reg_lock);
for (i = 0; i < 4; i++)
ucontrol->value.iec958.status[i] = (chip->dig_pcm_status >> (i * 8)) & 0xff;
spin_unlock_... | false | false | false | false | false | 0 |
ptraCompactArray(PTRA *pa)
{
l_int32 i, n, nactual, index;
PROCNAME("ptraCompactArray");
if (!pa)
return ERROR_INT("pa not defined", procName, 1);
ptraGetMaxIndex(pa, &n);
ptraGetActualCount(pa, &nactual);
if (n == nactual) return 0;
/* Compact the array */
for (i = 0, index... | false | false | false | false | false | 0 |
categ_drag_data_get ( GtkTreeDragSource * drag_source, GtkTreePath * path,
GtkSelectionData * selection_data )
{
if ( path )
{
gtk_tree_set_row_drag_data (selection_data,
GTK_TREE_MODEL(categ_tree_model), path);
}
return FALSE;
} | 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.