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 |
|---|---|---|---|---|---|---|
IsValidNotBuiltinContext(Object* ctx) {
if (!ctx->IsHeapObject()) return false;
Map* map = SafeMap(ctx);
Heap* heap = map->heap();
if (!(map == heap->raw_unchecked_function_context_map() ||
map == heap->raw_unchecked_catch_context_map() ||
map == heap->raw_unchecked_with_context_map... | false | false | false | false | false | 0 |
adma_port_start(struct ata_port *ap)
{
struct device *dev = ap->host->dev;
struct adma_port_priv *pp;
adma_enter_reg_mode(ap);
pp = devm_kzalloc(dev, sizeof(*pp), GFP_KERNEL);
if (!pp)
return -ENOMEM;
pp->pkt = dmam_alloc_coherent(dev, ADMA_PKT_BYTES, &pp->pkt_dma,
GFP_KERNEL);
if (!pp->pkt)
retur... | false | false | false | false | false | 0 |
add_rx_sample(int sample) {
if(mode!=MODE_RXDATA) return;
rxdata[cnt++] = sample;
if(cnt>=N) cnt=0;
if(valid_counter) valid_counter--;
} | false | false | false | false | false | 0 |
cb_dialog_so_size_ok_clicked (GtkWidget *button, SOSizeState *state)
{
cb_dialog_so_size_apply_clicked (button, state);
if (!state->so_size_needs_restore && !state->so_pos_needs_restore &&
!state->so_name_changed && !state->so_print_check_changed)
gtk_widget_destroy (state->dialog);
return;
} | false | false | false | false | false | 0 |
bEigenvalues(PRECISION *re, PRECISION *im, PRECISION *x, int n, int xt)
{
#if (PRECISION_SIZE == 4)
#define geev sgeev
#else
#define geev dgeev
#endif
char job='N';
int rtrn;
lapack_int bm=1, lwork=-1, info, bn=n;
PRECISION size, *work, *tmp;
if (!(tmp=(PRECISION*)dw_malloc(n*n*sizeof(PRECIS... | false | true | false | false | false | 1 |
sortTextListByRow(MSPointerArray<MSParagraph>& list_)
{
for (int i=0;i<list_.count();i++)
{
int min=i;
for (int j=i+1;j<list_.count();j++) if (list_.array(j)->row()<list_.array(min)->row()) min=j;
list_.exchange(min,i);
}
} | false | false | false | false | false | 0 |
addctlfileline( Figure, HeadLine, File, Line )
ctlfig_list *Figure;
ctlline_list **HeadLine;
char *File;
long Line;
{
ctlline_list **PrevLine;
ctlline_list *CtlLine;
File = autnamealloc( File );
PrevLine = HeadLine;
for ( CtlLine = *PrevLine;
CtlLine != (ctlline_list... | false | false | false | false | false | 0 |
proxy_connection_close(server *srv, handler_ctx *hctx) {
plugin_data *p;
connection *con;
if (NULL == hctx) return;
p = hctx->plugin_data;
con = hctx->remote_conn;
proxy_connection_reset(srv, hctx);
handler_ctx_free(hctx);
con->plugin_ctx[p->id] = NULL;
} | false | false | false | false | false | 0 |
AddImplicitLinkInfo(std::string const& lang)
{
// Add libraries for this language that are not implied by the
// linker language.
std::string libVar = "CMAKE_";
libVar += lang;
libVar += "_IMPLICIT_LINK_LIBRARIES";
if(const char* libs = this->Makefile->GetDefinition(libVar.c_str()))
{
std::vector<st... | false | false | false | false | false | 0 |
_gtk_marshal_OBJECT__VOIDv (GClosure *closure,
GValue *return_value,
gpointer instance,
va_list args,
gpointer marshal_data,
int n_params,
... | false | false | false | false | false | 0 |
init_parameters_from_args(F_PARAMETERS *p, int argc, F_CHAR **argv)
{
default_parameters(p);
p->executable_path = argv[0];
int i = 0;
for(i = 1; i < argc; i++)
{
if(factor_arg(argv[i],STRING_LITERAL("-datastack=%d"),&p->ds_size));
else if(factor_arg(argv[i],STRING_LITERAL("-retainstack=%d"),&p->rs_size));
... | false | false | false | false | false | 0 |
get_property (GObject *object, guint prop_id,
GValue *value, GParamSpec *pspec)
{
GtksharpValobj *valobj = GTKSHARP_VALOBJ (object);
switch (prop_id) {
case PROP_BOOLEAN:
g_value_set_boolean (value, valobj->the_boolean);
break;
case PROP_INT:
g_value_set_int (value, valobj->the_int);
break;
case PR... | false | false | false | false | false | 0 |
_CopyField(Field new, Field old, enum _dxd_copy copy)
{
int i, n = old->ncomponents;
struct component *oc, *nc;
/* copy superclass */
if (!_dxf_CopyObject((Object)new, (Object)old, copy))
return NULL;
if (copy==COPY_ATTRIBUTES)
return new;
/* allocate components */
if (n<=NCOMPONENTS) {
... | false | false | false | false | false | 0 |
setIdColAcol() {
double tmPrand = rndmPtr->flat();
// Flavours trivial.
if (tmPrand < 0.33333333) { setId( id1, id2, 11, -11); }
else if (tmPrand < 0.66666667) { setId( id1, id2, 13, -13); }
else { setId( id1, id2, 15, -15); }
// tH defined between f and f': must swap tHa... | false | false | false | false | false | 0 |
addChargeSpinFrame(GtkWidget *vboxmain)
{
GtkWidget *window1;
GtkWidget *Frame;
GtkWidget *vbox;
GtkWidget *hbox;
GtkWidget *hbox2;
gint i;
gboolean medium = geometry_with_medium_layer();
gboolean lower = geometry_with_lower_layer();
for(i=0;i<6;i++)
EntryChargeSpin[i] = NULL;
Frame = gtk_frame... | false | false | false | false | false | 0 |
misc_call_misctf(struct tfrec_t *tfrp, int32 reason)
{
register int32 ii;
int32 sav_fnam_ind, sav_slin_cnt;
struct t_tfcell *tfcp;
struct tfinst_t tfiwrk;
struct mod_t *mdp;
int32 (*misctf)(int32, int32, int32);
__tfrec = tfrp;
/* if no misc. tf routine just turn off, nothing to do */
tfcp = get_tfcell(__tfre... | false | false | false | true | false | 1 |
Write(ByteBuffer &data) const
{
data << flags;
if(_c == CLIENT_WOTLK)
data << flags2;
if(_c == CLIENT_TBC)
{
data << (uint8)flags2;
}
data << time;
data << pos.x;
data << pos.y;
data << pos.z;
data << pos.o;
if(flags & (MOVEMENTFLAG_ONTRANSPORT))
{
if... | false | false | false | false | false | 0 |
D_ProcessEvents (void)
{
event_t* ev;
// haleyjd 08/22/2010: [STRIFE] there is no such thing as a "store demo"
// version of Strife
// IF STORE DEMO, DO NOT ACCEPT INPUT
//if (storedemo)
// return;
while ((ev = D_PopEvent()) != NULL)
{
if (M_Responder (ev))
... | false | false | false | false | false | 0 |
setData(const QModelIndex &index, const QVariant &value, int role) {
if(role != ActiveShortcutRole)
return false;
if(!index.parent().isValid())
return false;
Item *item = static_cast<Item *>(index.internalPointer());
Q_ASSERT(item);
Q_ASSERT(item->action);
QKeySequence newSeq = value.value<QKeySe... | false | false | false | false | false | 0 |
usage(const char *progname)
{
const char* progname_real; //contains the real name of the program (without path)
progname_real = rindex(progname, '/');
if (progname_real == NULL) //no path in progname: use progname
{
progname_real = progname;
}
else
{
progname_real++;
}
... | false | false | false | false | false | 0 |
WriteCore( OGRFeature *poFeature )
{
/* -------------------------------------------------------------------- */
/* Write out an entity id. I'm not sure why this is critical, */
/* but it seems that VoloView will just quietly fail to open */
/* dxf files without entity ids set on most/all enti... | false | false | false | false | false | 0 |
igb_init_nvm_params_82575(struct e1000_hw *hw)
{
struct e1000_nvm_info *nvm = &hw->nvm;
u32 eecd = E1000_READ_REG(hw, E1000_EECD);
u16 size;
DEBUGFUNC("igb_init_nvm_params_82575");
nvm->opcode_bits = 8;
nvm->delay_usec = 1;
switch (nvm->override) {
case e1000_nvm_override_spi_large:
nvm->page... | false | false | false | false | false | 0 |
LigCnt(SplineFont *sf,PST *lig,int32 *univals,int max) {
char *pt, *end;
int c=0;
SplineChar *sc;
if ( lig->type!=pst_ligature )
return( 0 );
else if ( !lig->subtable->lookup->store_in_afm )
return( 0 );
pt = lig->u.lig.components;
forever {
end = strchr(pt,' ');
if ( end!=NULL ) *end='\0... | false | false | false | false | false | 0 |
on_checkbutton18_toggled (GtkToggleButton *togglebutton,
gpointer user_data)
{
GtkWidget *widget;
hrm_on = gtk_toggle_button_get_active(togglebutton);
gconf_client_set_bool( global_gconfclient,
GCONF"/hrm_on",
hrm_on, NULL);
global_reconnec... | false | false | false | false | false | 0 |
_datapercent_disp(struct dm_report *rh, struct dm_pool *mem,
struct dm_report_field *field,
const void *data, void *private)
{
const struct logical_volume *lv = (const struct logical_volume *) data;
if (lv_is_cow(lv))
return _snpercent_disp(rh, mem, field, data, private);
if (lv_is_thin_pool(lv) ... | false | false | false | false | false | 0 |
__menu_binding_is_mouse(
Binding *blist, XEvent* event, int context)
{
Binding *b;
int real_mod;
real_mod = event->xbutton.state - (1 << (7 + event->xbutton.button));
for (b = blist; b != NULL; b = b->NextBinding)
{
if (
BIND_IS_MOUSE_BINDING(b->type) &&
(b->Button_Key == 0 ||
event->xbutton.button =... | false | false | false | false | false | 0 |
JPGImage_setExternalUArray_(JPGImage *self, UArray *ba)
{
if (self->ownsUArray)
{
UArray_free(self->byteArray);
}
self->byteArray = ba;
self->ownsUArray = 0;
} | false | false | false | false | false | 0 |
calculateRotation (const int mX, const int mY,
double axis[], double & degrees)
{
bool result = true;
// Get two points on the line of sight, in the nearest cube's co-ordinates.
// Use the transformation matrix for the translated and standardly aligned
// view of that cube, without including any u... | false | false | false | false | false | 0 |
mpwl_ui_sub(MpwRealNum *rop, unsigned long i, MpwRealNum *op)
{
switch(op->type) {
case MPW_FLOAT:
if(rop->type != MPW_FLOAT) {
mpwl_clear(rop);
mpwl_init_type(rop,MPW_FLOAT);
}
mpfr_ui_sub (rop->data.fval, i, op->data.fval,
GMP_RNDN);
break;
case MPW_RATIONAL:
{
mpq_t tmp;
if(rop->type... | false | false | false | false | false | 0 |
save(CdlInterpreter interp, Tcl_Channel chan, int indentation, bool minimal)
{
CYG_REPORT_FUNCNAME("CdlPackage::save");
CYG_REPORT_FUNCARG5XV(this, interp, chan, indentation, minimal);
CYG_PRECONDITION_THISC();
CYG_PRECONDITION_CLASSC(interp);
// For a minimal save there is sufficient data in the s... | false | false | false | false | false | 0 |
do_mname()
{
char buf[BUFSZ];
coord cc;
register int cx,cy;
register struct monst *mtmp;
char qbuf[QBUFSZ];
if (Hallucination) {
You("would never recognize it anyway.");
return 0;
}
cc.x = u.ux;
cc.y = u.uy;
if (getpos(&cc, FALSE, "the monster you want to name") < 0 ||
(cx = cc.x) < 0)
return 0;
cy... | false | false | false | false | false | 0 |
read_packet(AVFormatContext *s, AVPacket *pkt)
{
ASSContext *ass = s->priv_data;
uint8_t *p, *end;
if(ass->event_index >= ass->event_count)
return AVERROR(EIO);
p= ass->event[ ass->event_index ];
end= strchr(p, '\n');
av_new_packet(pkt, end ? end-p+1 : strlen(p));
pkt->flags |= PK... | false | false | false | false | false | 0 |
do_restart(int count, int orig_pid, int pid_opt, int pgid_opt, int sid_opt)
{
cr_restart_args_t args;
cr_restart_handle_t handle;
int flags;
int rc;
int fd;
int pid;
flags = pid_opt ? CR_RSTRT_RESTORE_PID : 0;
flags |= pgid_opt ? CR_RSTRT_RESTORE_PGID : 0;
flags |= sid_opt ? CR_... | false | false | false | false | true | 1 |
reinitScene(QRectF sceneRect)
{
if ( mGraphicsScene == 0 )
{
mGraphicsScene = new QGraphicsScene(this);
connect(mGraphicsScene,SIGNAL(selectionChanged ()),this,SLOT(sceneSelectionChanged()));
connect(mGraphicsScene,SIGNAL(changed( const QList<QRectF>& )),this,SLOT(sceneChanged( const QList<QRectF> &)));
mGrap... | false | false | false | false | false | 0 |
handshake_upenctest(int dns_fd, char *s)
/* NOTE: *s may be max 59 chars; must start with "aA" for case-swap check
Returns:
-1: case swap, no need for any further test: error printed; or Ctrl-C
0: not identical or error or timeout
1: identical string returned
*/
{
char in[4096];
unsigned char *uin = (unsi... | false | false | false | false | false | 0 |
queue_callback (GtkWidget *widget,
gpointer data)
{
int i;
int count = stp_string_list_count(stpui_system_print_queues);
const gchar *result =
gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(queue_combo)->entry));
for (i = 0; i < count; i++)
{
const stp_param_string_t *s =
stp_string_list_param(stpui_... | false | false | false | false | false | 0 |
FindItemInExpression(
int theType,
void *theValue,
int useValue,
struct expr *theList)
{
while (theList != NULL)
{
if (theList->type == theType)
{
if (! useValue) return(TRUE);
else if (theList->value == theValue) return(TRUE);
}
theList = theList->nextAr... | false | false | false | false | false | 0 |
GetConfigValue(const char *blockName, const char *keyName, const char *def)
{
unsigned int i, j;
if(!keyName)
return def;
if(!blockName)
blockName = "general";
for(i = 0;i < cfgCount;i++)
{
if(strcasecmp(cfgBlocks[i].name, blockName) != 0)
continue;
fo... | false | false | false | false | false | 0 |
FcInitLoadOwnConfigAndFonts (FcConfig *config)
{
config = FcInitLoadOwnConfig (config);
if (!config)
return 0;
if (!FcConfigBuildFonts (config))
{
FcConfigDestroy (config);
return 0;
}
return config;
} | false | false | false | false | false | 0 |
c_str2int(union pattern_data *data)
{
int i;
uint32_t ret = 0;
for (i = 0; i < data->str.len; i++) {
uint32_t val = data->str.str[i] - '0';
if (val > 9)
break;
ret = ret * 10 + val;
}
data->integer = ret;
return 1;
} | false | false | false | false | false | 0 |
SetSpatialRef( OGRSpatialReference *poSpatialRef )
{
GCSysCoord* os, *ns;
OGRSpatialReference* poSRS= GetSpatialRef();
GCExportFileH* hGXT;
GCExportFileMetadata* Meta;
/*-----------------------------------------------------------------
* Keep a copy of the OGRSpatialReference...
* Note: w... | false | false | false | false | false | 0 |
mk_signature_struct(value list, struct stub_dbus_sig *sig)
{
value v;
signature_append(sig, '(');
for iterate_caml_list(list, list) {
int c_type;
v = Field(list, 0);
c_type = __type_table[Tag_val(v)];
if (IS_BASIC(c_type)) {
signature_append(sig, c_type);
} else {
signature_append(sig, '#');
}
}... | false | false | false | false | false | 0 |
adt7316_show_da_high_resolution(struct device *dev,
struct device_attribute *attr,
char *buf)
{
struct iio_dev *dev_info = dev_to_iio_dev(dev);
struct adt7316_chip_info *chip = iio_priv(dev_info);
if (chip->config3 & ADT7316_DA_HIGH_RESOLUTION) {
if (chip->id == ID_ADT7316 || chip->id == ID_ADT7516)
return... | false | true | false | false | false | 1 |
mwl8k_feed_fw_image(struct mwl8k_priv *priv,
const u8 *data, size_t length)
{
unsigned char *buffer;
int may_continue, rc = 0;
u32 done, prev_block_size;
buffer = kmalloc(1024, GFP_KERNEL);
if (buffer == NULL)
return -ENOMEM;
done = 0;
prev_block_size = 0;
may_continue = 1000;
while (may_continue > 0) ... | false | false | false | false | false | 0 |
return_type_from_string (const char *s)
{
int t;
if (!strcmp(s, "void")) {
/* not OK as arg type, but OK as return */
t = GRETL_TYPE_VOID;
} else {
t = gretl_type_from_string(s);
}
return (ok_function_return_type(t))? t : 0;
} | false | false | false | false | false | 0 |
mgu_print_dlist( GList *list, FILE *stream ) {
GList *node = list;
while( node ) {
int r = fprintf( stream, "\t- >%s<\n", (gchar *)node->data );
if (r < 0) {
perror("fprintf");
break;
}
node = g_list_next( node );
}
} | false | false | false | false | false | 0 |
tooltip_handler( int ID FL_UNUSED_ARG,
void * data )
{
FL_OBJECT * const obj = get_parent( data );
if ( obj->tooltip && *obj->tooltip )
fli_show_tooltip( obj->tooltip, obj->form->x + obj->x,
obj->form->y + obj->y + obj->h + 1 );
obj->tipID = 0;
} | false | false | false | false | false | 0 |
may_lookup(struct nameidata *nd)
{
if (nd->flags & LOOKUP_RCU) {
int err = inode_permission(nd->inode, MAY_EXEC|MAY_NOT_BLOCK);
if (err != -ECHILD)
return err;
if (unlazy_walk(nd, NULL, 0))
return -ECHILD;
}
return inode_permission(nd->inode, MAY_EXEC);
} | false | false | false | false | false | 0 |
Reset(double sNewPeriod)
{
bool bStoppedPrev = bStopped;
bStopped = false;
if (sLastPeriod != sNewPeriod || bStoppedPrev) {
sLastPeriod = sNewPeriod;
InvalidateCtrl();
}
} | false | false | false | false | false | 0 |
gst_cdxa_parse_convert_src_to_sink_offset (GstCDXAParse * cdxa, gint64 src)
{
gint64 sink;
sink = src + cdxa->datastart;
sink = gst_util_uint64_scale (sink, GST_CDXA_SECTOR_SIZE, GST_CDXA_DATA_SIZE);
/* FIXME: take into account skipped bytes */
GST_DEBUG_OBJECT (cdxa, "src offset=%" G_GINT64_FORMAT ", sink... | false | false | false | false | false | 0 |
httpReplyHdrExpirationTime(const HttpReply * rep)
{
/*
* The s-maxage and max-age directive takes priority over Expires
*/
if (rep->cache_control) {
if (rep->date >= 0) {
if (rep->cache_control->s_maxage >= 0)
return rep->date + rep->cache_control->s_maxage;
if (rep->cache_control->max_ag... | false | false | false | false | false | 0 |
ext4_end_io(ext4_io_end_t *io)
{
struct inode *inode = io->inode;
loff_t offset = io->offset;
ssize_t size = io->size;
handle_t *handle = io->handle;
int ret = 0;
ext4_debug("ext4_end_io_nolock: io 0x%p from inode %lu,list->next 0x%p,"
"list->prev 0x%p\n",
io, inode->i_ino, io->list.next, io->list.prev... | false | false | false | false | false | 0 |
gfm_server_hostname_set(struct peer *peer, int from_client, int skip)
{
gfarm_int32_t e;
char *hostname;
static const char diag[] = "GFM_PROTO_HOSTNAME_SET";
e = gfm_server_get_request(peer, diag, "s", &hostname);
if (e != GFARM_ERR_NO_ERROR) {
gflog_debug(GFARM_MSG_1001577,
"gfm_server_get_request() failure... | false | false | false | false | false | 0 |
_nrrdFormatText_contentStartsLike(NrrdIoState *nio) {
float oneFloat;
return (NRRD_COMMENT_CHAR == nio->line[0]
|| airParseStrF(&oneFloat, nio->line, _nrrdTextSep, 1));
} | false | false | false | false | false | 0 |
isl_aff_get_dim_name(__isl_keep isl_aff *aff,
enum isl_dim_type type, unsigned pos)
{
if (!aff)
return NULL;
if (type == isl_dim_out)
return NULL;
if (type == isl_dim_in)
type = isl_dim_set;
return isl_local_space_get_dim_name(aff->ls, type, pos);
} | false | false | false | false | false | 0 |
lsr_write_href_anim(GF_LASeRCodec *lsr, XMLRI *href, SVG_Element *parent)
{
if (!href || (href->target && (href->target==parent))) {
GF_LSR_WRITE_INT(lsr, 0, 1, "has_href");
} else {
lsr_write_href(lsr, href);
}
} | false | false | false | false | false | 0 |
applyDefines(std::string& source) {
for(std::map<std::string, std::string>::iterator it = defines.begin(); it != defines.end(); it++) {
source.append(str(boost::format("#define %s %s\n") % it->first % it->second));
}
} | false | false | false | false | false | 0 |
getPropertyType(const gchar * szName, tProperty_type Type) const
{
if (!m_pProperties)
return NULL;
const PropertyPair * pEntry = m_pProperties->pick(szName);
if (!pEntry)
return NULL;
if(!pEntry->second)
{
m_pProperties->set(szName, new PropertyPair(pEntry->first,
PP_PropertyType::createPropertyTy... | false | false | false | false | false | 0 |
auxupvalue (lua_State *L, int get) {
const char *name;
int n = luaL_checkint(L, 2);
luaL_checktype(L, 1, LUA_TFUNCTION);
if (lua_iscfunction(L, 1)) return 0; /* cannot touch C upvalues from Lua */
name = get ? lua_getupvalue(L, 1, n) : lua_setupvalue(L, 1, n);
if (name == NULL) return 0;
lua_pushstring(L... | false | false | false | false | false | 0 |
searchPics(const QString & text)
{
// clear previous search results
dropSearch();
// notify about the start
emit searchStarted();
// build the google images search string
QString requestString = "&q=" + QUrl::toPercentEncoding(text);
#if 1
int startImageNumber = 0;
requestString += ... | false | false | false | false | false | 0 |
static_redundant (int n, int p)
{
int k;
for (k = 1; k < p; k++)
if (p % k == 0 && n * k % p == 0) return TRUE;
return FALSE;
} | false | false | false | false | false | 0 |
spgvacuumcleanup(PG_FUNCTION_ARGS)
{
IndexVacuumInfo *info = (IndexVacuumInfo *) PG_GETARG_POINTER(0);
IndexBulkDeleteResult *stats = (IndexBulkDeleteResult *) PG_GETARG_POINTER(1);
Relation index = info->index;
spgBulkDeleteState bds;
/* No-op in ANALYZE ONLY mode */
if (info->analyze_only)
PG_RETURN_POINTER(... | false | false | false | false | false | 0 |
diskCombineWrites(struct _fde_disk *fdd)
{
int len = 0;
dwrite_q *q = NULL;
dwrite_q *wq = NULL;
/*
* We need to combine multiple write requests on an FD's write
* queue But only if we don't need to seek() in between them, ugh!
* XXX This currently ignores any seeks (file_offset)
*/
... | false | false | false | false | false | 0 |
parse_tabbed_lines(const String &str, Vector<String> *fields1, ...)
{
va_list val;
Vector<void *> tabs;
va_start(val, fields1);
while (fields1) {
tabs.push_back((void *)fields1);
fields1 = va_arg(val, Vector<String> *);
}
va_end(val);
const char *begin = str.begin();
const char *end =... | false | false | false | false | false | 0 |
strscan_bol_p(VALUE self)
{
struct strscanner *p;
GET_SCANNER(self, p);
if (CURPTR(p) > S_PEND(p)) return Qnil;
if (p->curr == 0) return Qtrue;
return (*(CURPTR(p) - 1) == '\n') ? Qtrue : Qfalse;
} | false | false | false | false | false | 0 |
mwifiex_update_mp_end_port(struct mwifiex_adapter *adapter, u16 port)
{
struct sdio_mmc_card *card = adapter->card;
const struct mwifiex_sdio_card_reg *reg = card->reg;
int i;
card->mp_end_port = port;
card->mp_data_port_mask = reg->data_port_mask;
if (reg->start_wr_port) {
for (i = 1; i <= card->max_ports -... | false | false | false | false | false | 0 |
ensTranscriptFetchAllDatabaseentries(EnsPTranscript transcript,
const AjPStr name,
EnsEExternaldatabaseType type,
AjPList dbes)
{
AjBool namematch = AJFALSE;
AjBool typematch = AJF... | false | false | false | false | false | 0 |
canonicalize_addr_expr (tree *expr_p)
{
tree expr = *expr_p;
tree addr_expr = TREE_OPERAND (expr, 0);
tree datype, ddatype, pddatype;
/* We simplify only conversions from an ADDR_EXPR to a pointer type. */
if (!POINTER_TYPE_P (TREE_TYPE (expr))
|| TREE_CODE (addr_expr) != ADDR_EXPR)
return;
/* ... | false | false | false | false | false | 0 |
gtk_tray_icon_get_orientation_property (GtkTrayIcon *icon)
{
Display *xdisplay;
Atom type;
int format;
union {
gulong *prop;
guchar *prop_ch;
} prop = { NULL };
gulong nitems;
gulong bytes_after;
int error, result;
g_assert (icon->priv->manager_window != None);
xdisplay = GDK_DISPLAY_XDISPLAY ... | false | false | false | false | false | 0 |
g_mime_set_user_charsets (const char **charsets)
{
if (user_charsets)
g_strfreev (user_charsets);
if (charsets == NULL || charsets[0] == NULL) {
user_charsets = NULL;
return;
}
user_charsets = g_strdupv ((char **) charsets);
} | false | false | false | false | false | 0 |
CalcRFFilterCurve(struct tda_state *state)
{
int status = 0;
do {
msleep(200); /* Temperature stabilisation */
status = PowerScanInit(state);
if (status < 0)
break;
status = RFTrackingFiltersInit(state, 0);
if (status < 0)
break;
status = RFTrackingFiltersInit(state, 1);
if (status < 0)
br... | false | false | false | false | false | 0 |
redraw_prompt (t)
char *t;
{
char *oldp;
oldp = rl_display_prompt;
rl_save_prompt ();
rl_display_prompt = t;
local_prompt = expand_prompt (t, &prompt_visible_length,
&prompt_last_invisible,
&prompt_invis_chars_first_line,
&prompt_physical_chars);
local_prompt_prefix = (char *)NUL... | false | false | false | false | false | 0 |
IRead(hsStream* S) {
S->readByte(); // Version == 2
fPixelSize = S->readByte();
fSpace = S->readByte();
fFlags = S->readShort();
fCompressionType = S->readByte();
if (fCompressionType == kUncompressed || fCompressionType == kJPEGCompression)
fUncompressedInfo.fType = S->readByte();
... | false | false | false | false | false | 0 |
PhiFromHNCAC_ (VectorS *H_vectorSP, VectorS *N_vectorSP,
VectorS *CA_vectorSP, VectorS *C_vectorSP)
{
VectorS N_CA_vectorS, N_H_vectorS;
VectorS CA_N_vectorS, CA_C_vectorS;
VectorS u1S, u2S;
VectorS v1S, v2S;
double denom, ratio;
double alpha, phi;
/* The first pair of auxiliary vectors: */
N_CA_vectorS... | false | false | false | false | false | 0 |
wm831x_epe_probe(struct platform_device *pdev)
{
struct wm831x *wm831x = dev_get_drvdata(pdev->dev.parent);
struct wm831x_pdata *pdata = dev_get_platdata(wm831x->dev);
struct regulator_config config = { };
int id = pdev->id % ARRAY_SIZE(pdata->epe);
struct wm831x_dcdc *dcdc;
int ret;
dev_dbg(&pdev->dev, "Probin... | false | false | false | false | false | 0 |
as10x_cmd_add_PID_filter(struct as10x_bus_adapter_t *adap,
struct as10x_ts_filter *filter)
{
int error;
struct as10x_cmd_t *pcmd, *prsp;
pcmd = adap->cmd;
prsp = adap->rsp;
/* prepare command */
as10x_cmd_build(pcmd, (++adap->cmd_xid),
sizeof(pcmd->body.add_pid_filter.req));
/* fill command */
pcm... | false | false | false | false | false | 0 |
gitg_revision_files_view_parser_finished (GtkBuildable *buildable,
GtkBuilder *builder)
{
GitgRevisionFilesView *files_view = GITG_REVISION_FILES_VIEW (buildable);
GtkTreeSelection *selection;
if (parent_iface.parser_finished)
{
parent_iface.parser_finished (buildable,... | false | false | false | false | false | 0 |
map_time_auto_bound (GogAxis *axis, double minimum, double maximum, double *bound)
{
enum { U_Second, U_Minute, U_Hour, U_Day } u;
static const double invunits[4] = { 24* 60 * 60, 24 * 60, 24, 1 };
GOFormat *fmt = gog_axis_get_effective_format (axis);
int is_time = go_format_is_time (fmt);
double range = fabs (max... | false | false | false | false | false | 0 |
add_color_to_treeview ()
{
GtkTreeView *treeview;
GtkTreeSelection *selection;
/* add color to tree view */
add_list_color (hex_value (colorvalue), colorname, USER_COLOR, TRUE);
/* scroll tree view so user sees new color */
treeview = GTK_TREE_VIEW (lookup_widget (gcolor2, "treeview"));
selection = gtk_... | false | false | false | false | false | 0 |
end_delayed_insert(THD *thd)
{
DBUG_ENTER("end_delayed_insert");
Delayed_insert *di=thd->di;
mysql_mutex_lock(&di->mutex);
DBUG_PRINT("info",("tables in use: %d",di->tables_in_use));
if (!--di->tables_in_use || di->thd.killed)
{ // Unlock table
di->status=1;
mysql_cond_signal(&di->cond);
}
... | false | false | false | false | false | 0 |
lookup_ship_status(net_player *p,int unique_id,int remove)
{
int idx;
for(idx=0;idx<p->s_info.num_last_buttons;idx++){
if(p->s_info.last_buttons_id[idx] == unique_id){
if(remove){
remove_ship_status_item(p,idx);
p->s_info.num_last_buttons--;
}
return 1;
}
}
return 0;
} | false | false | false | false | false | 0 |
gpk_application_run_installed (GpkApplicationPrivate *priv, PkResults *results)
{
guint i;
GPtrArray *array;
PkPackage *item;
GPtrArray *package_ids_array;
gchar **package_ids = NULL;
PkInfoEnum info;
gchar *package_id = NULL;
/* get the package array and filter on INSTALLED */
package_ids_array = g_ptr_array... | false | false | false | false | false | 0 |
afr_mark_success_children_sources (int32_t *sources, int32_t *success_children,
unsigned int child_count)
{
int i = 0;
for (i = 0; i < child_count; i++) {
if (success_children[i] == -1)
break;
sources[success_chil... | false | false | false | false | false | 0 |
gm_mcp_icecrew_userlist_new_rank_state_icon(GmMcpIcecrewUserlist *package,
gchar *path, gboolean rank) {
GList *names;
GList *tmp;
GmMcpPackage *playerdb;
playerdb = gm_mcp_session_find_package(GM_MCP_PACKAGE_SESSION(package),
"dns-nl-icecrew-playerdb");
g_return_if_fail(playerdb != NULL);
if (rank) {... | false | false | false | false | false | 0 |
trace_insert_enum_map_file(struct module *mod, struct trace_enum_map **start,
int len)
{
struct trace_enum_map **stop;
struct trace_enum_map **map;
union trace_enum_map_item *map_array;
union trace_enum_map_item *ptr;
stop = start + len;
/*
* The trace_enum_maps contains the map plus a head and tail ite... | false | false | false | false | false | 0 |
get_initial_cred(krb5_context context, krb5_gss_cred_id_rec *cred)
{
krb5_error_code code;
krb5_get_init_creds_opt *opt = NULL;
krb5_creds creds;
code = krb5_get_init_creds_opt_alloc(context, &opt);
if (code)
return code;
code = krb5_get_init_creds_opt_set_out_ccache(context, opt, cred-... | false | false | false | false | false | 0 |
free_vibration()
{
gint i;
gint j;
if(vibration.geometry)
{
for(i=0;i<vibration.numberOfAtoms;i++)
if(vibration.geometry[i].symbol)
g_free(vibration.geometry[i].symbol);
g_free(vibration.geometry);
}
if(vibration.modes)
{
for(i=0;i<vibration.numberOfFrequences;i++)
{
if(vibration.modes[i].sym... | false | false | false | false | false | 0 |
pts() {
if(_packet == NULL) {
return 0;
}
if(_packet->getMsgID() == XVDR_STREAM_MUXPKT) {
_packet->rewind();
_packet->get_U16();
int64_t pts = _packet->get_S64();
_packet->rewind();
return pts;
}
return 0;
} | false | false | false | false | false | 0 |
soup_cache_entry_set_freshness (SoupCacheEntry *entry, SoupMessage *msg, SoupCache *cache)
{
const char *cache_control;
const char *expires, *date, *last_modified;
/* Reset these values. We have to do this to ensure that
* revalidations overwrite previous values for the headers.
*/
entry->must_revalidate = FAL... | false | false | false | false | false | 0 |
ct_dump_reader_status (int slot)
{
log_info ("reader slot %d: %s\n", slot,
reader_table[slot].status == 1? "Processor ICC present" :
reader_table[slot].status == 0? "Memory ICC present" :
"ICC not present" );
} | false | false | false | false | false | 0 |
H5AC_check_if_write_permitted(const H5F_t UNUSED * f,
hid_t UNUSED dxpl_id,
hbool_t * write_permitted_ptr)
#endif /* H5_HAVE_PARALLEL */
{
hbool_t write_permitted = TRUE;
herr_t ret_value = SUCCEED; /* Return value */
#ifdef H5_HAVE_PARALLEL
... | false | false | false | false | false | 0 |
string_parse(int c, char **argv, int invert, unsigned int *flags,
const void *entry, struct xt_entry_match **match)
{
struct xt_string_info *stringinfo =
(struct xt_string_info *)(*match)->data;
const int revision = (*match)->u.user.revision;
switch (c) {
case '1':
if (*flags & FROM)
xtables... | false | false | false | false | true | 1 |
FindCommand(ChatCommand* table, char const*& text, ChatCommand*& command, ChatCommand** parentCommand /*= NULL*/, std::string* cmdNamePtr /*= NULL*/, bool allAvailable /*= false*/, bool exactlyName /*= false*/)
{
std::string cmd = "";
// skip whitespaces
while (*text != ' ' && *text != '\0')
{
... | false | false | false | false | false | 0 |
annCoGaussPts( // correlated-Gaussian distribution
ANNpointArray pa, // point array (modified)
int n, // number of points
int dim, // dimension
double correlation) // correlation
{
double std_dev_w = sqrt(1.0 - correlation * correlation);
for (int i = 0; i < n; i++) {
double previous = an... | false | false | false | false | false | 0 |
mpu_data_read(struct cpssp *cpssp)
{
unsigned char read_data;
unsigned char tmp_val;
int overflow;
overflow = databuf_get(&cpssp->mpu.dataout, &tmp_val);
if (overflow) {
read_data = 0xff;
} else {
read_data = tmp_val;
}
return read_data;
} | false | false | false | false | false | 0 |
fop_fsync_stub (call_frame_t *frame, fop_fsync_t fn,
fd_t *fd, int32_t datasync, dict_t *xdata)
{
call_stub_t *stub = NULL;
GF_VALIDATE_OR_GOTO ("call-stub", frame, out);
stub = stub_new (frame, 1, GF_FOP_FSYNC);
GF_VALIDATE_OR_GOTO ("call-stub", stub, out);
st... | false | false | false | false | false | 0 |
debug_frameline(lua_State *L, GCfunc *fn, cTValue *nextframe)
{
BCPos pc = debug_framepc(L, fn, nextframe);
if (pc != NO_BCPOS) {
GCproto *pt = funcproto(fn);
lua_assert(pc <= pt->sizebc);
return lj_debug_line(pt, pc);
}
return -1;
} | false | false | false | false | false | 0 |
nv04_fifo_intr(struct nvkm_fifo *base)
{
struct nv04_fifo *fifo = nv04_fifo(base);
struct nvkm_subdev *subdev = &fifo->base.engine.subdev;
struct nvkm_device *device = subdev->device;
u32 mask = nvkm_rd32(device, NV03_PFIFO_INTR_EN_0);
u32 stat = nvkm_rd32(device, NV03_PFIFO_INTR_0) & mask;
u32 reassign, chid, ge... | false | false | false | false | false | 0 |
hq_init(void)
{
struct hash_table *ht;
ht = &hash_table;
if ((ht->memptr = (struct hq_entry *)malloc(HQ_ENTRY_CHUNK *
sizeof(struct hq_entry))) == NULL) {
error(INFO, "cannot malloc memory for hash queues: %s\n",
strerror(errno));
ht->flags = HASH_QUEUE_NONE;
pc->flags &= ~HASH;
return;
}
... | false | false | false | false | false | 0 |
fs_mhash_check_chain(fs_mhash *mh, fs_tbchain *tbc, FILE *out, int verbosity)
{
if (!mh) {
fs_error(LOG_CRIT, "tried to print NULL mhash");
return;
}
fs_mhash_entry e;
int entry = 0;
int count = 0;
lseek(mh->fd, sizeof(struct mhash_header), SEEK_SET);
while (read(mh->fd, &e... | false | true | false | false | true | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.