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 |
|---|---|---|---|---|---|---|
check_possibility_to_move_trans_group(List **bus,
TG *target,
int bus_no)
{
int srcpe;
int dstpe;
real start;
real cost;
real diff; /* We really need it? */
TransType type;
TE *ept;
if (hetero_ignore_mem_port_fl... | false | false | false | false | false | 0 |
cryptui_keyset_keys_raw_keyids (CryptUIKeyset *keyset, const gchar **keys)
{
guint nkeys;
const gchar **k;
gchar **ids;
int i;
/* TODO: This could get inefficient */
for (k = keys, nkeys = 0; *k; k++)
nkeys++;
ids = g_new0 (gchar*, nkeys + 1);
for (k = keys, i = 0; *k; ... | false | false | false | false | false | 0 |
getSubstitutionCorrection(GfxFont *gfxFont)
{
double w1, w2;
CharCode code;
char *name;
// for substituted fonts: adjust the font matrix -- compare the
// width of 'm' in the original font and the substituted font
if (isSubstitute() && !gfxFont->isCIDFont()) {
for (code = 0; code < 256; ++code) {
... | false | false | false | false | false | 0 |
xenvif_dealloc_kthread_should_stop(struct xenvif_queue *queue)
{
/* Dealloc thread must remain running until all inflight
* packets complete.
*/
return kthread_should_stop() &&
!atomic_read(&queue->inflight_packets);
} | false | false | false | false | false | 0 |
getPceRepetitionRate(
const int channelConfig,
const TRANSPORT_TYPE transportFmt,
const int headerPeriod,
const int matrixMixdownA
)
{
INT pceFrameCounter = -1; /* variable to be returned */
if (headerPeriod>0) {
switch ( channelConfig ) ... | false | false | false | false | false | 0 |
calc_color_at (ArtGradientStop *stops,
int n_stops,
ArtGradientSpread spread,
double offset,
double offset_fraction,
int favor_start,
int ix,
art_u8 *color)
{
double off0, off1;
int j;
if (spread == ART_GRADIENT_PAD)
{
if (offset < 0.0)
{
co... | false | false | false | false | false | 0 |
multiPlayerDialog(PG_MessageObject* c) {
MultiPlayerDialog spd(c);
spd.Show();
spd.RunModal();
} | false | false | false | false | false | 0 |
close_processing_window( GtkWidget *widget, gpointer data )
{
g_return_val_if_fail(data != NULL, TRUE);
// gtk_object_set_data(GTK_OBJECT(data), "processing", NULL);
gtk_widget_hide(widget);
return TRUE;
} | false | false | false | false | false | 0 |
free_queue(struct fs_dev *dev, struct queue *txq)
{
func_enter ();
write_fs (dev, Q_SA(txq->offset), 0);
write_fs (dev, Q_EA(txq->offset), 0);
write_fs (dev, Q_RP(txq->offset), 0);
write_fs (dev, Q_WP(txq->offset), 0);
/* Configuration ? */
fs_dprintk (FS_DEBUG_ALLOC, "Free queue: %p\n", txq->sa);
kfree (txq-... | false | false | false | false | false | 0 |
dq_alive(struct nid qid)
{
dquery_t *dq;
/* NOTE: dqueries might have been freed already, as dq_pmsg_free()
* might still call this function after dq_close().
*/
dq = dqueries ? hevset_lookup(dqueries, &qid) : NULL;
if (dq) {
dquery_check(dq);
}
return dq;
} | false | false | false | false | false | 0 |
addCreatedResource(ResourcePtr& res, ResourceGroup& grp)
{
OGRE_LOCK_MUTEX(grp.OGRE_AUTO_MUTEX_NAME);
Real order = res->getCreator()->getLoadingOrder();
ResourceGroup::LoadResourceOrderMap::iterator i = grp.loadResourceOrderMap.find(order);
LoadUnloadResourceList* loadList;
... | false | false | false | false | false | 0 |
loadConfig_sensorSpecific(
const mrpt::utils::CConfigFileBase & configSource,
const std::string & iniSection )
{
m_sensorPose.setFromValues (
configSource.read_float( iniSection, "pose_x", 0, false ),
configSource.read_float( iniSection, "pose_y", 0, false ),
configSource.read_float( iniS... | false | false | false | false | false | 0 |
rv740_get_dll_speed(bool is_gddr5, u32 memory_clock)
{
int i;
u32 factor;
u16 data_rate;
if (is_gddr5)
factor = 4;
else
factor = 2;
data_rate = (u16)(memory_clock * factor / 1000);
if (data_rate < dll_speed_table[0].max) {
for (i = 0; i < 16; i++) {
if (data_rate > dll_speed_table[i].min &&
da... | false | false | false | false | false | 0 |
replace_storage_mmap(int fd, const char * label_i,
fr_extent<ft_uoff> & storage_extent, ft_size extent_index,
ft_size & ret_mem_offset)
{
ft_size len = (ft_size) storage_extent.length();
ft_size mem_start = ret_mem_offset, mem_end = mem_start + len;
int err = 0;
do {
if (mem_star... | false | false | false | false | false | 0 |
mysasl_getsecret_cb(sasl_conn_t *conn,
void *context,
int id,
sasl_secret_t **result)
{
if (!conn || !result || id != SASL_CB_PASS) {
return SASL_BADPARAM;
}
*result = (sasl_secret_t *)context;
return SASL_OK;
} | false | true | false | false | false | 1 |
dvorak_convert( int key )
{
const char dkey[] = {
'\'','\"',',','<','.','>','p','P','y','Y','f','F','g','G',
'c','C','r','R','l','L','/','?','=','+','\\','|',
'a','A','o','O','e','E','u','U','i','I','d','D','h','H',
't','T','n','N','s','S','-','_',
';',':','q','Q','j','J','k','K','x','X','b','B','m','M',
'... | false | false | false | false | false | 0 |
file_source_rename_ready_cb (GObject *object,
GError *error,
gpointer user_data)
{
GthSourceTree *source_tree = user_data;
if (error != NULL)
_gtk_error_dialog_from_gerror_show (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (source_tree))), _("Could not change name"), error);
} | false | false | false | false | false | 0 |
e1000_set_d0_lplu_state_82571(struct e1000_hw *hw, bool active)
{
struct e1000_phy_info *phy = &hw->phy;
s32 ret_val;
u16 data;
ret_val = e1e_rphy(hw, IGP02E1000_PHY_POWER_MGMT, &data);
if (ret_val)
return ret_val;
if (active) {
data |= IGP02E1000_PM_D0_LPLU;
ret_val = e1e_wphy(hw, IGP02E1000_PHY_POWER_MG... | false | false | false | false | false | 0 |
jbd2_journal_destroy_checkpoint(journal_t *journal)
{
/*
* We loop because __jbd2_journal_clean_checkpoint_list() may abort
* early due to a need of rescheduling.
*/
while (1) {
spin_lock(&journal->j_list_lock);
if (!journal->j_checkpoint_transactions) {
spin_unlock(&journal->j_list_lock);
break;
}
... | false | false | false | false | false | 0 |
gm_scaling(glp_prob *lp, int flag)
{ int i, j, pass;
double temp;
xassert(flag == 0 || flag == 1);
for (pass = 0; pass <= 1; pass++)
{ if (pass == flag)
{ /* scale rows */
for (i = 1; i <= lp->m; i++)
{ temp = min_row_aij(lp, i, 1) * max_row_aij(lp, i, 1);... | false | false | false | false | false | 0 |
probe_psxstr(bgav_input_context_t * input)
{
uint8_t * ptr;
uint8_t data[28+RIFF_HEADER_SIZE];
if(bgav_input_get_data(input, data, 28+RIFF_HEADER_SIZE) < 28+RIFF_HEADER_SIZE)
return 0;
if((data[0] == 'R') &&
(data[1] == 'I') &&
(data[2] == 'F') &&
(data[3] == 'F') &&
(data[8] == '... | false | false | false | false | false | 0 |
PrintSelf(ostream& os, vtkIndent indent)
{
this->Superclass::PrintSelf(os,indent);
os << indent << "S Range: (" << this->SRange[0] << ", "
<< this->SRange[1] << ")\n";
os << indent << "T Range: (" << this->TRange[0] << ", "
<< this->TRange[1] << ")\n... | false | false | false | false | false | 0 |
grecs_hash_string(const char *name, unsigned long hashsize)
{
unsigned i;
for (i = 0; *name; name++) {
i <<= 1;
i ^= *(unsigned char*) name;
}
return i % hashsize;
} | false | false | false | false | false | 0 |
_dir_object(PyObject *obj)
{
PyObject *result, *sorted;
_Py_IDENTIFIER(__dir__);
PyObject *dirfunc = _PyObject_LookupSpecial(obj, &PyId___dir__);
assert(obj);
if (dirfunc == NULL) {
if (!PyErr_Occurred())
PyErr_SetString(PyExc_TypeError, "object does not provide __dir__");
... | false | false | false | false | false | 0 |
writeString(char *str)
{
int i;
for (i = 0; str[i] != '\0'; ++i)
writeByte((byte) str[i]);
writeByte(0);
return i + 1;
} | false | false | false | false | false | 0 |
HandleXMLEndTag(const wxChar * WXUNUSED(tag))
{
if(mRescaleXMLValues)
{
mRescaleXMLValues = false;
mEnvelope->Rescale(mRangeLower, mRangeUpper);
mEnvelope->SetRange(TIMETRACK_MIN, TIMETRACK_MAX);
}
} | false | false | false | false | false | 0 |
join_list_unicode(PyObject *lst)
{
/* return u''.join(lst) */
static PyObject *sep = NULL;
if (sep == NULL) {
sep = PyUnicode_FromStringAndSize("", 0);
if (sep == NULL)
return NULL;
}
return PyUnicode_Join(sep, lst);
} | false | false | false | false | false | 0 |
emit_double (LogBuffer *logbuffer, double value)
{
int i;
unsigned char buffer[8];
memcpy (buffer, &value, 8);
#if G_BYTE_ORDER == G_BIG_ENDIAN
for (i = 7; i >= 0; i--)
#else
for (i = 0; i < 8; i++)
#endif
emit_byte (logbuffer, buffer[i]);
} | true | true | false | false | false | 1 |
throw_except(const char* func, const char* file, long line, const char* var)
{
std::stringstream stream;
stream << "File: " << file << std::endl;
stream << "Fucntion: " << func << std::endl;
stream << "Expression:" << std::endl << line << ":\t" << var << std::endl;
stream << "Errno: " << errno << std::endl;
st... | false | false | false | false | false | 0 |
snmp_api_mode( int mode )
{
if (mode == 0)
return api_mode;
api_mode = mode;
return api_mode;
} | false | false | false | false | false | 0 |
sys_fallocate(struct tcb *tcp)
{
if (entering(tcp)) {
int argn;
tprintf("%ld, ", tcp->u_arg[0]); /* fd */
tprintf("%#lo, ", tcp->u_arg[1]); /* mode */
argn = printllval(tcp, "%llu, ", 2); /* offset */
printllval(tcp, "%llu", argn); /* len */
}
return 0;
} | false | false | false | false | false | 0 |
get_reg(long i)
{
if (i == 6) /* indirect memory access by [HL] */
return mem_get(REGS16_R(gbcpu_regs, HL));
return REGS8_R(gbcpu_regs, i);
} | false | false | false | false | false | 0 |
browse_button_clicked(GtkWidget * w, gpointer data) {
struct control * cp = (struct control *)data;
GtkWidget * dialog;
if (cp->ir->reinit_running) {
return;
}
dialog = gtk_file_chooser_dialog_new("Open File",
NULL,
GTK_FILE_CHOOSER_ACTION_OPEN,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCE... | false | false | false | false | false | 0 |
ModifyObjectFlags(int ob, int flags)
{
if(ob < 0 || ob > (NOBJECTS-1)) return;
ObjectDefs[ob].flags = flags;
} | false | false | false | false | false | 0 |
gst_jpegenc_resync (GstJpegEnc * jpegenc)
{
gint width, height;
gint i, j;
GST_DEBUG_OBJECT (jpegenc, "resync");
jpegenc->cinfo.image_width = width = jpegenc->width;
jpegenc->cinfo.image_height = height = jpegenc->height;
jpegenc->cinfo.input_components = jpegenc->channels;
GST_DEBUG_OBJECT (jpegenc, "... | false | false | false | false | false | 0 |
main(int argc,
char **argv)
{
char *filein, *fname, *argp, *argn;
char buffer[512];
l_int32 i, w, h, ignore;
l_float32 scale;
FILE *fp;
PIX *pixs, *pixt;
static char mainName[] = "printimage";
if (argc < 2 || argc > 4)
return ERROR_INT(
" Synta... | true | true | false | false | true | 1 |
init_gtk_builder(void)
{
const char * path;
struct stat st;
GError * error_ptr;
path = "./gui/gladish.ui";
if (stat(path, &st) == 0)
{
goto found;
}
path = DATA_DIR "/gladish.ui";
if (stat(path, &st) == 0)
{
goto found;
}
log_error("Unable to find the gladish.ui file");
return false... | false | false | false | false | false | 0 |
seckey_available( u32 *keyid )
{
int rc;
KEYDB_HANDLE hd = keydb_new (1);
rc = keydb_search_kid (hd, keyid);
if ( rc == -1 )
rc = G10ERR_NO_SECKEY;
keydb_release (hd);
return rc;
} | false | false | false | false | false | 0 |
progressStatus(double offset, double refval, double curval)
{
int ival;
if ( cdoSilentMode ) return;
if ( !stdout_is_tty ) return;
offset = offset < 0 ? 0: offset;
offset = offset > 1 ? 1: offset;
refval = refval < 0 ? 0: refval;
refval = refval > 1 ? 1: refval;
curval = curval < 0 ? 0: curval;
cur... | false | false | false | false | false | 0 |
tenSqrtSingle_d(double sqrtten[7], const double ten[7]) {
double eval[3], evec[9];
unsigned int ii;
tenEigensolve_d(eval, evec, ten);
for (ii=0; ii<3; ii++) {
eval[ii] = eval[ii] > 0 ? sqrt(eval[ii]) : 0;
}
tenMakeSingle_d(sqrtten, ten[0], eval, evec);
} | false | false | false | false | false | 0 |
circ_buf_resize(struct circ_buf_t *cb, int num)
{
int data_len, tmp_len;
char *tmp_buf;
if (cb == NULL)
return;
// Reshuffle the data so that rpos is at the start of the buffer.
if (cb->wpos == cb->rpos) {
// Do nothing when there is nothing in the buffer.
data_len = 0;
... | false | false | false | false | false | 0 |
sidebar_openfiles_update_all()
{
guint i;
gtk_tree_store_clear(store_openfiles);
foreach_document (i)
{
sidebar_openfiles_add(documents[i]);
}
} | false | false | false | false | false | 0 |
jshKill() {
int i;
isInitialised = false;
for (i=0;i<=EV_DEVICE_MAX;i++)
if (ioDevices[i]) {
close(ioDevices[i]);
ioDevices[i]=0;
}
#ifdef SYSFS_GPIO_DIR
// unexport any GPIO that we exported
for (i=0;i<JSH_PIN_COUNT;i++)
if (gpioState[i] != JSHPINSTATE_UNDEFINED)
sysfs_write... | false | false | false | false | false | 0 |
get_pass_for_id (int id)
{
if (id >= passes_by_id_size)
return NULL;
return passes_by_id[id];
} | false | false | false | false | false | 0 |
set_rtodms(int fract, int con_w) {
int i;
if (fract >= 0 && fract < 9 ) {
RES = 1.;
/* following not very elegant, but used infrequently */
for (i = 0; i < fract; ++i)
RES *= 10.;
RES60 = RES * 60.;
CONV = 180. * 3600. * RES / PI;
if (! con_w)
(void)sprintf(format,"%%dd%%d'%%.%df\"%%c", fract);
e... | false | true | false | false | false | 1 |
server_side_source_write (ESource *source,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data)
{
EServerSideSourcePrivate *priv;
GSimpleAsyncResult *simple;
GDBusObject *dbus_object;
EDBusSource *dbus_source;
gbo... | false | false | false | false | false | 0 |
_format_command_shutdown(void)
{
if (--format_refcount > 0) return;
eina_stringshare_del(fontstr);
eina_stringshare_del(font_fallbacksstr);
eina_stringshare_del(font_sizestr);
eina_stringshare_del(font_sourcestr);
eina_stringshare_del(font_weightstr);
eina_stringshare_del(font_stylestr);
eina_s... | false | false | false | false | false | 0 |
expt_pos (const cl_R& x, uintL y)
{
if (rationalp(x)) {
DeclareType(cl_RA,x);
return expt(x,y); // x rational -> schnellere Routine
} else {
DeclareType(cl_F,x);
var cl_F a = x;
var uintL b = y;
while (!(b % 2)) { a = square(a); b = b >> 1; }
var cl_F c = a;
until (b == 1)
{ b = b >> 1;
a = ... | false | false | false | false | false | 0 |
slideEvent( QMouseEvent *e )
{
QRect knob;
if ( maximum() > minimum() )
knob = sliderHandleRect( rect(), ((qreal)value()) / ( maximum() - minimum() ) );
int position;
int span;
if( orientation() == Qt::Horizontal )
{
position = e->pos().x() - knob.width() / 2;
span = wi... | false | false | false | false | false | 0 |
glade_gtk_menu_shell_set_child_property (GladeWidgetAdaptor *adaptor,
GObject *container,
GObject *child,
const gchar *property_name,
GValue *value)
{
g_return_if_fail (GTK_IS_MENU_SHELL (container));
g_return_if_fail (GTK_IS_MENU_ITEM (child));
g... | false | false | true | false | true | 1 |
InsertPopup(
Interactor* i, IntCoord left, IntCoord bottom, Alignment a
) {
delete i->insert_window;
Window* w = new InteractorPopupWindow(i);
i->insert_window = w;
i->managed_window = nil;
w->display(display_);
w->pplace(left, bottom);
AlignPosition(w, a);
w->map();
} | false | false | false | false | false | 0 |
ajGraphicsDrawsetLines(ajuint num, PLFLT *xx, PLFLT *yy,
PLFLT *xx2, PLFLT *yy2)
{
ajuint i = 0;
PLFLT *xa = xx;
PLFLT *ya = yy;
PLFLT *xb = xx2;
PLFLT *yb = yy2;
/* graphdata : calls ajGraphLine */
/*ajDebug("=g= ajGraphicsDrawsetLines(... %d) "
"[xx1,xx2... | false | false | false | false | false | 0 |
ath_get_next_rx_buf(struct ath_softc *sc,
struct ath_rx_status *rs)
{
struct ath_hw *ah = sc->sc_ah;
struct ath_common *common = ath9k_hw_common(ah);
struct ath_desc *ds;
struct ath_rxbuf *bf;
int ret;
if (list_empty(&sc->rx.rxbuf)) {
sc->rx.rxlink = NULL;
return NULL;
}
bf = list_first_entry(&sc-... | false | false | false | false | false | 0 |
firstsetbit(BITW w)
{
int i = 0;
while ((w & 1) == 0)
{
i++;
w/=2;
}
return i;
} | false | false | false | false | false | 0 |
__ats_fun_18 (ats_clo_ref_type env0, ats_clo_ref_type env1, ats_ref_type arg0, ats_ref_type arg1, ats_ref_type arg2) {
/* local vardec */
ATSlocal (ats_ptr_type, tmp62) ;
ATSlocal (ats_ptr_type, tmp63) ;
ATSlocal (ats_int_type, tmp64) ;
ATSlocal (ats_ptr_type, tmp65) ;
ATSlocal (anairiats_rec_1, tmp66) ;
ATSlocal (ats_... | false | false | false | false | false | 0 |
check_integer_type (expresion_result *exp)
{
if (typedef_is_pointer(exp->type))
{
// codeblock_add (code, MN_POINTER2BOL, 0) ;
exp->type = typedef_new(TYPE_DWORD) ;
}
if (typedef_is_integer(exp->type))
{
if (typedef_base(exp->type) == TYPE_BYTE)
return MN_BYTE ;
... | false | false | false | false | false | 0 |
RS_FreeUnmarked (void)
{
image_t *image;
int i;
rscript_t *rs = rs_rootscript, *tmp_rs;
for (i=0, image=gltextures ; i<numgltextures ; i++,image++)
{
if (image->script && !((rscript_t *)image->script)->dontflush)
image->script = NULL;
}
while (rs != NULL)
{
tmp_rs = rs->next;
if ... | false | false | false | false | false | 0 |
bonding_show_ad_partner_mac(struct device *d,
struct device_attribute *attr,
char *buf)
{
int count = 0;
struct bonding *bond = to_bond(d);
if (BOND_MODE(bond) == BOND_MODE_8023AD && capable(CAP_NET_ADMIN)) {
struct ad_info ad_info;
if (!bond_3ad_get_active_agg_info(bond, &ad_info))
count = s... | false | true | false | false | false | 1 |
ahc_reinitialize_dataptrs(struct ahc_softc *ahc)
{
struct scb *scb;
struct ahc_dma_seg *sg;
u_int scb_index;
uint32_t sgptr;
uint32_t resid;
uint32_t dataptr;
scb_index = ahc_inb(ahc, SCB_TAG);
scb = ahc_lookup_scb(ahc, scb_index);
sgptr = (ahc_inb(ahc, SCB_RESIDUAL_SGPTR + 3) << 24)
| (ahc_inb(ahc,... | false | false | false | false | false | 0 |
a_or_an(const string &subject)
{
string first_char(1, subject[0]);
string::size_type pos = first_char.find_first_of("aeiouAEIOUyY");
if (pos == string::npos)
return "a";
else
return "an";
} | false | false | false | false | false | 0 |
external_button_params_parse(void *data __UNUSED__, Evas_Object *obj, const Eina_List *params)
{
Elm_Params_Button *mem;
Edje_External_Param *param;
const Eina_List *l;
mem = ELM_NEW(Elm_Params_Button);
if (!mem)
return NULL;
external_common_icon_param_parse(&mem->icon, obj, params);
EINA_L... | false | false | false | false | false | 0 |
print_msg( const char * trace, unsigned char * msg,
int msg_len ) {
int i;
if (verbose) {
mutex_lock( mutex );
printf( "%s (len %d): ", trace, msg_len );
for (i = 0; i < msg_len && i < 16; i++) printf( "%02X ", msg[i] );
printf( "\n");
mutex_unlock( mutex ... | false | false | false | false | false | 0 |
restoreOptions(QSettings &settings, const QString&prefix, QList<FormatOption> &options) {
for (int i=0; i<options.size(); i++) {
QString kp = prefix + "." + options[i].getName();
QString k1 = kp + ".selected";
QString k2 = kp + ".value";
if (settings.contains(k1) && settings.contains(k2)) {
opti... | false | false | false | false | false | 0 |
globus_options_help(
globus_options_handle_t handle)
{
globus_l_options_table_t * table;
char * ptr;
int i;
int length;
int ndx;
globus_list_t * ... | false | false | false | false | false | 0 |
gee_abstract_list_real_insert_all (GeeAbstractList* self, gint index, GeeCollection* collection) {
g_return_if_fail (collection != NULL);
{
GeeIterator* _item_it = NULL;
GeeCollection* _tmp0_ = NULL;
GeeIterator* _tmp1_ = NULL;
_tmp0_ = collection;
_tmp1_ = gee_iterable_iterator ((GeeIterable*) _tmp0_);
_... | false | false | false | false | false | 0 |
chip_gpio_set(struct gpio_chip *chip, unsigned offset, int val)
{
if (val)
cs5535_gpio_set(offset, GPIO_OUTPUT_VAL);
else
cs5535_gpio_clear(offset, GPIO_OUTPUT_VAL);
} | false | false | false | false | false | 0 |
set_coercionform_dontcare_walker(Node *node, void *context)
{
if (node == NULL)
return false;
if (IsA(node, FuncExpr))
((FuncExpr *) node)->funcformat = COERCE_DONTCARE;
else if (IsA(node, RelabelType))
((RelabelType *) node)->relabelformat = COERCE_DONTCARE;
else if (IsA(node, ConvertRowtypeExpr))
((Conver... | false | false | false | false | false | 0 |
kvm_zap_obsolete_pages(struct kvm *kvm)
{
struct kvm_mmu_page *sp, *node;
int batch = 0;
restart:
list_for_each_entry_safe_reverse(sp, node,
&kvm->arch.active_mmu_pages, link) {
int ret;
/*
* No obsolete page exists before new created page since
* active_mmu_pages is the FIFO list.
*/
if (!is... | false | false | false | false | false | 0 |
harminv_get_decay(harminv_data d, int k)
{
CHECK(d->nfreqs >= 0, "haven't computed eigensolutions yet");
CHECK(k >= 0 && k < d->nfreqs,
"argument out of range in harminv_get_decay");
return(-log(cabs(d->u[k])));
} | false | false | false | false | false | 0 |
need_temp(size_t need)
{
if (need > temp_len) {
if (need < MAX_TEXT_SIZE)
need = MAX_TEXT_SIZE;
if (need < temp_len * 2)
need = temp_len * 2;
temp_buf = type_realloc(char, temp_buf, need);
temp_len = need;
}
} | false | false | false | false | true | 1 |
write_pbe_enc_params (ASN1_TYPE pbes2_asn,
const struct pbe_enc_params *params)
{
int result;
ASN1_TYPE pbe_asn = ASN1_TYPE_EMPTY;
const char *oid, *eparams;
/* Write the encryption algorithm
*/
eparams = cipher_to_pkcs_params (params->cipher, &oid);
if (eparams == NULL)
{
... | false | false | false | false | false | 0 |
scan_subroutines(struct inlining_context *ctx)
{
struct subroutine *this;
int err;
list_for_each_entry(this, &ctx->subroutine_list, subroutine_list_node) {
err = subroutine_scan(ctx, this);
if (err)
return err;
}
return 0;
} | false | false | false | false | false | 0 |
camMotionEstimation3DRSInit(CamMotionEstimation3DRSParams *params, int seed, int lsearch, int rsearch, int bs, int scans, int candidates, int test0)
{
params->niter=0;
params->seed=seed;
params->lsearch=lsearch;
params->rsearch=rsearch;
if ((bs!=8)&&(bs!=16)) return 0;
params->blockSize=b... | false | false | false | false | false | 0 |
colamd_recommended /* returns recommended value of Alen. */
(
/* === Parameters ======================================================= */
int nnz, /* number of nonzeros in A */
int n_row, /* number of rows in A */
int n_col /* number of columns in A */
)
{
return (COLAMD_RECOMMENDED (nnz, n_... | false | false | false | false | false | 0 |
gfs_event_list_read (GtsObject ** o, GtsFile * fp)
{
(* GTS_OBJECT_CLASS (gfs_event_list_class ())->parent_class->read) (o, fp);
if (fp->type == GTS_ERROR)
return;
GfsEventList * l = GFS_EVENT_LIST (*o);
if (fp->type == GTS_STRING) {
l->klass = gfs_object_class_from_name (fp->token->str);
if (l->kl... | false | false | false | false | false | 0 |
get_output_charset (domainbinding)
struct binding *domainbinding;
{
/* The output charset should normally be determined by the locale. But
sometimes the locale is not used or not correctly set up, so we provide
a possibility for the user to override this: the OUTPUT_CHARSET
environment variable. ... | false | false | false | false | false | 0 |
operator=(const Context&c) {
if(&c == this || c.m_pimpl == m_pimpl)
return (*this);
if(m_pimpl)delete m_pimpl;
m_pimpl=new PIMPL(*c.m_pimpl);
push();
pop();
return(*this);
} | false | false | false | false | false | 0 |
is_hostile_nation(int nationRecno)
{
if(nationRecno==0)
return 0;
err_when(nationRecno>7); // only 8 bits
return (monster_nation_relation & (0x1 << nationRecno));
} | false | false | false | false | false | 0 |
tag_free(DOS_FS * fs, DOS_FILE * owner, unsigned long *num_refs,
unsigned long start_cluster)
{
int prev;
unsigned long i, walk;
if (start_cluster == 0)
start_cluster = 2;
for (i = start_cluster; i < fs->clusters + 2; i++) {
FAT_ENTRY curEntry;
get_fat(&curEntry, fs->fat, i, fs);
/* If the... | false | false | false | false | false | 0 |
init_scs(void)
{
int i;
if (scs_initted)
return;
trace_ds("Initializing SCS virtual 3287.\n");
init_scs_horiz();
init_scs_vert();
pp = 1;
line = 1;
scs_any = 0;
for (i = 0; i < MAX_MPP+1; i++)
linebuf[i] = ' ';
for (i = 0; i < MAX_MPP+1; i++) {
if (trnbuf[i].malloc_len != 0) {
Free(trnbuf[i].bu... | false | false | false | false | false | 0 |
samePar(StableDocIterator const & i1, StableDocIterator const & i2)
{
StableDocIterator tmpi2 = i2;
tmpi2.pos() = i1.pos();
return i1 == tmpi2;
} | false | false | false | false | false | 0 |
xdrstdio_getint32(XDR *xdrs, int32_t *lp)
{
if (fread((caddr_t)lp, sizeof (int32_t), 1,
/* LINTED pointer cast */
(FILE *)xdrs->x_private) != 1)
return (FALSE);
*lp = xdr_ntoh32(*lp);
return (TRUE);
} | false | false | false | false | false | 0 |
cut_run_context_emit_error (CutRunContext *context,
GQuark domain,
gint code,
GError *sub_error,
const gchar *format,
...)
{
GString *message;
va... | false | false | false | false | false | 0 |
setReachable()
{
// If there is a parent, make sure its object is reachable. This goes
// up towards the root node of tree without marking the XMLNode
// resources (which would cause infinite recursion).
if (_parent && _parent->_object) _parent->_object->setReachable();
// Mark children
std::for_... | false | false | false | false | false | 0 |
dconf_keyfile_writer_list (GHashTable *set)
{
const gchar *name;
gchar *dirname;
GDir *dir;
dirname = g_build_filename (g_get_user_config_dir (), "dconf", NULL);
dir = g_dir_open (dirname, 0, NULL);
if (!dir)
return;
while ((name = g_dir_read_name (dir)))
{
const gchar *dottxt;
dot... | false | false | false | false | false | 0 |
prism2_ioctl_giwfrag(struct net_device *dev,
struct iw_request_info *info,
struct iw_param *rts, char *extra)
{
struct hostap_interface *iface;
local_info_t *local;
__le16 val;
iface = netdev_priv(dev);
local = iface->local;
if (local->func->get_rid(dev, HFA384X_RID_FRAGMENTATIONTHRESHOLD,
&val, 2,... | false | false | false | false | false | 0 |
est_noderes_shift_doc(ESTNODERES *nres, CBMAP **attrp, char **snippetp){
assert(nres && attrp && snippetp);
if(nres->dnum < 1) return FALSE;
*attrp = nres->docs[nres->top].attrs;
*snippetp = nres->docs[nres->top].snippet;
if(nres->docs[nres->top].kwords) cbmapclose(nres->docs[nres->top].kwords);
free(nres->... | false | false | false | false | false | 0 |
fraction_init (GUPnPDLNAValueType *type G_GNUC_UNUSED,
GUPnPDLNAValueUnion *value,
const gchar *raw)
{
gchar **tokens = g_strsplit (raw, "/", 2);
gboolean result = FALSE;
gint numerator;
gint denominator;
if (g_strv_length (tokens) != 2)
... | false | false | false | false | false | 0 |
jack_controller_patchbay_create_connection(
struct jack_controller_patchbay *patchbay_ptr,
struct jack_graph_port *port1_ptr,
struct jack_graph_port *port2_ptr)
{
struct jack_graph_connection * connection_ptr;
connection_ptr = malloc(sizeof(struct jack_graph_connection));
if (connection_ptr == ... | false | false | false | false | false | 0 |
print(InputLanguage lang, bool dagify) const {
if(isNull()) {
cout << "Null" << endl; return;
}
ExprStream os(getEM());
os.lang(lang);
os.dagFlag(dagify);
os << *this << endl;
} | false | false | false | false | false | 0 |
SetQualiteEnregistrement(int pourcentage)
{
if ((pourcentage >=1) && (pourcentage <=100))
{
qualite=pourcentage;
return true;
}
else {
qualite=100;
return false;
}
} | false | false | false | false | false | 0 |
vsignal_db_write(
vsignal* sig, /*!< Signal to write to file */
FILE* file /*!< Name of file to display vsignal contents to */
) { PROFILE(VSIGNAL_DB_WRITE);
unsigned int i; /* Loop iterator */
/* Don't write this vsignal if it isn't usable by Covered */
if( (sig->suppl.part.not_handled == 0) &&
... | false | false | false | false | false | 0 |
read_pwd() {
struct passwd *pwdent;
int numentries=0,i=0;
struct s_localpwd *localpwd;
setpwent();
while ((pwdent = getpwent())) {
numentries++;
}
endpwent();
localpwd = (struct s_localpwd *)malloc((size_t)sizeof(struct s_localpwd));
localpwd->numentries=numentries;
localpwd->uid = (uid_... | false | false | false | false | true | 1 |
hp_scl_strerror (int errnum)
{
static const char * errlist[] = {
"Command Format Error",
"Unrecognized Command",
"Parameter Error",
"Illegal Window",
"Scaling Error",
"Dither ID Error",
"Tone Map ID Error",
"Lamp Error",
"Matrix ID Error",
"Cal Strip Param E... | false | false | false | false | false | 0 |
db_replay_log_del_keys_iter(heim_object_t table, heim_object_t table_dict,
void *arg)
{
heim_db_t db = arg;
if (db->ret)
return;
db->current_table = table;
heim_dict_iterate_f(table_dict, db, db_replay_log_table_del_keys_iter);
} | false | false | false | false | false | 0 |
gridfs_find_query( gridfs *gfs, const bson *query, gridfile *gfile ) {
bson uploadDate[1];
bson finalQuery[1];
bson out[1];
int i;
bson_init(uploadDate);
bson_append_int(uploadDate, "uploadDate", - 1);
bson_finish(uploadDate);
bson_init(finalQuery);
bson_append_bson(finalQuery, "query", query);
... | false | false | false | false | false | 0 |
sbsWriteText(SbsLine *p, DLine *pLine, int col){
Blob *pCol = p->apCols[col];
int n = pLine->h & LENGTH_MASK;
int i; /* Number of input characters consumed */
int k; /* Cursor position */
int needEndSpan = 0;
const char *zIn = pLine->z;
int w = p->width;
int colorize = p->escHtml;
if( colorize && ... | false | false | false | false | false | 0 |
__print_option(struct fio_option *o, struct fio_option *org,
int level)
{
char name[256], *p;
int depth;
if (!o)
return;
if (!org)
org = o;
p = name;
depth = level;
while (depth--)
p += sprintf(p, "%s", " ");
sprintf(p, "%s", o->name);
log_info("%-24s: %s\n", name, o->help);
} | true | true | false | false | false | 1 |
gm_put_new_upper_scope_on_null(ast_node* n, gm_scope* new_s) {
putnew_upper_scope_on_null N;
N.set_scope_to_put(new_s);
n->traverse(&N, false, true);
} | false | false | false | false | false | 0 |
print_loop_results (LOOPSET *loop, const DATASET *dset,
PRN *prn)
{
int iters = loop->iter;
int i, j = 0, k = 0;
if (loop->type != COUNT_LOOP && !(loop_is_quiet(loop))) {
pprintf(prn, _("\nNumber of iterations: %d\n\n"), iters);
}
for (i=0; i<loop->n_cmds; i++) {
gretlopt opt = OPT_NONE;
i... | true | true | false | false | false | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.