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 |
|---|---|---|---|---|---|---|
readFromStream(mrpt::utils::CStream &in,int version)
{
switch(version)
{
case 0:
case 1:
{
readFromStreamRender(in);
in >> m_radius;
uint32_t i,j;
in >> i >> j;
m_nDivsLongitude = i;
m_nDivsLatitude = j;
if (version>=1)
in >> m_keepRadiusIndependentEyeDistance;
else m_keepRadiusIndep... | false | false | false | false | false | 0 |
i915_guc_client_info(struct seq_file *m,
struct drm_i915_private *dev_priv,
struct i915_guc_client *client)
{
struct intel_engine_cs *engine;
uint64_t tot = 0;
seq_printf(m, "\tPriority %d, GuC ctx index: %u, PD offset 0x%x\n",
client->priority, client->ctx_index, client->proc_desc_offset);
seq_printf(... | false | false | false | false | false | 0 |
settingsToCSS() const
{
// lets start with the link properties
QString str = "a:link {\ncolor: ";
str += d->m_linkColor.name();
str += ';';
if(d->m_underlineLink)
str += "\ntext-decoration: underline;";
if( d->m_bChangeCursor )
{
str += "\ncursor: pointer;";
str += "... | false | false | false | false | false | 0 |
ParseAsEplf(CLine *pLine, CDirentry &entry)
{
CToken token;
if (!pLine->GetToken(0, token, true))
return false;
if (token[0] != '+')
return false;
int pos = token.Find('\t');
if (pos == -1 || static_cast<size_t>(pos) == (token.GetLength() - 1))
return false;
entry.name = token.GetString().Mid(pos + 1);
... | false | false | false | false | false | 0 |
CompareLinCtStereoDble ( AT_STEREO_DBLE *LinearCTStereoDble1, int nLenLinearCTStereoDble1,
AT_STEREO_DBLE *LinearCTStereoDble2, int nLenLinearCTStereoDble2 )
{
int i, num, ret = 0;
/* compare double bonds */
if ( LinearCTStereoDble1 && LinearCTStereoDble2 ) {
num = inch... | false | false | false | false | false | 0 |
gawsym (struct gacmn *pcm) {
struct gastn *stn;
struct garpt *rpt;
gadouble rlon,x,y,scl;
gaint i;
gamscl (pcm); /* Do map level scaling */
gawmap (pcm, 1); /* Draw map */
pcm->xdim = 0; pcm->ydim = 1;
gafram (pcm);
gxclip (pcm->xsiz1, pcm->xsiz2, pcm->ysiz1, pcm->ysiz2);
stn = pcm->result[0].stn... | false | false | false | false | true | 1 |
wnck_task_close_all (GtkMenuItem *menu_item,
gpointer data)
{
WnckTask *task = WNCK_TASK (data);
GList *l;
l = task->windows;
while (l)
{
WnckTask *child = WNCK_TASK (l->data);
wnck_window_close (child->window, gtk_get_current_event_time ());
l = l->next;
}
} | false | false | false | false | false | 0 |
readKeywordValue(char* line_buffer, char* keyword, char* buffer, int buffer_len)
{
int strm_buf_len = strlen(line_buffer);
char* strm_buf = new char[1 + strm_buf_len];
strstream strm(strm_buf, 1 + strm_buf_len, ios::app);
strm << line_buffer << ends;
// Work buffer
char* work_buf = new char[1 + strm_buf_l... | false | false | false | false | false | 0 |
recomputeDisplaySegments(ocw)
OverTheSpotConversionWidget ocw;
{
int nseg = ocw->overthespot.numsegments;
DisplaySegment *dseg;
DisplayLocation disploc;
int i;
ocw->overthespot.overflowcanvas = NULL;
disploc.x = disploc.y = 0;
if (ocw->overthespot.canvaslist == NULL) {
ocw->overthespot.ca... | false | false | false | false | false | 0 |
stratum_get_version(struct stratum_ctx *sctx, json_t *id)
{
char *s;
json_t *val;
bool ret;
if (!id || json_is_null(id))
return false;
val = json_object();
json_object_set(val, "id", id);
json_object_set_new(val, "error", json_null());
json_object_set_new(val, "result", json_string(USER_AGENT));
s = json_... | false | false | false | false | false | 0 |
maybeMoreSiblings1(const ParentChunk *chunk) const
{
for (const ParentChunk *open = origin_; open; open = open->origin)
if (open == chunk)
return 1;
// for multi-thread case
return tailPtr_ == &chunk->nextSibling || chunk->nextSibling != 0;
} | false | false | false | false | false | 0 |
subfunc (uae_u8 *data, int cnt)
{
if (!issub ())
return;
uae_sem_wait (&sub_sem);
#ifdef CDTV_SUB_DEBUG
int total = 0;
for (int i = 0; i < MAX_SUBCODEBUFFER; i++) {
if (subcodebufferinuse[i])
total++;
}
write_log (_T("%d "), total);
#endif
if (subcodebufferinuse[subcodebufferoffsetw]) {
memset (subcodeb... | false | false | false | false | false | 0 |
randseed_lc (gmp_randstate_t rstate, mpz_srcptr seed)
{
gmp_rand_lc_struct *p = (gmp_rand_lc_struct *) RNG_STATE (rstate);
mpz_ptr seedz = p->_mp_seed;
mp_size_t seedn = BITS_TO_LIMBS (p->_mp_m2exp);
/* Store p->_mp_seed as an unnormalized integer with size enough
for numbers up to 2^m2exp-1. That size c... | false | false | false | false | false | 0 |
printGrainDiamDist(const string& filename,double base,int cum)
{
cout << "Graph::printGrainDiamDist( " << filename << " " << base << " " << cum << " )" << std::endl;
// get masses and min/max
vector<double> pmv(ccnt-1,0);
for(map<int,int>::iterator iter=cid.begin();
iter!=cid.end();
iter++){
int... | false | false | false | false | false | 0 |
BuildIntrinsicOp(unsigned IID, SDValue Op0, SDValue Op1,
SDValue Op2, SelectionDAG &DAG,
DebugLoc dl, EVT DestVT = MVT::Other) {
if (DestVT == MVT::Other) DestVT = Op0.getValueType();
return DAG.getNode(ISD::INTRINSIC_WO_CHAIN, dl, DestVT,
... | false | false | false | false | false | 0 |
M_SafeFilePath(const char *basepath, const char *newcomponent)
{
int newstrlen = 0;
char *newstr = NULL;
if (!strcmp(basepath, ""))
{
basepath = ".";
}
// Always throw in a slash. M_NormalizeSlashes will remove it in the case
// that either basepath or newcomponent inc... | false | false | false | false | false | 0 |
SetErrorStatus(int status) {
// Tell the watchers an error has occurred.
for (std::vector<WatcherWithUserData>::iterator it = watchers.begin(); it != watchers.end(); ++it) {
it->watcher->NotifyErrorOccurred(this, it->userData, status);
}
} | false | false | false | false | false | 0 |
processData(CUnit* unit)
{
CPacket& packet = unit->m_Packet;
// Just heard from the peer, reset the expiration count.
m_iEXPCount = 1;
uint64_t currtime;
CTimer::rdtsc(currtime);
m_ullLastRspTime = currtime;
m_pCC->onPktReceived(&packet);
++ m_iPktCount;
// update time information
m_pRcv... | false | false | false | false | false | 0 |
cd_sensor_huey_get_sample_state_finish (CdSensorAsyncState *state,
const GError *error)
{
/* set result to temp memory location */
if (state->ret) {
g_simple_async_result_set_op_res_gpointer (state->res,
state->sample,
(GDestroyNotify) cd_color_xyz_free);
} else {
g_simple_async_result_s... | false | false | false | false | false | 0 |
we_splugin_remove_cb(gpointer data, GtkButton *button)
{
GtkTreeView *view;
GtkTreeModel *model;
GtkTreeSelection *selection;
GtkTreeIter iter;
view = (GtkTreeView *) data;
selection = gtk_tree_view_get_selection(view);
if (gtk_tree_selection_get_selected(selection, &model, &iter)) {
g... | false | false | false | false | false | 0 |
gst_au_parse_src_event (GstPad * pad, GstEvent * event)
{
GstAuParse *auparse;
gboolean ret;
auparse = GST_AU_PARSE (gst_pad_get_parent (pad));
switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_SEEK:
ret = gst_au_parse_handle_seek (auparse, event);
break;
default:
ret = gst_pad_event_... | false | false | false | false | false | 0 |
GdipCreatePathGradientFromPath (GDIPCONST GpPath *path, GpPathGradient **polyGradient)
{
int i, count;
GpPathGradient *gp;
GpPointF *points;
/* this match MS GDI+ behaviour */
if (!path || (path->count < 2))
return OutOfMemory;
if (!polyGradient)
return InvalidParameter;
gp = gdip_pathgradient_new ();
Gdi... | false | false | false | false | false | 0 |
write_coord_array(FILE *file, int n_vert, REAL_D *coords,
int write_ascii)
{
REAL *tempxyz;
int i, j;
if(write_ascii) {
fprintf(file, "nodev %d\n", n_vert);
for(i = 0; i < n_vert; i++) {
for(j = 0; j < 3; j++) {
if(j < DIM_OF_WORLD)
fprintf(file, "%.10E ", coords[i][j]);
else
f... | false | false | false | false | false | 0 |
getRelocationInfo() const {
if (const GlobalValue *GV = dyn_cast<GlobalValue>(this)) {
if (GV->hasLocalLinkage() || GV->hasHiddenVisibility())
return LocalRelocation; // Local to this file/library.
return GlobalRelocations; // Global reference.
}
if (const BlockAddress *BA = dyn_cast<BlockAdd... | false | false | false | false | false | 0 |
precftn(int r, int t, int s)
{
int lp, lt, action;
lp = levprd[r];
lt = toklev[t];
if(PLEVEL(lt) == 0 || PLEVEL(lp) == 0) {
/* conflict */
if(foutput != 0)
Bprint(foutput,
"\n%d: shift/reduce conflict (shift %d(%d), red'n %d(%d)) on %s",
s, temp1[t], PLEVEL(lt), r, PLEVEL(lp), symnam(t));
zzsrcon... | false | false | false | false | false | 0 |
activateOverlapMode(int nonOverlapSize) {
m_nonOverlapSize=nonOverlapSize;
m_overlapMode=true;
if (parentDockWidget() && parentDockWidget()->parent()) {
kDebug(282)<<"K3DockContainer::activateOverlapMode: recalculating sizes";
K3DockSplitter *sp= qobject_cast<K3DockSplitter*>(parentDockWidget()->parent());
if ... | false | false | false | false | false | 0 |
qce_write_array(struct qce_device *qce, u32 offset,
const u32 *val, unsigned int len)
{
int i;
for (i = 0; i < len; i++)
qce_write(qce, offset + i * sizeof(u32), val[i]);
} | false | false | false | false | false | 0 |
wm_dac_vol_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{
struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
unsigned short oval, nval;
int i, idx, change = 0;
mutex_lock(&ice->gpio_mutex);
for (i = 0; i < 2; i++) {
nval = ucontrol->value.integer.value[i];
nval = (nval ? (nval +... | false | false | false | false | false | 0 |
cookDefault(ParseState *pstate,
Node *raw_default,
Oid atttypid,
int32 atttypmod,
char *attname)
{
Node *expr;
Assert(raw_default != NULL);
/*
* Transform raw parsetree to executable expression.
*/
expr = transformExpr(pstate, raw_default);
/*
* Make sure default expr does not refer to any ... | false | false | false | false | false | 0 |
load_gtg_and_gtd (float *data, GMT_LONG nx, GMT_LONG ny, double *xval, double *yval, double *pstuff, double *gtg, double *gtd, GMT_LONG n_model, float *weight, GMT_LONG weighted)
{
/* Routine to load the matrix G'G (gtg) and vector G'd (gtd)
for the normal equations. Routine uses indices i,j to refer
to the grid fi... | false | false | false | false | false | 0 |
runAction( const Context& context )
{
Vehicle* veh = getUnit();
MapField* fld = getMap()->getField( position );
switch ( operation ) {
case RegisterOnField:
if ( fld->getContainer() )
fld->getContainer()->addToCargo( veh );
else
fld->vehicle = veh;
... | false | false | false | false | false | 0 |
e_mail_signature_combo_box_refresh (EMailSignatureComboBox *combo_box)
{
ESourceRegistry *registry;
GtkComboBox *gtk_combo_box;
GtkTreeModel *tree_model;
GtkTreeIter iter;
ESource *source;
GList *list, *link;
const gchar *extension_name;
const gchar *saved_uid;
g_return_if_fail (E_IS_MAIL_SIGNATURE_COMBO_BOX ... | false | false | false | false | false | 0 |
csilver_adpcm_int(int data)
{
static int toggle =0;
toggle ^= 1;
if (toggle)
cpu_set_irq_line(2,M6502_IRQ_LINE,HOLD_LINE);
MSM5205_data_w (0,msm5205next>>4);
msm5205next<<=4;
} | false | false | false | false | false | 0 |
hda_reg_read_stereo_amp(struct hdac_device *codec,
unsigned int reg, unsigned int *val)
{
unsigned int left, right;
int err;
reg &= ~(AC_AMP_SET_LEFT | AC_AMP_SET_RIGHT);
err = snd_hdac_exec_verb(codec, reg | AC_AMP_GET_LEFT, 0, &left);
if (err < 0)
return err;
err = snd_hdac_exec_verb(codec, reg | AC_A... | false | false | false | false | false | 0 |
wtp_send_raw_xy_event(struct hidpp_device *hidpp,
struct hidpp_touchpad_raw_xy *raw)
{
struct wtp_data *wd = hidpp->private_data;
int i;
for (i = 0; i < 2; i++)
wtp_touch_event(wd, &(raw->fingers[i]));
if (raw->end_of_frame &&
!(hidpp->quirks & HIDPP_QUIRK_WTP_PHYSICAL_BUTTONS))
input_event(wd->input, ... | false | false | false | false | false | 0 |
Evaluate(Config &cfg) {
std::string profilename = (*this)["common"]["profile"];
if (profilename.empty()) {
profilename = "general";
}
if (Glib::file_test(profilename, Glib::FILE_TEST_EXISTS) == false) {
// If profilename does not contain directory separators and do not have xml suffix, then ... | false | false | false | false | false | 0 |
node_new(void *key, void *dat)
{
hb_node *node;
if ((node = (hb_node*)MALLOC(sizeof(*node))) == NULL)
return NULL;
node->key = key;
node->dat = dat;
node->parent = NULL;
node->llink = NULL;
node->rlink = NULL;
node->bal = 0;
return node;
} | false | false | false | false | false | 0 |
evas_common_convert_rgba_to_16bpp_bgr_565_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal)
{
DATA32 *src_ptr;
DATA16 *dst_ptr;
int x, y;
DATA8 r, g, b;
#ifndef BUILD_NO_DITHER_MASK
DATA8 dith, dith2;
#endif
dst_ptr = (DATA16 *)dst;
... | false | false | false | false | false | 0 |
MASQUERADE_parse(struct xt_option_call *cb)
{
const struct ip6t_entry *entry = cb->xt_entry;
struct nf_nat_range *r = cb->data;
int portok;
if (entry->ipv6.proto == IPPROTO_TCP ||
entry->ipv6.proto == IPPROTO_UDP ||
entry->ipv6.proto == IPPROTO_SCTP ||
entry->ipv6.proto == IPPROTO_DCCP ||
entry... | false | false | false | false | false | 0 |
debug_print_alpha(float ***alpha, CM_t *cm, int L)
{
int v, j, d, max_v;
printf("\nPrinting alpha matrix :\n");
printf("************************************\n");
max_v = cm->M-1;
if(cm->flags & CMH_LOCAL_BEGIN)
{
max_v = cm->M;
}
for(v = 0; v <= max_v; v++)
{
printf("===============... | false | false | false | false | false | 0 |
alarm_list_window_new (AlarmApplet *applet)
{
AlarmListWindow *list_window;
GtkBuilder *builder = applet->ui;
GtkTreeSelection *selection;
GtkTreeSortable *sortable;
// Initialize struct
list_window = g_new0 (AlarmListWindow, 1);
list_window->applet = applet;
// Widgets
list_window->window =... | false | false | false | false | false | 0 |
SVGGetNames(SplineFont *sf,xmlChar *g,xmlChar *utf8,SplineChar **sc) {
uint32 *u=NULL;
char *names;
int len, i, ch;
SplineChar *temp;
char *pt, *gpt;
*sc = NULL;
len = 0;
if ( utf8!=NULL ) {
#ifdef UNICHAR_16
u = utf82u32_copy((char *) utf8);
#else
u = utf82u_copy((char *) utf8);
#end... | false | false | false | false | false | 0 |
rest_xml_node_unref (RestXmlNode *node)
{
GList *l;
RestXmlNode *next = NULL;
g_return_if_fail (node);
g_return_if_fail (node->ref_count > 0);
/* Try and unref the chain, this is equivalent to being tail recursively
* unreffing the next pointer
*/
while (node && g_atomic_int_dec_and_test (&node->ref_... | false | false | false | false | false | 0 |
sbrand(csprng *rng)
{ /* Marsaglia & Zaman random number generator */
int i,k;
mr_unsign32 pdiff,t;
rng->rndptr++;
if (rng->rndptr<NK) return rng->ira[rng->rndptr];
rng->rndptr=0;
for (i=0,k=NK-NJ;i<NK;i++,k++)
{ /* calculate next NK values */
if (k==NK) k=0;
t=rng->ira[k];
... | false | false | false | false | false | 0 |
ion_client_create(struct ion_device *dev,
const char *name)
{
struct ion_client *client;
struct task_struct *task;
struct rb_node **p;
struct rb_node *parent = NULL;
struct ion_client *entry;
pid_t pid;
if (!name) {
pr_err("%s: Name cannot be null\n", __func__);
return ERR_PTR(-EINVAL);
}
get_ta... | false | false | false | false | false | 0 |
actionPlugins()
{
switch (containmentActionsSource) {
case Activity:
//FIXME
case Local:
return &localActionPlugins;
default:
return &globalActionPlugins;
}
}
} | false | false | false | false | false | 0 |
A_MinotaurDecide(mobj_t * actor)
{
angle_t angle;
mobj_t *target = actor->target;
int dist;
if (!target)
return;
dist = P_AproxDistance(actor->x - target->x, actor->y - target->y);
if (target->z + target->height > actor->z
&& target->z + target->height < actor->z + actor->heigh... | false | false | false | false | false | 0 |
iluErrorString(ILenum Error)
{
// Now we are dealing with Unicode strings.
if (Error == IL_NO_ERROR) {
return iluMiscErrors[0];
}
if (Error == IL_UNKNOWN_ERROR) {
return iluMiscErrors[1];
}
if (Error >= IL_INVALID_ENUM && Error <= IL_FILE_READ_ERROR) {
return (ILstring)iluErrors[Error - IL_INVALID_ENUM];
}... | false | false | false | false | false | 0 |
set(int changelist_number, uint32_t data) {
uint8_t* m = (uint8_t*)&data;
Address* n = this;
for(int i = 0; i < size_; i++) {
n = n->set8(changelist_number, m[i]);
}
return n;
} | false | false | false | false | false | 0 |
byteblock_to_float(const struct ByteBlock *input,
struct FloatBlock* output)
{
int size = TIMG_BLOCK_SIZE;
for (int32_t y=0;y<size;y++) {
for (int32_t x=0;x<size;x++) {
output->data[y][x] = (float)input->data[y][x];
}
}
} | false | false | false | false | false | 0 |
glade_gtk_message_dialog_image_determine_action (GtkMessageDialog * dialog,
const GValue * value,
GtkWidget ** image,
GladeWidget ** gimage)
{
GtkWidget *dialog_image = gt... | false | false | false | false | false | 0 |
parse_level_background(Level *l, xmlNodePtr cur) {
xmlChar *x;
x = xmlGetProp(cur, (const xmlChar *)"gfxid");
if(x != NULL)
l->background = level_get_svgseries_gfxid(l, atoi((char *)x));
} | false | false | false | false | false | 0 |
nm_setting_wired_add_s390_option (NMSettingWired *setting,
const char *key,
const char *value)
{
size_t value_len;
g_return_val_if_fail (NM_IS_SETTING_WIRED (setting), FALSE);
g_return_val_if_fail (key != NULL, FALSE);
g_return_v... | false | false | false | false | false | 0 |
deregister_entries_gisman2(char *pkg_short_name, char *gisbase)
{
char file[MAXSTR];
FILE *f_gisman2;
char str[MAXSTR];
/* check if entries-gisman2 exists and is readable */
sprintf(file, "%s/etc/gm/Xtns/%s.gem", gisbase, pkg_short_name);
f_gisman2 = fopen(file, "r");
if (f_gisman2 == NULL)... | true | true | false | false | true | 1 |
album_info_unref (AlbumInfo *album)
{
if (album == NULL)
return;
album->ref--;
if (album->ref == 0)
album_info_free (album);
} | false | false | false | false | false | 0 |
send( const HidMsg * msg )
{
if( !m_valid || !phin )
return FALSE;
// do send
return phin->send( msg );
} | false | false | false | false | false | 0 |
gtk_xtext_scrolldown_timeout(GtkXText * xtext)
{
int p_y, win_height;
gdk_window_get_pointer(GTK_WIDGET(xtext)->window, 0, &p_y, 0);
gdk_drawable_get_size(GTK_WIDGET(xtext)->window, 0, &win_height);
if (p_y > win_height && xtext->adj->value < (xtext->adj->upper - xtext->adj->page_size)) {
xtext->adj->value++;
... | false | false | false | false | false | 0 |
comm_checktimeouts(void *notused)
{
int i;
fde_t *F;
PF *hdl;
void *data;
for (i = 0; i < FD_HASH_SIZE; i++)
for (F = fd_hash[i]; F != NULL; F = fd_next_in_loop)
{
assert(F->flags.open);
fd_next_in_loop = F->hnext;
/* check flush functions */
if (F->flush_handler && F->flush_... | false | false | false | false | true | 1 |
flmCurSetSubQuery(
CURSOR * pCursor,
SUBQUERY * pSubQuery
)
{
RCODE rc = FERR_OK;
pCursor->pCurrSubQuery = pSubQuery;
// Do setup associated with a change of sub-queries.
f_memset( &pSubQuery->SQStatus, 0, sizeof( FCURSOR_SUBQUERY_STATUS));
pSubQuery->SQStatus.hDb = (HFDB)pCursor->pDb;
pSubQuery->SQStatu... | false | false | false | false | false | 0 |
acpi_bay_match(acpi_handle handle)
{
acpi_handle phandle;
if (!acpi_has_method(handle, "_EJ0"))
return false;
if (acpi_ata_match(handle))
return true;
if (ACPI_FAILURE(acpi_get_parent(handle, &phandle)))
return false;
return acpi_ata_match(phandle);
} | false | false | false | false | false | 0 |
JNU_SetFieldByName(JNIEnv *env,
jboolean *hasException,
jobject obj,
const char *name,
const char *signature,
...)
{
jclass cls;
jfieldID fid;
va_list args;
if ((*env)->EnsureLocalCapacity(env, 3) < 0)
... | false | false | false | false | false | 0 |
cmd_dnssd_enable_user_dir(
cmd_parms *cmd,
AVAHI_GCC_UNUSED void *mconfig,
int enable) {
struct global_config_data *d = GET_CONFIG_DATA(cmd->server);
const char *err;
if ((err = ap_check_cmd_context(cmd, GLOBAL_ONLY)))
return err;
d->user_dir = enable;
return NULL;
} | false | false | false | false | false | 0 |
is_ip_addr(const char *str, struct in_addr *addr)
{
struct in_addr a, *ap;
if (looks_like_ip_addr(str) && strchrcount(str, '.') == 3) {
if (addr == NULL)
ap = &a;
else
ap = addr;
if (inet_aton(str, ap) == 1)
return(1);
}
return(0);
} | false | false | false | false | false | 0 |
xfer_accept_compressed_file(Xfer *pXfer){
int szC; /* CSIZE */
int szU; /* USIZE */
int rid;
int srcid = 0;
Blob content;
int isPriv;
isPriv = pXfer->nextIsPrivate;
pXfer->nextIsPrivate = 0;
if( pXfer->nToken<4
|| pXfer->nToken>5
|| !blob_is_uuid(&pXfer->aToken[1])
|| !blob_is_int(&pX... | false | false | false | false | false | 0 |
rndis_indicate_status_msg(struct rndis_params *params, u32 status)
{
rndis_indicate_status_msg_type *resp;
rndis_resp_t *r;
if (params->state == RNDIS_UNINITIALIZED)
return -ENOTSUPP;
r = rndis_add_response(params, sizeof(rndis_indicate_status_msg_type));
if (!r)
return -ENOMEM;
resp = (rndis_indicate_statu... | false | false | false | false | false | 0 |
talloc_free(const void *ptr)
{
int saved_errno = errno, ret;
lock(ptr);
ret = _talloc_free(discard_const_p(void, ptr));
unlock();
if (ret == 0)
errno = saved_errno;
return ret;
} | false | true | false | false | false | 1 |
range_index(rangeobject *r, PyObject *ob)
{
int contains;
if (!PyLong_CheckExact(ob) && !PyBool_Check(ob)) {
Py_ssize_t index;
index = _PySequence_IterSearch((PyObject*)r, ob, PY_ITERSEARCH_INDEX);
if (index == -1)
return NULL;
return PyLong_FromSsize_t(index);
}... | false | false | false | false | false | 0 |
NC_vcpy( target, old, varid)
XDR *target ;
NC *old ;
int varid ;
{
NC_var **vpp ;
vpp = (NC_var **)old->vars->values ;
vpp += varid ;
if( !xdr_setpos(old->xdrs, (*vpp)->begin) )
{
NCadvise(NC_EXDR, "NC_vcpy: xdr_setpos") ;
return(FALSE) ;
}
return(NC_dcpy(target, old->xdrs, (*vp... | false | false | false | false | false | 0 |
fs_hash_table_lookup_extended(fs_hash_table *hash_table,
const void * lookup_key, void * *orig_key, void * *value) {
unsigned int node_index;
unsigned int node_hash;
g_return_val_if_fail(hash_table != NULL, FALSE);
node_index = fs_hash_table_lookup_node(hash_table, lookup_key, &node_hash);
... | false | false | false | false | false | 0 |
WriteLatexSubInclude(Include inc,int depth)
{
while(inc)
{
if(countlines++%8==4)
fprintf(of,"\\cxreftabbreak{cxreftabi}\n");
fprintf(of,"\\hspace*{%3.1fin}",0.2*depth);
if(inc->scope==LOCAL)
fprintf(of,"{\\stt \\#include \"%s\"} &\\cxreffile{%s}\\\\\n",latex(inc->name,0),inc->name);
... | false | false | false | false | false | 0 |
bin_search(int *s, int len, int key)
{
int low;
int mid;
int high;
low = 0;
high = len - 1;
while (low <= high) {
mid = low + (high - low) / 2;
if (s[mid] == key) {
return mid;
} else if (s[mid] < key) {
low = mid + 1;
} else {
... | false | false | false | false | false | 0 |
amdgpu_gart_table_vram_pin(struct amdgpu_device *adev)
{
uint64_t gpu_addr;
int r;
r = amdgpu_bo_reserve(adev->gart.robj, false);
if (unlikely(r != 0))
return r;
r = amdgpu_bo_pin(adev->gart.robj,
AMDGPU_GEM_DOMAIN_VRAM, &gpu_addr);
if (r) {
amdgpu_bo_unreserve(adev->gart.robj);
return r;
}
r = amdgp... | false | false | false | false | false | 0 |
compute_w (FttCell * c, GfsVariable * W)
{
FttCell * n;
guint level = ftt_cell_level (c);
gdouble wf = 0., w = 0.;
while ((n = ftt_cell_neighbor (c, FTT_BACK)))
c = n;
while (c) {
GfsStateVector * s = GFS_STATE (c);
g_assert (FTT_CELL_IS_LEAF (c) && ftt_cell_level (c) == level);
s->f[FTT_BAC... | false | false | false | false | false | 0 |
gnc_tree_model_price_iter_parent (GtkTreeModel *tree_model,
GtkTreeIter *iter,
GtkTreeIter *child)
{
GncTreeModelPrice *model;
GncTreeModelPricePrivate *priv;
gnc_commodity_table *ct;
gnc_commodity * commodity;
gnc_commodity_namespa... | false | false | false | false | false | 0 |
create_empty_lvol(struct ubi_device *ubi,
struct ubi_attach_info *ai)
{
int i;
struct ubi_vtbl_record *vtbl;
vtbl = vzalloc(ubi->vtbl_size);
if (!vtbl)
return ERR_PTR(-ENOMEM);
for (i = 0; i < ubi->vtbl_slots; i++)
memcpy(&vtbl[i], &empty_vtbl_record, UBI_VTBL_RECORD_SIZE);
for (i = 0; i < UBI_LAYOU... | false | false | false | false | false | 0 |
read_smc(u8 cmd, const char *key, u8 *buffer, u8 len)
{
u8 status, data = 0;
int i;
if (send_command(cmd) || send_argument(key)) {
pr_warn("%.4s: read arg fail\n", key);
return -EIO;
}
/* This has no effect on newer (2012) SMCs */
if (send_byte(len, APPLESMC_DATA_PORT)) {
pr_warn("%.4s: read len fail\n", ... | false | false | false | false | false | 0 |
brcmf_set_mpc(struct brcmf_if *ifp, int mpc)
{
s32 err = 0;
if (check_vif_up(ifp->vif)) {
err = brcmf_fil_iovar_int_set(ifp, "mpc", mpc);
if (err) {
brcmf_err("fail to set mpc\n");
return;
}
brcmf_dbg(INFO, "MPC : %d\n", mpc);
}
} | false | false | false | false | false | 0 |
frame_line(double x2, double y2, sides s) {
// straightforward line drawing of one frame line
switch (s) {
case left_side:
cout << "Left: ";
break;
case right_side:
cout << "Right: ";
break;
case top_side:
cout << "Top: ";
break;
case bottom_side:
cout << "Bottom: ";
bre... | false | false | false | false | false | 0 |
fors_remove_overscan(cpl_image * image, cpl_propertylist * header)
{
/* const char *func = "mos_remove_bias";
cpl_image *unbiased;
cpl_image *overscan;
double mean_bias_level;
double mean_overscans_level;
int count;
int nrows;
int xlow, ylow, xhig, yhig;
*/
... | false | false | false | false | false | 0 |
printElement(DCM_ELEMENT * element)
{
switch (element->representation) {
case DCM_AS: /* Age string */
case DCM_CS: /* control string */
case DCM_DA: /* Date */
case DCM_DS: /* Decimal string */
case DCM_IS: /* Integer string */
case DCM_LO: /* Long string */
case DCM_LT: /* Long text */
case DCM_ST:... | false | false | false | false | false | 0 |
operator=(const ClpLinearObjective& rhs)
{
if (this != &rhs) {
ClpObjective::operator=(rhs);
numberColumns_ = rhs.numberColumns_;
delete [] objective_;
objective_ = CoinCopyOfArray(rhs.objective_, numberColumns_);
}
return *this;
} | false | false | false | false | false | 0 |
main_window_build_tools_finalize (MainWindowBuildTools* obj) {
MainWindowBuildTools * self;
self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_MAIN_WINDOW_BUILD_TOOLS, MainWindowBuildTools);
_g_object_unref0 (self->priv->_ui_manager);
_g_object_unref0 (self->priv->_build_view);
_g_object_unref0 (self->priv->_bottom_pane... | false | false | false | false | false | 0 |
ges_pipeline_preview_set_video_sink (GESPipeline * self, GstElement * sink)
{
g_return_if_fail (GES_IS_PIPELINE (self));
g_object_set (self->priv->playsink, "video-sink", sink, NULL);
} | false | false | false | false | false | 0 |
category_load_csv(gchar *filename, gchar **error)
{
gboolean retval;
GIOChannel *io;
gchar *tmpstr;
gint io_stat;
gchar **str_array;
gchar *lastcatname = NULL;
gchar *fullcatname;
GError *err = NULL;
Category *item;
gint type = 0;
const gchar *encoding;
encoding = homebank_file_getencoding(filename);
DB( g_print(... | false | false | false | false | false | 0 |
sp_inodelk_helper (call_frame_t *frame, xlator_t *this, const char *volume,
loc_t *loc, int32_t cmd, struct gf_flock *lock)
{
uint64_t value = 0;
sp_inode_ctx_t *inode_ctx = NULL;
int32_t ret = 0, op_ret = -1, op_errno = EINVAL;
GF_ASSERT (fra... | false | false | false | true | false | 1 |
outfile_redirect (PRN *prn, FILE *fp, gretlopt opt,
int *parms)
{
if (opt & OPT_Q) {
parms[0] = gretl_echo_on();
parms[1] = gretl_messages_on();
set_gretl_echo(0);
set_gretl_messages(0);
} else {
parms[0] = parms[1] = -1;
}
print_start_redirection(prn, fp);
} | false | false | false | false | false | 0 |
header_reset(header_t *o)
{
header_check(o);
if (o->headers != NULL) {
htable_foreach_remove(o->headers, free_header_data, NULL);
htable_free_null(&o->headers);
}
slist_free_all(&o->fields, cast_to_free_fn(hfield_free));
o->flags = o->size = o->num_lines = 0;
} | false | false | false | false | false | 0 |
toeplitz_solve (double *g, double *y, int T, int q)
{
double **mu;
int t, j, k, jmax;
mu = doubles_array_new(q+1, T);
if (mu == NULL) {
return E_ALLOC;
}
/* initialize */
for (t=0; t<q; t++) {
for (j=t+1; j<=q; j++) {
mu[j][t] = 0.0;
}
}
/* factorize */
for (t=0; t<T; ... | false | false | false | false | false | 0 |
soup_message_headers_get_one (SoupMessageHeaders *hdrs, const char *name)
{
SoupHeader *hdr_array = (SoupHeader *)(hdrs->array->data);
guint hdr_length = hdrs->array->len;
int index;
g_return_val_if_fail (name != NULL, NULL);
name = intern_header_name (name, NULL);
index = find_last_header (hdr_array, hdr_leng... | false | false | false | false | false | 0 |
AllowRegistration(const QSharedPointer<ISender> &,
const PublicIdentity &ident)
{
return !EnableLogOffMonitor || !_log_off_time.contains(ident.GetId());
} | false | false | false | false | false | 0 |
next_available_multiplier()
{
int i;
for (i = 0; i < MAX_MULTIPLIERS; i++)
if (!Multipliers[i]) {
Multipliers[i] = TRUE;
return i;
}
fatal_error("next_available_multiplier, none available (infinite loop?).");
return -1; /* to quiet compiler */
} | false | false | false | false | false | 0 |
decode_keychange(const oid * hashtype, u_int hashtype_len,
u_char * oldkey, size_t oldkey_len,
u_char * kcstring, size_t kcstring_len,
u_char * newkey, size_t * newkey_len)
#if defined(NETSNMP_USE_OPENSSL) || defined(NETSNMP_USE_INTERNAL_MD5) || defined(NETSNMP_USE_PKC... | false | true | false | false | false | 1 |
compare_open_files(gconstpointer a, gconstpointer b)
{
const glibtop_open_files_entry *o1 = static_cast<const glibtop_open_files_entry *>(a);
const glibtop_open_files_entry *o2 = static_cast<const glibtop_open_files_entry *>(b);
/* Falta manejar los diferentes tipos! */
return (o1->fd == o2->fd) && (o1... | false | false | false | false | false | 0 |
OTF_RBuffer_testChar( OTF_RBuffer* rbuffer, char c ) {
OTF_RBuffer_skipSpaces( rbuffer );
/* only advance the buffer position if the right character is found */
if ( ( rbuffer->pos < rbuffer->end ) &&
( c == rbuffer->buffer[rbuffer->pos] ) ) {
++(rbuffer->pos);
return 1;
}
return 0;
} | false | false | false | false | false | 0 |
qla4xxx_free_adapter(struct scsi_qla_host *ha)
{
qla4xxx_abort_active_cmds(ha, DID_NO_CONNECT << 16);
/* Turn-off interrupts on the card. */
ha->isp_ops->disable_intrs(ha);
if (is_qla40XX(ha)) {
writel(set_rmask(CSR_SCSI_PROCESSOR_INTR),
&ha->reg->ctrl_status);
readl(&ha->reg->ctrl_status);
} else i... | false | false | false | false | false | 0 |
auto_filler_list (char **list, int prio, gboolean with_number)
{
AutoFillerList *res = g_new (AutoFillerList, 1);
res->filler.status = AFS_INCOMPLETE;
res->filler.priority = prio;
res->filler.finalize = afl_finalize;
res->filler.teach_cell = afl_teach_cell;
res->filler.set_cell = afl_set_cell;
res->filler.hint ... | false | false | false | false | false | 0 |
cselib_preserve_cfa_base_value (cselib_val *v, unsigned int regno)
{
if (cselib_preserve_constants
&& v->locs
&& REG_P (v->locs->loc))
{
cfa_base_preserved_val = v;
cfa_base_preserved_regno = regno;
}
} | false | false | false | false | false | 0 |
canHandleRequest(const WorkQueue::Request* req, const WorkQueue* srcQ)
{
LoadRequest lreq = any_cast<LoadRequest>(req->getData());
// only deal with own requests
if (lreq.origin != this)
return false;
else
return RequestHandler::canHandleRequest(req, srcQ);
... | false | false | false | false | false | 0 |
main(int argc, char* argv[])
{
try
{
log_init();
cxxtools::Arg<std::string> ip(argc, argv, 'i');
cxxtools::Arg<bool> binary(argc, argv, 'b');
cxxtools::Arg<bool> json(argc, argv, 'j');
cxxtools::Arg<bool> jsonhttp(argc, argv, 'J');
cxxtools::Arg<unsigned short> port(argc, argv, 'p', binary ... | false | false | false | false | false | 0 |
init_addba_retry_timer(struct adapter *padapter, struct sta_info *psta)
{
setup_timer(&psta->addba_retry_timer, addba_timer_hdl,
(unsigned long)psta);
} | 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.