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 |
|---|---|---|---|---|---|---|
bfa_tskim_send_abort(struct bfa_tskim_s *tskim)
{
struct bfa_itnim_s *itnim = tskim->itnim;
struct bfi_tskim_abortreq_s *m;
/*
* check for room in queue to send request now
*/
m = bfa_reqq_next(tskim->bfa, itnim->reqq);
if (!m)
return BFA_FALSE;
/*
* build i/o request message next
*/
bfi_h2i_set(m->m... | false | false | false | false | false | 0 |
expand_bahe_ui_internal(TreeNode *x, int pos)
{
TreeNode *nn, *y, *nz, *z, *c;
int n, i, j, n_ui, n_b, ui_start;
y = x->data.nonterm.children[pos];
if (y->type == N_NONTERM) {
n = y->data.nonterm.nchildren;
for (i=0; i<n; i++) {
expand_bahe_ui_internal(y, i);
}
} else {
if (y->bahe || ... | false | false | false | false | false | 0 |
nfs3_fh_resolve_found_parent (nfs3_call_state_t *cs, gf_dirent_t *candidate)
{
int ret = 0;
nfs_user_t nfu = {0, };
uuid_t gfid = {0, };
if ((!cs) || (!candidate))
return -EFAULT;
uuid_copy (gfid, cs->resolvedloc.inode->gfid);
n... | false | false | false | false | false | 0 |
clutter_text_select_line (ClutterText *self)
{
ClutterTextPrivate *priv = self->priv;
gint cursor_pos = priv->position;
gint start_pos, end_pos;
if (priv->single_line_mode)
{
start_pos = 0;
end_pos = -1;
}
else
{
start_pos = clutter_text_move_line_start (self, cursor_pos);
... | false | false | false | false | false | 0 |
HandleSignal(int signum)
{
if (signum != SIGCHLD)
{
snprintf(OUTPUT,CF_BUFSIZE*2,"Received signal %d (%s) while doing [%s]",signum,SIGNALS[signum],CFLOCK);
Chop(OUTPUT);
CfLog(cferror,OUTPUT,"");
snprintf(OUTPUT,CF_BUFSIZE*2,"Logical start time %s ",ctime(&CFSTARTTIME));
Chop(OUTPUT);
CfLog(cferr... | false | false | false | false | false | 0 |
put_forward_diag(ull *board_l, ull *board_u, ushort stream, int diag)
{
int len = GET_FDIAG_LEN(diag);
int i;
ull *board;
int pos=diag;
ushort mask = 0x1;
for (i=0; i<len; i++)
{
if (pos > 49)
board = board_u;
else
board = board_l;
*board |= ((ull) (stream & mask ) << (pos... | false | false | false | false | false | 0 |
list2proftime(arg, tm)
typval_T *arg;
proftime_T *tm;
{
long n1, n2;
int error = FALSE;
if (arg->v_type != VAR_LIST || arg->vval.v_list == NULL
|| arg->vval.v_list->lv_len != 2)
return FAIL;
n1 = list_find_nr(arg->vval.v_list, 0L, &error);
n2 = list_find_nr(arg->vval.v_list, 1L,... | false | false | false | false | false | 0 |
doDefineUnit()
{
Location loc(in_->currentLocation());
Token tok;
if (!getToken(allowIdentifier, tok))
return 0;
Unit *unit = interp_->lookupUnit(currentToken_);
Owner<Expression> expr;
Identifier::SyntacticKey key;
if (!parseExpression(0, expr, key, tok))
return 0;
if (!getToken(allowCloseParen... | false | false | false | false | false | 0 |
on_key( struct SCNotification* nt,
ScintillaObject* scintilla,
presage_t presage )
{
g_print("on_key()\n");
g_print("key: %i\n", nt->ch);
if (glob_function_keys_mode)
{
uptr_t completion_active;
completion_active = scintilla_send_message (scintilla,
SCI_AUTOCACTIVE,
... | false | false | false | false | false | 0 |
_load_ipv4(netsnmp_container* container, u_long *index )
{
FILE *in;
char line[256];
netsnmp_route_entry *entry = NULL;
char name[16];
int fd;
DEBUGMSGTL(("access:route:container",
"route_container_arch_load ipv4\n"));
netsnmp_ass... | false | false | false | false | false | 0 |
make_stack_label (char *label, char *s)
{
char *p = strstr(s, "--");
int len = strlen(s);
if (p == NULL) {
if (len > MAXLABEL - 1) {
strncat(label, s, MAXLABEL - 4);
strcat(label, "...");
} else {
strcat(label, s);
}
} else {
int llen = strlen(p);
char *q = strstr(p + 2, "--");
int... | false | true | false | false | false | 1 |
xmlInternalSchemaEntityLoader(const char *URL, const char *ID,
xmlParserCtxtPtr context)
{
if (streq(URL, (const char *) NS_SAML_11))
return(xmlNewStringInputStream(context,
oasis_sstc_saml_schema_assertion_1_1));
else if (streq(URL, (const char *) URL_DSIG)
|| streq(URL, (const char *) ... | false | false | false | false | false | 0 |
shoot(HepRandomEngine* anEngine, double mean) {
if ( mean < RandPoissonQ::tableBoundary() ) {
return RandPoissonQ::shoot ( anEngine, mean );
} else {
return RandPoisson::shoot( anEngine, mean );
}
} | false | false | false | false | false | 0 |
ttm_bo_swapout_all(struct ttm_bo_device *bdev)
{
while (ttm_bo_swapout(&bdev->glob->shrink) == 0)
;
} | false | false | false | false | false | 0 |
perm_stringlist_to_permlist (GSList *strlist)
{
GSList *list = NULL, *iter;
for (iter = strlist; iter; iter = g_slist_next (iter)) {
Permission *p;
p = permission_new_from_str ((const char *) iter->data);
if (p)
list = g_slist_append (list, p);
}
return list;
} | false | false | false | false | false | 0 |
read_igmp(struct ma_info **result_p)
{
struct ma_info m;
char buf[256];
FILE *fp = fopen("/proc/net/igmp", "r");
if (!fp)
return;
memset(&m, 0, sizeof(m));
if (!fgets(buf, sizeof(buf), fp)) {
fclose(fp);
return;
}
m.addr.family = AF_INET;
m.addr.bitlen = 32;
m.addr.bytelen = 4;
while (fgets(buf, siz... | true | true | false | false | true | 1 |
observationsOverlap(
const mrpt::obs::CObservation* o1,
const mrpt::obs::CObservation* o2,
const mrpt::poses::CPose3D *pose_o2_wrt_o1 )
{
if (IS_CLASS(o1,CObservation2DRangeScan) && IS_CLASS(o2,CObservation2DRangeScan))
{
const CObservation2DRangeScan *this_obs = static_cast<const CObservation2DRangeScan *>(o1);... | false | false | false | false | false | 0 |
test_just_vertex_shader (void)
{
TestState state;
cogl_framebuffer_orthographic (test_fb,
0, 0,
cogl_framebuffer_get_width (test_fb),
cogl_framebuffer_get_height (test_fb),
-1,
... | false | false | false | false | false | 0 |
bus_driver_send_service_owner_changed (const char *service_name,
const char *old_owner,
const char *new_owner,
BusTransaction *transaction,
DBusError *error)
{
DBusMessage *message;
dbus_bool_t retval;
const char *null_service;
_DBUS_ASSERT_ERROR_IS_... | false | false | false | false | false | 0 |
dm_get_rq_mapinfo(struct request *rq)
{
if (rq && rq->end_io_data)
return &((struct dm_rq_target_io *)rq->end_io_data)->info;
return NULL;
} | false | false | false | false | false | 0 |
freelaunchlist(list, max)
lsparse_t *list;
int max;
{
int i;
if (list) for (i = 0; i < max; i++) freelaunch(&(list[i]));
} | false | false | false | false | false | 0 |
_swrast_update_specular_vertex_add(struct gl_context *ctx)
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
GLboolean separateSpecular = ctx->Fog.ColorSumEnabled ||
(ctx->Light.Enabled &&
ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR);
swrast->SpecularVertexAdd = (separateSpecular
... | false | false | false | false | false | 0 |
backsql_operational_entryUUID( backsql_info *bi, backsql_entryID *id )
{
int rc;
struct berval val, nval;
AttributeDescription *desc = slap_schema.si_ad_entryUUID;
Attribute *a;
backsql_entryUUID( bi, id, &val, NULL );
rc = (*desc->ad_type->sat_equality->smr_normalize)(
SLAP_MR_VALUE_OF_ATTRIBUTE_SYNTAX,... | false | false | false | false | false | 0 |
Clone() const
{
return new CHashingEvent(GetEventType(), m_result, m_owner);
} | false | false | false | false | false | 0 |
update_secretion_grid ( void )
{
int16_t cur_x, cur_y;
double ** new_secretion = new double*[_grid_width];
for ( int16_t x = 0 ; x < _grid_width ; x++ )
{
new_secretion[x] = new double[_grid_height];
for ( int16_t y = 0 ; y < _grid_height ; y++ )
{
new_secretion[x][y] = _pop_grid[x][y]->ge... | false | false | false | false | false | 0 |
gsb_form_scheduler_recover_splits_of_transaction ( gint scheduled_transaction,
gint transaction_number )
{
GSList *tmp_list;
/* first clone the transactions */
gsb_transactions_list_splitted_to_scheduled (transaction_number, scheduled_transaction);
/* add the children to the list */
tmp... | false | false | false | false | false | 0 |
sci_controller_process_completions(struct isci_host *ihost)
{
u32 completion_count = 0;
u32 ent;
u32 get_index;
u32 get_cycle;
u32 event_get;
u32 event_cycle;
dev_dbg(&ihost->pdev->dev,
"%s: completion queue beginning get:0x%08x\n",
__func__,
ihost->completion_queue_get);
/* Get the component parts of t... | false | false | false | false | false | 0 |
center_limited_gradient (FttCell * cell,
FttComponent c,
guint v,
gdouble (* limiter) (gdouble))
{
FttDirection d = 2*c;
FttCellFace f1;
gdouble v0;
f1 = gfs_cell_face (cell, FTT_OPPOSITE_DIRECTION (d));
v0 = GFS_VARIABLE (cell, v);
if (f1.neighbor) {
FttCellFace f2 = gfs_cell_face (cell... | false | false | false | false | false | 0 |
generic_msg(const char *from, const char *target, const char *fmt, ...)
{
va_list ap;
char *buf;
va_start(ap, fmt);
if (vasprintf(&buf, fmt, ap) < 0)
{
va_end(ap);
return;
}
va_end(ap);
slog(LG_INFO, "Cannot send message to %s (%s): don't know how. Load a protocol module perhaps?", target, buf);
free(buf... | false | false | false | false | false | 0 |
reg_reqs(struct gspca_dev *gspca_dev,
const struct dtcs033_usb_requests *preqs, int n_reqs)
{
int i = 0;
const struct dtcs033_usb_requests *preq;
while ((i < n_reqs) && (gspca_dev->usb_err >= 0)) {
preq = &preqs[i];
reg_rw(gspca_dev, preq->bRequestType, preq->bRequest,
preq->wValue, preq->wIndex, pre... | false | false | false | false | false | 0 |
globus_range_list_merge(
globus_range_list_t * dest,
globus_range_list_t src1,
globus_range_list_t src2)
{
int rc;
globus_range_list_t src1_tmp;
globus_range_list_t src2_tmp;
if(src... | false | false | false | false | false | 0 |
varnode_to_tigentry(GNode* node, gpointer data)
{
if(node)
{
if(node->data)
{
VarEntry* ve = node->data;
TigEntry* te;
gchar *basename, *filename;
// create filename
basename = ticonv_varname_to_filename(GFMFile.model, ve->name, ve->type);
filename = g_strconcat(basename, ".", tifiles_vartype2f... | false | false | false | false | false | 0 |
_get_node_state(struct node_record *node_ptr)
{
static bool got_select_type = false;
static bool node_allocations;
if (!got_select_type) {
char * select_type = slurm_get_select_type();
if (select_type &&
(strcasecmp(select_type, "select/linear") == 0))
node_allocations = true;
else
node_allocation... | false | false | false | false | false | 0 |
SetFds(int &Fd,fd_set *RSet,fd_set *WSet)
{
for (Worker *I = Workers; I != 0; I = I->NextAcquire)
{
if (I->InReady == true && I->InFd >= 0)
{
if (Fd < I->InFd)
Fd = I->InFd;
FD_SET(I->InFd,RSet);
}
if (I->OutReady == true && I->OutFd >= 0)
{
if (Fd < I->OutFd)
Fd = I-... | false | false | false | false | false | 0 |
getPlatforms()
{
map<string,string> vs;
for (map<string,Resources*>::iterator i1=platform_res.begin();
i1!=platform_res.end(); ++i1)
{
Resources *res = (*i1).second;
if (res)
{
string desc = res->getResourceStr(
"/FWBuilderResources/Target/descrip... | false | false | false | false | false | 0 |
smk_copy_rules(struct list_head *nhead, struct list_head *ohead,
gfp_t gfp)
{
struct smack_rule *nrp;
struct smack_rule *orp;
int rc = 0;
INIT_LIST_HEAD(nhead);
list_for_each_entry_rcu(orp, ohead, list) {
nrp = kzalloc(sizeof(struct smack_rule), gfp);
if (nrp == NULL) {
rc = -ENOMEM;
break;
}
*... | false | false | false | false | false | 0 |
ReadInputData(char * buf, unsigned int * size, void * param)
{
TDataInfo * pInfo = (TDataInfo *)param;
unsigned int nMaxAvail = (unsigned int)(pInfo->pbInBuffEnd - pInfo->pbInBuff);
unsigned int nToRead = *size;
// Check the case when not enough data available
if(nToRead > nMaxAvail)
... | false | false | false | false | false | 0 |
xenvif_rx_ring_slots_available(struct xenvif_queue *queue)
{
RING_IDX prod, cons;
int needed;
needed = xenvif_rx_ring_slots_needed(queue->vif);
do {
prod = queue->rx.sring->req_prod;
cons = queue->rx.req_cons;
if (prod - cons >= needed)
return true;
queue->rx.sring->req_event = prod + 1;
/* Make s... | false | false | false | false | false | 0 |
t38_gateway_set_supported_modems(t38_gateway_state_t *s, int supported_modems)
{
s->supported_modems = supported_modems;
if ((s->supported_modems & T30_SUPPORT_V17))
s->t38x.t38.fastest_image_data_rate = 14400;
else if ((s->supported_modems & T30_SUPPORT_V29))
s->t38x.t38.fastest_image_data_... | false | false | false | false | false | 0 |
checktz(const char *check)
{
unsigned int i;
const struct tzinfo *what;
bool found= FALSE;
what = tz;
for(i=0; i< sizeof(tz)/sizeof(tz[0]); i++) {
if(Curl_raw_equal(check, what->name)) {
found=TRUE;
break;
}
what++;
}
return found?what->offset*60:-1;
} | false | false | false | false | false | 0 |
create(const String& name, const String& group,
GpuProgramType gptype, const String& syntaxCode, bool isManual,
ManualResourceLoader* loader)
{
// Call creation implementation
ResourcePtr ret = ResourcePtr(
createImpl(name, getNextHandle(), group, isManual, loader, gpty... | false | false | false | false | false | 0 |
cd_sensor_get_sample_state_finish (CdSensorAsyncState *state,
const GError *error)
{
CdSensorArgyllPrivate *priv = cd_sensor_argyll_get_private (state->sensor);
if (state->ret) {
g_simple_async_result_set_op_res_gpointer (state->res,
state->sample,
(GDestroyNotify) cd_color_xyz_free);
}... | false | false | false | false | false | 0 |
deleteaddr(htsblk * r) {
if (r->adr != NULL) {
freet(r->adr);
r->adr = NULL;
}
if (r->headers != NULL) {
freet(r->headers);
r->headers = NULL;
}
return 1;
} | false | false | false | false | false | 0 |
loco_get_rice_param(RICEContext *r)
{
int cnt = 0;
int val = r->count;
while(r->sum > val && cnt < 9) {
val <<= 1;
cnt++;
}
return cnt;
} | false | false | false | false | false | 0 |
receive(const Event& e)
{
Atom atom;
char* name;
WindowRep& w = *Window::rep();
DisplayRep& d = *w.display_->rep();
XEvent& xe = e.rep()->xevent_;
SelectionManager* s;
switch (xe.type) {
case SelectionRequest:
// check type of selection
atom = xe.xselectionrequest.selection;
n... | false | false | false | false | false | 0 |
documentable_get_session_entry (Documentable *self)
{
if (!self) return NULL;
return DOCUMENTABLE_GET_IFACE (self)->get_session_entry (self);
} | false | false | false | false | false | 0 |
valtric_draw_sprites(struct mame_bitmap *bitmap, const struct rectangle *cliprect)
{
int offs;
/* Draw the sprites */
for (offs = 11 ; offs < spriteram_size ; offs += 16)
{
if ( !(spriteram[offs+4] == 0 && spriteram[offs] == 0xf0) )
{
int sx, sy, tile, flipx, flipy, color;
sx = spriteram[offs... | false | false | false | false | false | 0 |
cdio_destroy (CdIo_t *p_cdio)
{
CdIo_last_driver = CDIO_DRIVER_UNINIT;
if (p_cdio == NULL) return;
if (p_cdio->op.free != NULL && p_cdio->env)
p_cdio->op.free (p_cdio->env);
p_cdio->env = NULL;
free (p_cdio);
} | false | false | false | false | false | 0 |
DetermineOutputFilenameStub(void) {
// if user supplied output filename stub, use that
if ( m_settings->HasCustomOutputStub )
m_outputFilenameStub = m_settings->CustomOutputStub;
// else if user supplied input BAM filename, use that (minus ".bam" extension) as stub
else if ( m_settings-... | false | false | false | false | false | 0 |
position_changed (GcMasterProvider *provider,
GeocluePositionFields fields,
int timestamp,
double latitude,
double longitude,
double altitude,
Ge... | false | false | false | false | false | 0 |
process_repContainer(ASTrepContainer& c)
{
for (ASTparameters::iterator it = c.mParameters.begin(),
eit= c.mParameters.end(); it != eit; ++it)
{
if (it->isParameter || !it->mDefinition) {
it->mStackIndex = mLocalStackDepth;
c.mStackCount += it->mTuplesize;
mL... | false | false | false | false | false | 0 |
button_press_event(GtkWidget *widget, /* {{{ */
GdkEventButton *ev) {
GtkWidget *menu = NULL;
GtkWidget *item = NULL;
int num_groups = 0;
xkbGroup groups[XKB_MAX_GROUPS];
int active_group;
int i;
if (! widget) return;
if (ev->button == 1) {
memset(groups, 0, siz... | false | false | false | false | false | 0 |
labelIsolatedEdges(int thisIndex,int targetIndex)
{
std::vector<Edge*> *edges=(*arg)[thisIndex]->getEdges();
for(std::vector<Edge*>::iterator i=edges->begin();i<edges->end();i++) {
Edge *e=*i;
if (e->isIsolated()) {
labelIsolatedEdge(e,targetIndex,(*arg)[targetIndex]->getGeometry());
isolatedEdges.push_back... | false | false | false | false | false | 0 |
runMonoAmplifier(LADSPA_Handle Instance,
unsigned long SampleCount) {
LADSPA_Data * pfInput;
LADSPA_Data * pfOutput;
LADSPA_Data fGain;
Amplifier * psAmplifier;
unsigned long lSampleIndex;
psAmplifier = (Amplifier *)Instance;
pfInput = psAmplifier->m_pfInputBuffer1;
pfOutput = psAmplifier->m_pfO... | false | false | false | false | false | 0 |
pci_find_next_bus(const struct pci_bus *from)
{
struct list_head *n;
struct pci_bus *b = NULL;
WARN_ON(in_interrupt());
down_read(&pci_bus_sem);
n = from ? from->node.next : pci_root_buses.next;
if (n != &pci_root_buses)
b = list_entry(n, struct pci_bus, node);
up_read(&pci_bus_sem);
return b;
} | false | false | false | false | false | 0 |
lockall ( char **lkfiles, int log )
{
int err = 0 ;
char **p = lkfiles ;
while ( *p && **p && ! err )
if ( ( err = ttlock ( *p++, log ) ) == 3 ) err = 0 ;
return err ;
} | false | false | false | false | false | 0 |
be_eqd_update(struct be_adapter *adapter, bool force_update)
{
struct be_set_eqd set_eqd[MAX_EVT_QS];
struct be_aic_obj *aic;
struct be_eq_obj *eqo;
int i, num = 0, eqd;
for_all_evt_queues(adapter, eqo, i) {
aic = &adapter->aic_obj[eqo->idx];
eqd = be_get_new_eqd(eqo);
if (force_update || eqd != aic->prev_e... | false | false | false | false | false | 0 |
timer_init( void )
{
start_time = timer_get_time(); if( start_time < 0 ) return 1;
timer_event = event_register( timer_frame, "Timer" );
event_add( 0, timer_event );
return 0;
} | false | false | false | false | false | 0 |
elm_hoversel_item_add(Evas_Object *obj,
const char *label,
const char *icon_file,
Elm_Icon_Type icon_type,
Evas_Smart_Cb func,
const void *data)
{
ELM_HOVERSEL_CHECK(obj) NULL;
ELM_HOVERSEL_DATA_GET(obj, ... | false | false | false | false | false | 0 |
es_getVideoInfo(sdl_data *sd, int len, char *buff)
{
char *bp, *start;
int sendlen;
const SDL_VideoInfo *vi;
bp = start = sdl_get_temp_buff(sd, 9+2*8);
vi = SDL_GetVideoInfo();
if(vi->hw_available) put8(bp, 1);
else put8(bp, 0);
if(vi->wm_available) put8(bp, 1);
else ... | false | false | false | false | false | 0 |
PopFontSettings(void)
{
if (FontInfoDepth == 0)
diagnostics(WARNING, "FontInfoDepth = 0, cannot PopFontSettings()!");
FontInfoDepth--;
diagnostics(6, "PopFontSettings depth=%2d, family=%2d, size=%2d, shape=%2d, series=%2d, encoding=%2d",
FontInfoDepth, RtfFontInfo[FontInfoDepth].family,
... | false | false | false | false | false | 0 |
mxs_auart_reset_deassert(struct uart_port *u)
{
int i;
unsigned int reg;
writel(AUART_CTRL0_SFTRST, u->membase + AUART_CTRL0_CLR);
for (i = 0; i < 10000; i++) {
reg = readl(u->membase + AUART_CTRL0);
if (!(reg & AUART_CTRL0_SFTRST))
break;
udelay(3);
}
writel(AUART_CTRL0_CLKGATE, u->membase + AUART_CTR... | false | false | false | false | false | 0 |
printCounterValue( Control* c, uint32_t counter, uint64_t value ) {
uint32_t properties = OTF_COUNTER_VARTYPE_UNSIGNED8;
std::map<uint32_t,uint32_t>::const_iterator it
= c->counter_props.find( counter );
if( it != c->counter_props.end() ) {
properties= it->second & OTF_COUNTER_VARTYPE_BITS;
}
switch( proper... | false | false | false | false | false | 0 |
kchar_toucs4(kutext_t *utf8) /* utf8 -> ucs4 */
{
#if defined(K_USING_UTF8)
kint_t ucs4 = 0;
int i= 0;
kchar_t ret = 0;
if (!utf8_isSingleton(utf8[0])) {
kushort_t length_utf8 = utf8len(utf8[i]);
kchar_t mask = (kchar_t)(1 << 0 | 1 << 1 | 1 << 2 | 1 << 3);
switch(length_utf8){
case 2:
/* 110xxxxx 10xx... | false | false | false | false | false | 0 |
tech_free(Tech_type_id tech)
{
struct advance *p = &advances[tech];
if (NULL != p->helptext) {
strvec_destroy(p->helptext);
p->helptext = NULL;
}
if (p->bonus_message) {
free(p->bonus_message);
p->bonus_message = NULL;
}
} | false | false | false | false | false | 0 |
format(int32_t number,
UnicodeString& toAppendTo,
FieldPosition& /* pos */) const
{
if (defaultRuleSet) {
int32_t startPos = toAppendTo.length();
defaultRuleSet->format((int64_t)number, toAppendTo, toAppendTo.length());
adjustForCap... | false | false | false | false | false | 0 |
FreeSL(l)
SkipList l;
{
register SLNode p,q;
void (*freeitem)() = l->freeitem;
if (l == NULL || l->header == NULL)
return;
p = l->header; /* free header node first, because it doesn't */
q = p->forward[0]; /* have a real key to it */
free(p);
p = q;
while (p != NULL)
{
q = p... | false | false | false | false | false | 0 |
unpackScalar(SV * arg, void * var, int datatype) {
SV* tmp_sv[2];
if (var == NULL) {
sv_setpvn(arg,"",0);
return;
}
switch (datatype) {
case TSTRING:
sv_setpv(arg,(char *)var); break;
case TLOGICAL:
sv_setiv(arg,(IV)(*(logical *)var)); break;
case TSBYTE:
sv_setiv(arg,(IV)(*(sbyte *)v... | false | false | false | false | false | 0 |
setLegend(bool legend, int coltype)
{
if (legend == true && coltype != MODEL_NONE) {
showColorLegend(true);
} else {
showColorLegend(false);
}
} | false | false | false | false | false | 0 |
plot_hd(cairo_t* cairo, plot_args_t* pargs, plotann_t* ann) {
int i, N;
hd_catalog_t* hdcat = NULL;
double ra,dec,rad;
bl* hdlist = NULL;
if (!ann->hd_catalog)
return;
hdcat = henry_draper_open(ann->hd_catalog);
if (!hdcat) {
ERROR("Failed to open Henry Draper catalog file \"%s\"", ann->hd_catalog);
retur... | false | false | false | false | false | 0 |
findReserved (char *name)
{
int l = 0;
int h = RESERVEDSIZE - 1;
while (l <= h)
{
int m = (l+h)/2;
int comp = strcmp(name, reserved[m].name);
if (comp < 0)
h = m-1;
else if (comp == 0)
return reserved[m].token;
else
l = m+1;
}
return 0;
} | false | false | false | false | false | 0 |
mv88e1xxx_reset(struct cphy *cphy, int wait)
{
u32 ctl;
int time_out = 1000;
mdio_set_bit(cphy, MII_BMCR, BMCR_RESET);
do {
(void) simple_mdio_read(cphy, MII_BMCR, &ctl);
ctl &= BMCR_RESET;
if (ctl)
udelay(1);
} while (ctl && --time_out);
return ctl ? -1 : 0;
} | false | false | false | false | false | 0 |
qlcnic_83xx_read_crb(struct qlcnic_adapter *adapter, char *buf,
loff_t offset, size_t size)
{
int ret = 0;
u32 data;
if (qlcnic_api_lock(adapter)) {
dev_err(&adapter->pdev->dev,
"%s: failed to acquire lock. addr offset 0x%x\n",
__func__, (u32)offset);
return;
}
data = QLCRD32(adapter, (u32) offset... | false | true | false | false | false | 1 |
writeIncomingMessage(const QByteArray &packet, bool *notStun, const QHostAddress &from_addr, int from_port)
{
if(!checkActiveAndFrom(from_addr, from_port))
{
// could be STUN, don't really know for sure
*notStun = false;
return false;
}
int validationFlags = 0;
StunMessage msg = parse_stun_message(... | false | false | false | false | false | 0 |
system_suspend(void)
{
FILE *fComp;
FILE *fSig;
FILE *fConn;
FILE *fSched;
fComp = fopen("./Components.suspend", "wb");
fSig = fopen("./Signals.suspend", "wb");
fConn = fopen("./Connections.suspend", "wb");
fSched = fopen("./Schedules.suspend", "wb");
if (fComp == NULL){
fprintf(stderr, "\nCreating Compo... | false | false | false | false | true | 1 |
operator<<(const double* r)
{
REPORT
Tracer tr("SubMatrix(<<double*)");
SetUpLHS();
if (row_skip+row_number > gm->Nrows() || col_skip+col_number > gm->Ncols())
Throw(SubMatrixDimensionException());
MatrixRow mr(gm, LoadOnEntry+StoreOnExit+Node_pairPart, row_skip);
... | false | false | false | false | false | 0 |
_tenFiberAnisoSpeed(double *step, double xx, double parm[3]) {
double aa, dd, tt, yy;
tt = parm[1];
dd = parm[2];
aa = 1.0/(DBL_EPSILON + 4*dd*(1.0-tt));
yy = xx - tt + dd;
xx = (xx < tt - dd
? 0
: (xx < tt + dd
? aa*yy*yy
: (xx - tt)/(1 - tt)));
xx = AIR_LERP(parm[0... | false | false | false | false | false | 0 |
mx_box_layout_set_spacing (MxBoxLayout *box,
guint spacing)
{
MxBoxLayoutPrivate *priv;
g_return_if_fail (MX_IS_BOX_LAYOUT (box));
priv = box->priv;
if (priv->spacing != spacing)
{
priv->spacing = spacing;
priv->ignore_css_spacing = TRUE;
clutter_actor... | false | false | false | false | false | 0 |
brasero_track_data_set_source (BraseroTrackData *track,
GSList *grafts,
GSList *unreadable)
{
BraseroTrackDataClass *klass;
g_return_val_if_fail (BRASERO_IS_TRACK_DATA (track), BRASERO_BURN_ERR);
klass = BRASERO_TRACK_DATA_GET_CLASS (track);
return klass->set_source (track, grafts, unreadable)... | false | false | false | true | false | 1 |
js_TraceStackFrame(JSTracer *trc, JSStackFrame *fp)
{
uintN nslots, minargs, skip;
if (fp->callobj)
JS_CALL_OBJECT_TRACER(trc, fp->callobj, "call");
if (fp->argsobj)
JS_CALL_OBJECT_TRACER(trc, JSVAL_TO_OBJECT(fp->argsobj), "arguments");
if (fp->varobj)
JS_CALL_OBJECT_TRACER(trc,... | false | false | false | false | false | 0 |
OTFAUX_State_declareProcess( OTFAUX_State* auxState,
uint64_t processId,
int isThumbnailProcess )
{
OTFAUX_Process* process;
if ( !auxState )
return 0;
process = get_process( auxState, processId );
if ( !process )
... | false | false | false | false | false | 0 |
rsvg_css_parse_font_weight (const char *str, gboolean * inherit)
{
SETINHERIT ();
if (str) {
if (!strcmp (str, "lighter"))
return PANGO_WEIGHT_LIGHT;
else if (!strcmp (str, "bold"))
return PANGO_WEIGHT_BOLD;
else if (!strcmp (str, "bolder"))
return PAN... | false | false | false | false | false | 0 |
pmem_map_cl(int fd, size_t len)
{
void *base;
if ((base = mmap(NULL, len, PROT_READ|PROT_WRITE, MAP_SHARED,
fd, 0)) == MAP_FAILED)
return NULL;
return base;
} | false | false | false | false | false | 0 |
get_digitize_raw (GMT_LONG digunit, FILE *fpd, GMT_LONG USB, double *xdig, double *ydig, struct GMTDIGITIZE_CTRL *C) {
GMT_LONG i, n, ix, iy;
char buffer[256], button;
if (USB) {
if (!GMT_fgets (buffer, 256, fpd)) return (END_BUTTON);
n = strlen (buffer);
}
else
n = read (digunit, buffer, (size_t)255);
if... | false | false | false | false | false | 0 |
AssignOriAvg(const Image& grad, const Image& ori, float octSize,
float octScale, float octRow, float octCol, float strength, KeyList& keys)
{
int r, c, irow, icol, rows, cols, radius;
float gval, sigma, distsq, weight, angle, xvec = 0.0, yvec = 0.0;
rows = grad.rows;
cols = grad... | false | false | false | false | false | 0 |
get_mainwin(gpointer data)
{
ToolbarItem *toolbar_item = (ToolbarItem*)data;
MainWindow *mainwin = NULL;
MessageView *msgview;
cm_return_val_if_fail(toolbar_item != NULL, NULL);
switch(toolbar_item->type) {
case TOOLBAR_MAIN:
mainwin = (MainWindow*)toolbar_item->parent;
break;
case TOOLBAR_MSGVIEW:
msgvi... | false | false | false | false | false | 0 |
ltsGetFreeBlock(LogicalTapeSet *lts)
{
/*
* If there are multiple free blocks, we select the one appearing last in
* freeBlocks[] (after sorting the array if needed). If there are none,
* assign the next block at the end of the file.
*/
if (lts->nFreeBlocks > 0)
{
if (!lts->blocksSorted)
{
qsort((voi... | false | false | false | false | false | 0 |
discover_conf_name_to_bus(char *name, discover_error_t *status)
{
int i;
for (i = 0; bus_map[i].name; i++) {
if (strcmp(bus_map[i].name, name) == 0) {
return i;
}
}
status->code = DISCOVER_EBUSNOTFOUND;
return -1;
} | false | false | false | false | false | 0 |
xfs_corruption_error(
const char *tag,
int level,
struct xfs_mount *mp,
void *p,
const char *filename,
int linenum,
void *ra)
{
if (level <= xfs_error_level)
xfs_hex_dump(p, 64);
xfs_error_report(tag, level, mp, filename, linenum, ra);
xfs_alert(mp, "Corruption detected. Unmount and run xfs_repair... | false | false | false | false | false | 0 |
gr_scanline( int x1, int x2, int y )
{
if ((y<0)||(y>MAXY)) return;
if (x2 < x1 ) x2 ^= x1 ^= x2;
if (x1 > MAXX) return;
if (x2 < MINX) return;
if (x1 < MINX) x1 = MINX;
if (x2 > MAXX) x2 = MAXX;
if (grd_curcanv->cv_fade_level >= GR_FADE_OFF) {
switch(TYPE)
{
case BM_LINEAR:
#ifdef OGL
case BM_OGL:
#... | false | false | false | false | false | 0 |
skip( const char *in )
{
while ( in && *in && (unsigned char) *in <= 32 )
in++;
return in;
} | false | false | false | false | false | 0 |
sample_load_twice(struct drm_device *dev, bool sense[2])
{
struct nouveau_drm *drm = nouveau_drm(dev);
struct nvif_object *device = &drm->device.object;
int i;
for (i = 0; i < 2; i++) {
bool sense_a, sense_b, sense_b_prime;
int j = 0;
/*
* wait for bit 0 clear -- out of hblank -- (say reg value 0x4),
... | false | false | false | false | false | 0 |
integrated_lvds_disable(struct lvds_setting_information
*plvds_setting_info,
struct lvds_chip_information *plvds_chip_info)
{
bool turn_off_first_powersequence = false;
bool turn_off_second_powersequence = false;
if (INTERFACE_LVDS0LVDS1 == plvds_chip_info->output_interface)
turn_off_first_powerseq... | false | false | false | false | false | 0 |
Gal_tv_get_timings(unsigned long flags, PGAL_TVTIMING pTV)
{
INIT_GAL(pTV);
pTV->dwSubfunction = GALFN_GETTVTIMING;
pTV->dwFlags = flags;
if (ioctl(dfb_fbdev->fd, FBIOGAL_API, pTV))
return 0;
else {
return 1;
}
} | false | false | false | false | false | 0 |
dump_scope (tree scope, int flags)
{
int f = flags & (TFF_SCOPE | TFF_CHASE_TYPEDEF);
if (scope == NULL_TREE)
return;
if (TREE_CODE (scope) == NAMESPACE_DECL)
{
if (scope != global_namespace)
{
dump_decl (scope, f);
pp_cxx_colon_colon (cxx_pp);
}
}
else if (AGGREGATE_TYPE_P (scope))
... | false | false | false | false | false | 0 |
base_alias_check (rtx x, rtx y, enum machine_mode x_mode,
enum machine_mode y_mode)
{
rtx x_base = find_base_term (x);
rtx y_base = find_base_term (y);
/* If the address itself has no known base see if a known equivalent
value has one. If either address still has no known base, nothing
is known ab... | false | false | false | false | false | 0 |
CountSubstituteArgs(const SubstituteArg* const* args_array) {
int count = 0;
while (args_array[count] != NULL && args_array[count]->size() != -1) {
++count;
}
return count;
} | false | false | false | false | false | 0 |
gst_pad_store_sticky_event (GstPad * pad, GstEvent * event)
{
GstFlowReturn ret;
g_return_val_if_fail (GST_IS_PAD (pad), FALSE);
g_return_val_if_fail (GST_IS_EVENT (event), FALSE);
GST_OBJECT_LOCK (pad);
ret = store_sticky_event (pad, event);
GST_OBJECT_UNLOCK (pad);
return ret;
} | false | false | false | false | false | 0 |
ConcreteConfigure( const ProcessingConfig& cfg )
{
RemoveOldControls();
CopyAsConcreteConfig( _config, cfg );
_config.AddAll();
_config.UpdateData();
unsigned nInputs = GetInputsNumber();
if (nInputs == 0)
{
AddConfigErrorMessage("No proper OSCTypeSpec setup. Use: 'f' for float, 'd' for double, 'i... | false | false | false | false | false | 0 |
addComponent(const char * component)
{
Pool pool;
if (0 == component)
return;
// in case of an empty string, return
if (*component == 0)
return;
// if the @a component is absolute, simply
// use it
if (isAbsolute(component))
{
m_path = component;
return;
... | 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.