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 |
|---|---|---|---|---|---|---|
dump_segfile(struct super_block *sb)
{
struct logfs_super *super = logfs_super(sb);
struct logfs_segment_entry se;
u32 segno;
for (segno = 0; segno < super->s_no_segs; segno++) {
logfs_get_segment_entry(sb, segno, &se);
printk("%3x: %6x %8x", segno, be32_to_cpu(se.ec_level),
be32_to_cpu(se.valid));
if (+... | false | false | false | false | false | 0 |
Application (string name, string datadir, char const *help_name, char const *icon_name, CmdContext *cc)
{
if (m_ConfDir == NULL) {
libgoffice_init ();
m_ConfDir = go_conf_get_node (NULL, GCU_CONF_DIR);
}
m_CmdContext = cc;
if (m_CmdContext)
m_CmdContext->m_App = this;
Apps[name] = this;
static bool first_ca... | false | false | false | false | false | 0 |
cmd_authinfo_pass(char *pass)
{
int failedloginpause;
/* Conceal password in telemetry log */
if (nntp_logfd != -1 && pass) {
int r; /* avoid warnings */
r = ftruncate(nntp_logfd,
lseek(nntp_logfd, -2, SEEK_CUR) - strlen(pass));
r = write(nntp_logfd, "...\r\n", 5);
}
if (nntp_authstate) {
p... | false | false | false | false | false | 0 |
xfs_trans_bhold_release(xfs_trans_t *tp,
xfs_buf_t *bp)
{
xfs_buf_log_item_t *bip = bp->b_fspriv;
ASSERT(bp->b_transp == tp);
ASSERT(bip != NULL);
ASSERT(!(bip->bli_flags & XFS_BLI_STALE));
ASSERT(!(bip->__bli_format.blf_flags & XFS_BLF_CANCEL));
ASSERT(atomic_read(&bip->bli_refcount) > 0);
ASSERT(bip->bli_f... | false | false | false | false | false | 0 |
find_variable_internal (name, force_tempenv)
const char *name;
int force_tempenv;
{
SHELL_VAR *var;
int search_tempenv;
var = (SHELL_VAR *)NULL;
/* If explicitly requested, first look in the temporary environment for
the variable. This allows constructs such as "foo=x eval 'echo $foo'"
to... | false | false | false | false | false | 0 |
ComputeConstExpr() const
{
if (GetSymType() == top_type_int) return Token(ComputeIntConstExpr());
return Token(ComputeRealConstExpr());
} | false | false | false | false | false | 0 |
reparent(const FbWindow &parent, int x, int y, bool continuing) {
XReparentWindow(display(), window(), parent.window(), x, y);
m_parent = &parent;
if (continuing) // we will continue managing this window after reparent
updateGeometry();
} | false | false | false | false | false | 0 |
btd_adapter_set_fast_connectable(struct btd_adapter *adapter,
gboolean enable)
{
if (!adapter_ops)
return -EINVAL;
if (!adapter->up)
return -EINVAL;
return adapter_ops->set_fast_connectable(adapter->dev_id, enable);
} | false | false | false | false | false | 0 |
nfs4_proc_async_renew(struct nfs_client *clp, struct rpc_cred *cred, unsigned renew_flags)
{
struct rpc_message msg = {
.rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_RENEW],
.rpc_argp = clp,
.rpc_cred = cred,
};
struct nfs4_renewdata *data;
if (renew_flags == 0)
return 0;
if (!atomic_inc_not_zero(&clp->cl_co... | false | false | false | false | false | 0 |
zend_do_try(znode *try_token TSRMLS_DC) /* {{{ */
{
try_token->u.opline_num = zend_add_try_element(get_next_op_number(CG(active_op_array)) TSRMLS_CC);
INC_BPC(CG(active_op_array));
} | false | false | false | false | false | 0 |
s5h1411_set_spectralinversion(struct dvb_frontend *fe, int inversion)
{
struct s5h1411_state *state = fe->demodulator_priv;
u16 val;
dprintk("%s(%d)\n", __func__, inversion);
val = s5h1411_readreg(state, S5H1411_I2C_TOP_ADDR, 0x24) & ~0x1000;
if (inversion == 1)
val |= 0x1000; /* Inverted */
state->inversion... | false | false | false | false | false | 0 |
trough_leave_event_cb (ClutterActor *actor,
ClutterEvent *event,
MxScrollBar *self)
{
if (self->priv->paging_source_id)
{
g_source_remove (self->priv->paging_source_id);
self->priv->paging_source_id = 0;
return TRUE;
}
return FALSE;
} | false | false | false | false | false | 0 |
gvfs_backend_ftp_determine_site_features (GVfsFtpTask *task)
{
const struct {
const char * name; /* name of feature */
GVfsFtpFeature enable; /* flags to enable with this feature */
} features[] = {
{ "CHMOD", G_VFS_FTP_FEATURE_CHMOD },
{ "CHGRP", G_VFS_FTP_FEATURE_CHGRP ... | false | false | false | false | false | 0 |
I_cluster_exec_allocate(struct Cluster *C)
{
/*
fprintf(stderr,"I_cluster_exec_allocate(npoints=%d,nclasses=%d,nbands=%d)\n", C->npoints, C->nclasses, C->nbands);
*/
C->class = I_alloc_int(C->npoints);
C->reclass = I_alloc_int(C->nclasses);
C->count = I_alloc_int(C->nclasses);
C->countd... | false | false | false | false | false | 0 |
PMat_Empirical(double l, model *mod, double ***Pij)
{
int n = mod->ns;
int i, j, k;
double *U,*V,*R;
double *expt = (double*)calloc(n,sizeof(double));
double *uexpt = (double*)calloc(n*n,sizeof(double));
U = mod->mat_Vr;
V = mod->mat_Vi;
R = mod->vct_eDmr;
For (i,n) For (k,n)
(*Pij)[i][k] = .0;... | false | false | false | false | false | 0 |
write(DcmItem &dataset) const
{
OFCondition result = EC_Normal;
/* store the study level attributes */
dataset.putAndInsertOFStringArray(DCM_StudyInstanceUID, StudyUID);
/* iterate over all list items */
OFListConstIterator(SeriesStruct *) iter = SeriesList.begin();
const OFListConstIterator(Ser... | false | false | false | false | false | 0 |
emoticonify(const QString &in)
{
RTParse p(in);
while ( !p.atEnd() ) {
// returns us the first chunk as a plaintext string
QString str = p.next();
int i = 0;
while ( i >= 0 ) {
// find closest emoticon
int ePos = -1;
PsiIcon *closest = 0;
int foundPos = -1, foundLen = -1;
Q3PtrListIterator<I... | false | false | false | false | false | 0 |
ext4_init_inode_bitmap(struct super_block *sb,
struct buffer_head *bh,
ext4_group_t block_group,
struct ext4_group_desc *gdp)
{
struct ext4_group_info *grp;
struct ext4_sb_info *sbi = EXT4_SB(sb);
J_ASSERT_BH(bh, buffer_locked(bh));
/* If checksum is bad mark all blocks and inodes ... | false | false | false | false | false | 0 |
send_level( Level *level, ServerUser *user, int l_pos )
{
if ( user->bot ) return;
msgbuf[0] = MSG_LEVEL_DATA;
msgbuf[1] = l_pos;
msglen = 2;
comm_pack_level( level, (unsigned char*)msgbuf, &msglen );
socket_transmit( &user->socket, CODE_BLUE, msglen, msgbuf );
} | false | false | false | false | false | 0 |
register_source()
{
GET_STORAGE(_command[_num_command].filename, char,
1 + strlen(_cmdFILE.back().get_name()));
strcpy(_command[_num_command].filename, _cmdFILE.back().get_name());
_command[_num_command].fileline = _cmdFILE.back().get_line() + 1;
} | false | false | false | false | false | 0 |
gc_tile(ttip_image_t tile) {
tiles_to_gc[ntiles_to_gc++] = tile;
if (ntiles_to_gc == sizeof(tiles_to_gc)/sizeof(tiles_to_gc[0]))
errx(1, "tile garbage collector overflow");
} | false | false | false | false | false | 0 |
tidy_multi_feature_with_different_parent(GtFeatureNode *new_gf,
GtFeatureNode *old_gf,
const char *id,
GtFeatureInfo
... | false | false | false | false | false | 0 |
ComputeLength() const
{
VL length = 0;
// First the table
length += Table.GetLength();
// Then all the fragments
FragmentVector::const_iterator it = Fragments.begin();
for(;it != Fragments.end(); ++it)
{
const VL fraglen = it->ComputeLength();
assert( fraglen % 2 == 0 );
length += fraglen;
... | false | false | false | false | false | 0 |
gpioSetValue (uint32_t portNum, uint32_t bitPos, uint32_t bitVal) {
if(compair(portNum, bitPos, RB_LED0)) return simSetLED(0,bitVal);
if(compair(portNum, bitPos, RB_LED1)) return simSetLED(1,bitVal);
if(compair(portNum, bitPos, RB_LED2)) return simSetLED(2,bitVal);
if(compair(portNum, bitPos, RB_LED3)) return s... | false | false | false | false | false | 0 |
splashOutBlendOverlay(SplashColorPtr src, SplashColorPtr dest,
SplashColorPtr blend, SplashColorMode cm) {
int i;
#ifdef SPLASH_CMYK
if (cm == splashModeCMYK8) {
SplashColor rgbSrc;
SplashColor rgbDest;
SplashColor rgbBlend;
cmykToRGB(src, rgbSrc);
cmykToRGB(dest, rgbDest);
for (i = 0... | false | false | false | false | false | 0 |
qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
if (_c == QMetaObject::InvokeMetaMethod) {
Q_ASSERT(staticMetaObject.cast(_o));
RelayForwarder *_t = static_cast<RelayForwarder *>(_o);
switch (_id) {
case 0: _t->IncomingData((*reinterpret_cast< const Reques... | false | false | false | false | false | 0 |
calculateScale(double zin, Energy pt, IdList ids,
unsigned int iopt) {
Energy2 tmin;
initialize(ids,tmin,false);
// final-state branching
if(iopt==0) {
Energy2 scale=(sqr(pt)+masssquared_[1]*(1.-zin)+masssquared_[2]*zin);
if(ids[0]!=ParticleID::g) scale -= zin*(1.-zin)*masssquared_[0];
scal... | false | false | false | false | false | 0 |
calc_all_grads(mode)
int mode; /* bits for CALC_FORCE and CALC_VOLGRADS */
{ find_fixed();
if ( mode & CALC_VOLGRADS )
calc_volgrads(DO_OPTS);
if ( mode & CALC_FORCE )
{ calc_force();
pressure_forces();
}
partner_shift_grads(mode); /* in case doing partners */
/* Now have energy and constrain... | false | false | false | false | false | 0 |
request_tp_traverse(requestobject* self, visitproc visit, void *arg) {
int result;
VISIT_REQUEST_MEMBER(self->dict, visit, arg);
VISIT_REQUEST_MEMBER(self->connection, visit, arg);
VISIT_REQUEST_MEMBER(self->server, visit, arg);
VISIT_REQUEST_MEMBER(self->headers_in, visit, arg);
VISIT_REQUEST_M... | false | false | false | false | false | 0 |
gen_floatdisf2 (rtx operand0,
rtx operand1)
{
rtx _val = 0;
start_sequence ();
{
rtx operands[2];
operands[0] = operand0;
operands[1] = operand1;
#line 6402 "../../src/gcc/config/rs6000/rs6000.md"
{
if (!TARGET_FCFIDS)
{
rtx val = operands[1];
if (!flag_unsafe_math_optimizations)
... | false | false | false | false | false | 0 |
OnQuit ()
{
while (m_Docs.size () > 0) {
m_pActiveDoc = static_cast < gcr::Document * > (*m_Docs.begin ());
if (!OnFileClose ())
return false;
}
return true;
} | false | false | false | false | false | 0 |
val_str(String *str)
{
int err= Z_OK, code;
ulong new_size;
String *res;
Byte *body;
char *tmp, *last_char;
DBUG_ASSERT(fixed == 1);
if (!(res= args[0]->val_str(str)))
{
null_value= 1;
return 0;
}
null_value= 0;
if (res->is_empty()) return res;
/*
Citation from zlib.h (comment for ... | false | false | false | false | false | 0 |
JS_GetObjectTotalSize(JSContext *cx, JSObject *obj)
{
size_t nbytes;
JSScope *scope;
nbytes = sizeof *obj;
if (obj->dslots) {
nbytes += ((uint32)obj->dslots[-1] - JS_INITIAL_NSLOTS + 1)
* sizeof obj->dslots[0];
}
if (OBJ_IS_NATIVE(obj)) {
scope = OBJ_SCOPE(obj)... | false | false | false | false | false | 0 |
Gif_GetExtension(Gif_Stream *gfs, int id, Gif_Extension *search_from)
{
if (!search_from)
search_from = gfs->extensions;
while (search_from) {
if (search_from->kind == id)
return search_from;
search_from = search_from->next;
}
return 0;
} | false | false | false | false | false | 0 |
dwarf2out_start_source_file (unsigned int lineno, const char *filename)
{
if (flag_eliminate_dwarf2_dups && dwarf_version < 4)
{
/* Record the beginning of the file for break_out_includes. */
dw_die_ref bincl_die;
bincl_die = new_die (DW_TAG_GNU_BINCL, comp_unit_die (), NULL);
add_AT_str... | false | false | false | false | false | 0 |
id (float x)
{
if (x != 0.)
return 1.F;
else
return 0.F;
} | false | false | false | false | false | 0 |
get_biggest_owl_target(int pos)
{
int k;
int biggest_target = -1;
float target_size = 0.0;
for (k = 0; k < MAX_REASONS; k++) {
int r = move[pos].reason[k];
if (r < 0)
break;
switch (move_reasons[r].type) {
case OWL_ATTACK_MOVE:
case OWL_ATTACK_MOVE_GOOD_KO:
case OWL_ATTACK_MOVE_BA... | false | false | false | false | false | 0 |
kmclipm_vector_add_scalar(kmclipm_vector *kv, double addend)
{
int i = 0,
n = 0;
double *pkvmask = NULL,
*pkvdata = NULL;
cpl_error_code err = CPL_ERROR_NONE;
KMCLIPM_TRY
{
KMCLIPM_TRY_CHECK_AUTO... | false | false | false | false | false | 0 |
btdm_2Ant8723APANHSAction(struct rtw_adapter *padapter)
{
u8 btRssiState;
if (BTDM_IsHT40(padapter)) {
RTPRINT(FBT, BT_TRACE, ("HT40\n"));
btRssiState = BTDM_CheckCoexRSSIState(padapter, 2, 47, 0);
/* fw mechanism */
if ((btRssiState == BT_RSSI_STATE_HIGH) ||
(btRssiState == BT_RSSI_STATE_STAY_HIGH)) ... | false | false | false | false | false | 0 |
fitValue( double value )
{
if ( d_data->scrollMode == ScrMouse )
stopMoving();
QwtDoubleRange::fitValue( value );
} | false | false | false | false | false | 0 |
SetNumberOfStreamDivisions(int num)
{
if (this->NumberOfStreamDivisions == num)
{
return;
}
this->Modified();
this->NumberOfStreamDivisions = num;
} | false | false | false | false | false | 0 |
goo_canvas_accessible_get_n_children (AtkObject *object)
{
GtkAccessible *accessible;
GtkWidget *widget;
accessible = GTK_ACCESSIBLE (object);
widget = gtk_accessible_get_widget (accessible);
/* Check if widget still exists. */
if (widget == NULL)
return 0;
g_return_val_if_fail (GOO_IS_CANVAS (widg... | false | false | false | false | false | 0 |
DoStoreGlobalGeneric(LStoreGlobalGeneric* instr) {
ASSERT(ToRegister(instr->global_object()).is(rdx));
ASSERT(ToRegister(instr->value()).is(rax));
__ Move(rcx, instr->name());
Handle<Code> ic = instr->strict_mode()
? isolate()->builtins()->StoreIC_Initialize_Strict()
: isolate()->builtins()->StoreI... | false | false | false | false | false | 0 |
PL_strncat(char *dest, const char *src, PRUint32 max)
{
char *rv;
if( ((char *)0 == dest) || ((const char *)0 == src) || (0 == max) )
return dest;
for( rv = dest; *dest; dest++ )
;
(void)PL_strncpy(dest, src, max);
return rv;
} | false | false | false | false | false | 0 |
cancel ()
{
Glib::RefPtr<Gtk::TreeSelection> tree_sel = tview.get_selection();
tree_sel->unselect_all();
selection_made (new Result (tview, tree_sel));
} | false | false | false | false | false | 0 |
getDisplayObjectAtDepth(int depth) const
{
testInvariant();
for (const_iterator it = _charsByDepth.begin(), itEnd = _charsByDepth.end();
it != itEnd; ++it) {
DisplayObject* ch = *it;
// Should not be there!
if (ch->isDestroyed()) continue;
// found
if (ch->get... | false | false | false | false | false | 0 |
long_from_bytes(PyTypeObject *type, PyObject *args, PyObject *kwds)
{
PyObject *byteorder_str;
PyObject *is_signed_obj = NULL;
int little_endian;
int is_signed;
PyObject *obj;
PyObject *bytes;
PyObject *long_obj;
static char *kwlist[] = {"bytes", "byteorder", "signed", NULL};
if (!P... | false | false | false | false | true | 1 |
OnCreatureCreate(Creature* pCreature)
{
switch (pCreature->GetEntry())
{
case NPC_ANTUSUL:
case NPC_SERGEANT_BLY:
m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid();
break;
case NPC_SANDFURY_SLAVE:
case NPC_SANDFURY_DRUDGE:
ca... | false | false | false | false | false | 0 |
pci_swizzle_interrupt_pin(const struct pci_dev *dev, u8 pin)
{
int slot;
if (pci_ari_enabled(dev->bus))
slot = 0;
else
slot = PCI_SLOT(dev->devfn);
return (((pin - 1) + slot) % 4) + 1;
} | false | false | false | false | false | 0 |
get_world_from_cmdline(const gchar *cmdline)
{
gchar *world_file;
World *world = NULL;
static GRegex *parameters_regex = NULL;
world_file = try_find_world_from_name(cmdline);
if (world_file) {
GError *error = NULL;
world = create_new_world(TRUE);
if (load_world_from_file(world_file,
... | false | false | false | false | false | 0 |
qtdemux_dump_tfhd (GstQTDemux * qtdemux, GstByteReader * data, int depth)
{
guint32 flags = 0, n = 0, track_id = 0;
guint64 base_data_offset = 0;
if (!gst_byte_reader_skip (data, 1) ||
!gst_byte_reader_get_uint24_be (data, &flags))
return FALSE;
GST_LOG ("%*s flags: %08x", depth, "", flags);
if (... | false | false | false | false | false | 0 |
psb_intel_opregion_asle_intr(struct drm_device *dev)
{
struct drm_psb_private *dev_priv = dev->dev_private;
if (dev_priv->opregion.asle)
schedule_work(&dev_priv->opregion.asle_work);
} | false | false | false | false | false | 0 |
diff_patch_alloc_from_diff(
git_diff_patch **out,
git_diff_list *diff,
size_t delta_index)
{
int error;
git_diff_patch *patch = git__calloc(1, sizeof(git_diff_patch));
GITERR_CHECK_ALLOC(patch);
if (!(error = diff_patch_init_from_diff(patch, diff, delta_index))) {
patch->flags |= GIT_DIFF_PATCH_ALLOCATED;
G... | false | false | false | false | false | 0 |
select_commit_parent(const char *id, char rev[SIZEOF_REV], const char *path)
{
char buf[SIZEOF_STR * 4];
const char *revlist_argv[] = {
"git", "log", "--no-color", "-1",
"--pretty=format:%P", id, "--", path, NULL
};
int parents;
if (!io_run_buf(revlist_argv, buf, sizeof(buf)) ||
(parents = strlen(buf) /... | false | false | false | false | false | 0 |
PyInit__weakref(void)
{
PyObject *m;
m = PyModule_Create(&weakrefmodule);
if (m != NULL) {
Py_INCREF(&_PyWeakref_RefType);
PyModule_AddObject(m, "ref",
(PyObject *) &_PyWeakref_RefType);
Py_INCREF(&_PyWeakref_RefType);
PyMod... | false | false | false | false | false | 0 |
gnome_scanner_set_status (GnomeScanner *scanner, GnomeScannerStatus status)
{
if (scanner->status != status) {
scanner->status = status;
g_signal_emit (scanner, signals[STATUS_CHANGED], 0);
}
} | false | false | false | false | false | 0 |
GetPresentationContextIDFromPresentationContext(PresentationContextRQ const & pc) const
{
// one day ULConnection will actually use a AAssociateRQPDU as internal implementation
// for now duplicate code from AAssociateRQPDU::GetPresentationContextIDFromAbstractSyntax
uint8_t ret = 0;
std::vector<PresentationCo... | false | false | false | false | false | 0 |
dict_next(const ref * pdref, int index, ref * eltp /* ref eltp[2] */ )
{
dict *pdict = pdref->value.pdict;
ref *vp = pdict->values.value.refs + index;
while (vp--, --index >= 0) {
array_get(dict_mem(pdict), &pdict->keys, (long)index, eltp);
/* Make sure this is a valid entry. */
if ... | false | false | false | false | false | 0 |
shade(model* m, float lx, float ly, float lz) {
for(int i = 0; i != m->triangleCount; i++) {
for(int j = 0; j < 3; j++) {
for(int c = 0; c < 3; c++) {
// Diffuse lighting, white.
float Lx = lx - m->mesh[m->triangles[i].ID * 18 + j*6];
float Ly = ly - m->mesh[m->triangles[i].ID * 18 + j*6 + 1];
flo... | false | false | false | false | false | 0 |
cube_ptr_from_index(gs_function_Sd_params_t * params, int indexes[])
{
int i, sum = indexes[params->m - 1];
for (i = params->m - 2; i >= 0; i--) {
sum *= params->Size[i];
sum += indexes[i];
}
return (byte *)(params->DataSource.data.str.data) +
sum * params->n * bits2bytes(params... | false | false | false | false | false | 0 |
kSaid(state_t *s, int funct_nr, int argc, reg_t *argv)
{
reg_t heap_said_block = argv[0];
byte *said_block;
int new_lastmatch;
if (!heap_said_block.segment)
return NULL_REG;
said_block = (byte *) kernel_dereference_bulk_pointer(s, heap_said_block, 0);
if (!said_block) {
SCIkdebug(SCIkWARNING, "Said on non-... | false | false | false | false | false | 0 |
H5Sextent_copy(hid_t dst_id,hid_t src_id)
{
H5S_t *src;
H5S_t *dst;
hid_t ret_value = SUCCEED;
FUNC_ENTER_API(FAIL)
H5TRACE2("e", "ii", dst_id, src_id);
/* Check args */
if(NULL == (src = (H5S_t *)H5I_object_verify(src_id, H5I_DATASPACE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "... | false | false | false | false | false | 0 |
split_by_lines(char *s, stmt_ty *sp, string_ty *fn, long ln)
{
stmt_ty *body;
char *ep;
/*
* build a compound statement for the body
*/
body = stmt_compound_alloc();
for (;;)
{
while (isspace(*s))
++s;
if (!*s)
break;
... | false | false | false | false | true | 1 |
addchordname(s, len, notes)
/* adds chord name and note set to list of known chords */
char *s;
int notes[];
int len;
{
int i, j, done;
if (strlen(s) > 7) {
event_error("Chord name cannot exceed 7 characters");
return;
};
if (len > 6) {
event_error("Named chord cannot have more than 6 notes");
... | false | false | false | false | false | 0 |
cpl_vector_get_median_const(const cpl_vector * v)
{
double * darr;
double med;
cpl_ensure(v != NULL, CPL_ERROR_NULL_INPUT, 0.0);
/* Create a separate data buffer because */
/* cpl_tools_get_median_double() modifies its input */
darr = (double*)cpl_malloc((size_t)v->size * sizeof(*darr... | false | false | false | false | false | 0 |
handle_pkcs12_encrypted_bag (GcrParser *self,
GNode *bag)
{
PasswordState pstate = PASSWORD_STATE_INIT;
GNode *asn = NULL;
gcry_cipher_hd_t cih = NULL;
gcry_error_t gcry;
guchar *crypted = NULL;
GNode *params = NULL;
gsize n_crypted;
const gchar *password;
GBytes *cbytes;
GQuark s... | false | false | false | false | false | 0 |
gst_memory_make_mapped (GstMemory * mem, GstMapInfo * info, GstMapFlags flags)
{
GstMemory *result;
if (gst_memory_map (mem, info, flags)) {
result = mem;
} else {
result = gst_memory_copy (mem, 0, -1);
gst_memory_unref (mem);
if (result == NULL)
goto cannot_copy;
if (!gst_memory_map ... | false | false | false | false | false | 0 |
JimGetWideNoErr(Jim_Interp *interp, Jim_Obj *objPtr, jim_wide * widePtr)
{
if (objPtr->typePtr != &intObjType && SetIntFromAny(interp, objPtr, JIM_NONE) == JIM_ERR)
return JIM_ERR;
*widePtr = JimWideValue(objPtr);
return JIM_OK;
} | false | false | false | false | false | 0 |
trx_purge(
/*======*/
ulint limit) /*!< in: the maximum number of records to
purge in one batch */
{
que_thr_t* thr;
ulint old_pages_handled;
ut_a(purge_sys->trx->n_active_thrs == 0);
rw_lock_x_lock(&purge_sys->latch);
mutex_enter(&kernel_mutex);
/* Close and free the old purge view */
read_view_clos... | false | false | false | false | false | 0 |
add_page(pool_t *p)
{
gcpage_t *pg = malloc(sizeof(gcpage_t));
if (pg == NULL)
jl_raise(jl_memory_exception);
gcval_t *v = (gcval_t*)&pg->data[0];
char *lim = (char*)pg + GC_PAGE_SZ - p->osize;
gcval_t *fl;
gcval_t **pfl = &fl;
while ((char*)v <= lim) {
*pfl = v;
pfl ... | false | false | false | true | false | 1 |
gtk_hex_validate_highlight(GtkHex *gh, GtkHex_Highlight *hl)
{
if (!hl->valid)
{
hl->start_line = MIN(hl->start, hl->end) / gh->cpl - gh->top_line;
hl->end_line = MAX(hl->start, hl->end) / gh->cpl - gh->top_line;
hl->valid = TRUE;
}
} | false | false | false | false | false | 0 |
ScaReleaseLogBlocks(
FFILE * pFile)
{
SCACHE * pSCache;
SCACHE * pNextSCache;
pSCache = pFile->pTransLogList;
while (pSCache)
{
#ifdef FLM_DBG_LOG
FLMUINT16 ui16OldFlags = pSCache->ui16Flags;
#endif
// A block in this list should never be dirty.
flmAssert( !(pSCache->ui16Flags & CA_DIRTY));
if ((pSCac... | false | false | false | false | false | 0 |
_dxf_getline(struct parse_state *ps)
{
char str[MAX_DSTR];
int n=0;
char *line = ps->line;
char *current = ps->current;
int slop = 24;
/* get newline allocating space if ness */
if ((fgets(str,MAX_DSTR,ps->fp))==NULL){
DXSetError(ERROR_DATA_INVALID,"error reading file");
return ERROR;
}
ps->l... | false | false | false | false | false | 0 |
key_value_renderer_real_activate (GtkCellRenderer* base, GdkEvent* event, GtkWidget* widget, const gchar* path, GdkRectangle* background_area, GdkRectangle* cell_area, GtkCellRendererState flags) {
KeyValueRenderer * self;
gboolean result = FALSE;
GtkCellRenderer* _tmp0_;
GtkCellRenderer* _tmp1_;
GdkEvent* _tmp2_;... | false | false | false | false | false | 0 |
get_next_connection_number()
{
int i;
for (i=next_connection; i < MAX_CONNECTIONS; i++)
{
if (!connections[i])
{
next_connection = i+1;
return i;
}
}
// Didn't find a slot here - try from the start
for (i=1; i < next_connection; i++)
{
if (!connections[i])
{
next_connection ... | false | false | false | false | false | 0 |
RemoveClients()
{
bool res;
m_Mutex.Lock();
res = false;
// sanity check
if ( m_pClientList != 0 )
{
CSearchClient * client = 0;
// remove clients from the client list
while ( ( (client = m_pClientList->Next(client)) != NULL) )
{
if ( client->m_bSearchRemove )
{
if ( client->m_tSearchTimeou... | false | false | false | false | false | 0 |
VvhVbhTreatLoop( ScanLoop )
vblop_list *ScanLoop;
{
vpnplace_list *BeginPlace;
vpnplace_list *EndPlace;
vpnplace_list *OldBeginLoop;
vpnplace_list *OldEndLoop;
vpntrans_list *BeginTrans;
vpntrans_list *EndTrans;
vpnarc *VpnArc;
long Number;
VvhCurrentLine = ScanLoop->LINE;
Num... | false | false | false | false | false | 0 |
e_cal_backend_sexp_func_time_day_end (ESExp *esexp,
gint argc,
ESExpResult **argv,
gpointer data)
{
time_t t;
ESExpResult *result;
g_return_val_if_fail (esexp != NULL, NULL);
if (argc != 1) {
e_sexp... | false | false | false | false | false | 0 |
inkscape_abs2rel (const char *path, const char *base, char *result, const size_t size)
{
const char *pp, *bp, *branch;
/* endp points the last position which is safe in the result buffer. */
const char *endp = result + size - 1;
char *rp;
if (*path != G_DIR_SEPARATOR)
{
if (strlen (path) >= size)
... | false | false | false | false | false | 0 |
ipath_run_led_override(unsigned long opaque)
{
struct ipath_devdata *dd = (struct ipath_devdata *)opaque;
int timeoff;
int pidx;
u64 lstate, ltstate, val;
if (!(dd->ipath_flags & IPATH_INITTED))
return;
pidx = dd->ipath_led_override_phase++ & 1;
dd->ipath_led_override = dd->ipath_led_override_vals[pidx];
ti... | false | false | false | false | false | 0 |
EnsureDebugInfo(Handle<SharedFunctionInfo> shared) {
// Return if we already have the debug info for shared.
if (HasDebugInfo(shared)) {
ASSERT(shared->is_compiled());
return true;
}
// Ensure shared in compiled. Return false if this failed.
if (!EnsureCompiled(shared, CLEAR_EXCEPTION)) return false;... | false | false | false | false | false | 0 |
WordHood_CodonSubmat_is_valid_func(
WordHood_Alphabet *wha, gchar *seq){
if((wha->input_index[(guchar)seq[0]] == -1)
|| (wha->input_index[(guchar)seq[1]] == -1)
|| (wha->input_index[(guchar)seq[2]] == -1))
return FALSE;
return TRUE;
} | false | false | false | false | false | 0 |
NumListGetFirst( int * list )
{
int n = list[0];
if( n > 0 )
{
n = list[1];
}
return n;
} | false | false | false | false | false | 0 |
_avahi_record_browser_cb(AVAHI_GCC_UNUSED AvahiRecordBrowser * r, AvahiIfIndex interface,
AvahiProtocol protocol, AvahiBrowserEvent event,
const char *name, uint16_t clazz, uint16_t type,
const void *rdata, size_t rdata_size,
... | false | false | false | false | false | 0 |
wl18xx_set_rx_csum(struct wl1271 *wl,
struct wl1271_rx_descriptor *desc,
struct sk_buff *skb)
{
if (desc->status & WL18XX_RX_CHECKSUM_MASK)
skb->ip_summed = CHECKSUM_UNNECESSARY;
} | false | false | false | false | false | 0 |
get_at_vfunc(int row, int column)
{
BaseClassType *const base = static_cast<BaseClassType*>(
g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
) ... | false | false | false | false | false | 0 |
get_mem_cgroup_from_mm(struct mm_struct *mm)
{
struct mem_cgroup *memcg = NULL;
rcu_read_lock();
do {
/*
* Page cache insertions can happen withou an
* actual mm context, e.g. during disk probing
* on boot, loopback IO, acct() writes etc.
*/
if (unlikely(!mm))
memcg = root_mem_cgroup;
else {
... | false | false | false | false | false | 0 |
tracker_sparql_pattern_set_location (TrackerSparqlPattern* self, TrackerSourceLocation* location) {
TrackerSparqlQuery* _tmp0_ = NULL;
TrackerSourceLocation _tmp1_ = {0};
#line 211 "/home/martyn/Source/checkout/gnome/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
g_return_if_fail (self != NULL);
#line 211 ... | false | false | false | false | false | 0 |
rows()
{
int n = 0;
if (_data)
n = _data->_model.size();
return n;
} | false | false | false | false | false | 0 |
bk_mul(S,w,v)
struct linsys *S;
REAL *w; /* in */
REAL *v; /* out */
{ int row,col,i;
PROF_START(hessian_mul);
memset((char*)v,0,S->N*sizeof(REAL));
for ( row = 0 ; row < S->N ; row++ )
{ for ( i = S->IA[row]-A_OFF ; i < S->IA[row+1]-A_OFF ; i++ )
{ col = S->JA[i] - A_OFF;
v[row] += S->A[i]*w[col]... | false | false | false | false | false | 0 |
xdef_flag(char *id, char *flag)
{
char *value = XGetDefault(display, progname, id);
if (value != 0) {
if (strcmp(value, "off") == 0 ||
strcmp(value, "false") == 0)
*flag = 0;
else
*flag = 1;
}
} | false | false | false | false | false | 0 |
L13()
{register object *base=vs_base;
register object *sup=base+VM13; VC13
vs_check;
{object V38;
object V39;
V38=(base[0]);
V39=(base[1]);
vs_top=sup;
goto TTL;
TTL:;
{object V40;
V40= ((V39))->v.v_self[(long)33];
base[2]= CMPcar((V40));
base[3]= elt((V39),(long)36);
base[4]= (V38);
base[5]= CMPcdr((V40)... | false | false | false | false | false | 0 |
rolled_over(__u32 c0, __u32 c1)
{
return (c0 >> 25) == 127 &&
(c1 >> 25) == 0 &&
(c0 >> 12 & 0x1fff) > 8000 - 3 &&
(c1 >> 12 & 0x1fff) < 0000 + 3;
} | false | false | false | false | false | 0 |
getxnode (p)
nodeptr p;
/* Ensure that internal node p has memory */
{ /* getxnode */
nodeptr s;
if (! (p->x)) { /* Move likelihood array on this node to sector p */
if ((s = p->next)->x || (s = s->next)->x) {
p->x = s->x;
s->x = (xarray *) NULL;
}
... | false | false | false | false | false | 0 |
print_dda_head(FILE *fp,
Module_table *mpt)
{
fputs("\n% data dependence data\n",fp);
fputs("dda ",fp);
switch(mpt->kind){
case MODULE_MAIN :
fputs("main ",fp);
break;
case MODULE_FUNC :
fprintf(fp, "F%d ",mpt->entry);
break;
cas... | false | false | false | false | false | 0 |
QRinput_encodeModeAn(QRinput_List *entry, int version)
{
int words, i, ret;
unsigned int val;
words = entry->size / 2;
entry->bstream = BitStream_new();
if(entry->bstream == NULL) return -1;
val = 0x2;
ret = BitStream_appendNum(entry->bstream, 4, val);
if(ret < 0) goto ABORT;
val = entry->size;
ret = BitS... | false | false | false | false | false | 0 |
createShape()
{
b2PolygonShape* shape = new b2PolygonShape;
shape->SetAsBox(
m_rect.width() * Kolf::Box2DScaleFactor / 2,
m_rect.height() * Kolf::Box2DScaleFactor / 2,
toB2Vec2(m_rect.center() * Kolf::Box2DScaleFactor),
0 //intrinsic rotation angle
);
return shape;
} | false | false | false | false | false | 0 |
reduce (mp_ptr tp, mp_srcptr ap, mp_size_t an, mp_srcptr mp, mp_size_t mn)
{
mp_ptr qp;
TMP_DECL;
TMP_MARK;
qp = TMP_ALLOC_LIMBS (an - mn + 1);
mpn_tdiv_qr (qp, tp, 0L, ap, an, mp, mn);
TMP_FREE;
} | false | false | false | false | false | 0 |
read_g3d_vol(IFLAG type, void *map, void *data)
{
int x, y, z;
switch (type) {
/* float data type */
case (VOL_DTYPE_FLOAT):
for (x = 0; x < Cols; x++) {
for (y = 0; y < Rows; y++) {
for (z = 0; z < Depths; z++) {
((float *)data)[x + y * Cols + z * Rows * Cols] =
G3d_getFloat(map, x, y, z... | false | false | false | false | false | 0 |
xml_get_element(XMLFile *file)
{
gchar *str;
gchar *new_str;
gchar *end;
while ((end = strchr(file->bufp, '<')) == NULL)
if (xml_read_line(file) < 0) return NULL;
if (end == file->bufp)
return NULL;
str = g_strndup(file->bufp, end - file->bufp);
/* this is not XML1.0 strict */
g_strstrip(str);
xml_unesc... | 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.