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 |
|---|---|---|---|---|---|---|
set_pop(PySetObject *so)
{
Py_ssize_t i = 0;
setentry *entry;
PyObject *key;
assert (PyAnySet_Check(so));
if (so->used == 0) {
PyErr_SetString(PyExc_KeyError, "pop from an empty set");
return NULL;
}
/* Set entry to "the first" unused or dummy set entry. We abuse
* th... | false | false | false | false | false | 0 |
gst_rtp_buffer_add_extension_onebyte_header (GstRTPBuffer * rtp, guint8 id,
gpointer data, guint size)
{
guint16 bits;
guint8 *pdata = 0;
guint wordlen;
gboolean has_bit;
guint extlen, offset = 0;
g_return_val_if_fail (id > 0 && id < 15, FALSE);
g_return_val_if_fail (size >= 1 && size <= 16, FALSE);
... | false | true | false | false | false | 1 |
ns1__lusol(struct soap *soap, matrix *a, vector *b, vector *x)
{ ivector indx(soap);
double d;
if (ludcmp(soap, *a, indx, d))
return soap_sender_fault(soap, "Singular matrix in routine ludcmp", NULL);
lubksb(*a, indx, *b);
*x = *b;
return SOAP_OK;
} | false | false | false | false | false | 0 |
sumlikely(node *p, node *q, double *sum)
{ /* sum contribution to likelihood over forks in tree */
long i, j, m;
double term, sumsq, vee;
double temp;
if (!p->tip)
sumlikely(p->next->back, p->next->next->back, sum);
if (!q->tip)
sumlikely(q->next->back, q->next->next->back, sum);
if (p->back == q)
... | false | false | false | false | false | 0 |
rndis_status(struct usbnet *dev, struct urb *urb)
{
netdev_dbg(dev->net, "rndis status urb, len %d stat %d\n",
urb->actual_length, urb->status);
// FIXME for keepalives, respond immediately (asynchronously)
// if not an RNDIS status, do like cdc_status(dev,urb) does
} | false | false | false | false | false | 0 |
socket_disconnect (guint32 fd)
{
struct _WapiHandle_socket *socket_handle;
gboolean ok;
gpointer handle = GUINT_TO_POINTER (fd);
int newsock, ret;
ok = _wapi_lookup_handle (handle, WAPI_HANDLE_SOCKET,
(gpointer *)&socket_handle);
if (ok == FALSE) {
g_warning ("%s: error looking up socket handle %p", __f... | false | false | false | false | false | 0 |
vmod_syslog(struct sess *sp, int fac, const char *fmt, ...)
{
char buf[8192], *p;
va_list ap;
(void)sp;
va_start(ap, fmt);
p = VRT_StringList(buf, sizeof buf, fmt, ap);
va_end(ap);
if (p != NULL)
syslog(fac, "%s", buf);
} | false | false | false | false | false | 0 |
hideInterface()
{
m_documents->setFooterVisible(false);
m_documents->setHeaderVisible(false);
m_documents->setScenesVisible(false);
for (int i = 0; i < m_documents->count(); ++i) {
m_documents->document(i)->setScrollBarVisible(false);
}
} | false | false | false | false | false | 0 |
event_matches( debugger_event_t *event, const char *type, const char *detail )
{
if( strcasecmp( type, event->type ) ) return 0;
if( strcmp( detail, "*" ) == 0 ) return 1;
return strcasecmp( detail, event->detail ) == 0;
} | false | false | false | false | false | 0 |
FindNewReps2(
Obj tree,
Obj reps,
Obj pr /* pc-presentation for a
** nilpotent group <G> */
)
{
Obj lsubs, /* stores pos(<subtree>) for all subt... | false | false | false | false | false | 0 |
as3935_trigger_handler(int irq, void *private)
{
struct iio_poll_func *pf = private;
struct iio_dev *indio_dev = pf->indio_dev;
struct as3935_state *st = iio_priv(indio_dev);
int val, ret;
ret = as3935_read(st, AS3935_DATA, &val);
if (ret)
goto err_read;
st->buffer[0] = val & AS3935_DATA_MASK;
iio_push_to_b... | false | false | false | false | false | 0 |
alloc_private_and_read(struct lib_context *lc, const char *who,
size_t size, char *path, loff_t offset)
{
void *ret;
if ((ret = alloc_private(lc, who, size))) {
if (!read_file(lc, who, path, ret, size, offset)) {
dbg_free(ret);
ret = NULL;
}
}
return ret;
} | false | false | false | false | false | 0 |
apol_context_create_from_literal(const char *context_string)
{
apol_context_t *c = NULL;
bool is_context_compiled = false;
regex_t context_regex;
const size_t nmatch = 5;
regmatch_t pmatch[nmatch];
if ((c = apol_context_create()) == NULL) {
goto err;
}
if (regcomp(&context_regex, "^([^:]*):([^:]*):([^:]*):?... | false | false | false | false | false | 0 |
alm_search_results_widget_on_commercial_suggestion_activated (AlmSearchResultsWidget* self) {
GtkSwitch* _tmp0_ = NULL;
gboolean _tmp1_ = FALSE;
g_return_if_fail (self != NULL);
_tmp0_ = self->priv->commercial_suggestion;
_tmp1_ = gtk_switch_get_active (_tmp0_);
if (_tmp1_) {
alm_search_results_widget_set_remot... | false | false | false | false | false | 0 |
gtk_sctree_real_unselect_all (GtkCMCList *clist)
{
GtkSCTree *sctree;
gboolean should_freeze = FALSE;
cm_return_if_fail (clist != NULL);
cm_return_if_fail (GTK_IS_SCTREE (clist));
sctree = GTK_SCTREE (clist);
if (sc_g_list_bigger(GTK_CMCLIST(sctree)->selection, 10)) {
should_freeze = TRUE;
sctree->selectin... | false | false | false | false | false | 0 |
recv_indicatepkts_in_order(struct adapter *padapter, struct recv_reorder_ctrl *preorder_ctrl, int bforced)
{
struct list_head *phead, *plist;
struct recv_frame *prframe;
struct recv_frame *prhdr;
struct rx_pkt_attrib *pattrib;
int bPktInBuf = false;
struct recv_priv *precvpriv = &padapter->recvpriv;
struct __que... | false | false | false | false | false | 0 |
type3_infoblock(struct net_device *dev, u_char count, u_char *p)
{
struct de4x5_private *lp = netdev_priv(dev);
u_char len = (*p & BLOCK_LEN)+1;
/* Recursively figure out the info blocks */
if (--count > lp->tcount) {
if (*(p+len) < 128) {
return dc_infoblock[COMPACT](dev, count, p+len);
} else ... | false | false | false | false | false | 0 |
print_download_id(gnet_fi_t handle, void *udata)
{
struct gnutella_shell *sh = udata;
gnet_fi_info_t *info;
shell_check(sh);
info = guc_fi_get_info(handle);
g_return_if_fail(info);
shell_write(sh, guid_to_string(info->guid));
shell_write(sh, "\n"); /* Terminate line */
} | false | false | false | false | false | 0 |
FillInputPortInformation(int, vtkInformation* info)
{
info->Set(vtkAlgorithm::INPUT_IS_REPEATABLE(), 1);
if(this->NumberOfRequiredInputs == 0)
{
info->Set(vtkAlgorithm::INPUT_IS_OPTIONAL(), 1);
}
return 1;
} | false | false | false | false | false | 0 |
at76_rx_tasklet(unsigned long param)
{
struct urb *urb = (struct urb *)param;
struct at76_priv *priv = urb->context;
struct at76_rx_buffer *buf;
struct ieee80211_rx_status rx_status = { 0 };
if (priv->device_unplugged) {
at76_dbg(DBG_DEVSTART, "device unplugged");
at76_dbg(DBG_DEVSTART, "urb status %d", urb->... | false | false | false | false | false | 0 |
myxmlGetDirection(xmlNodePtr cur, float &x, float &y)
{
if (myxmlHasProp(cur, "angle")) {
float angle = myxmlGetPropFloat(cur, "angle") * M_PI / 180.0;
float speed = myxmlGetPropFloat(cur, "length");
x = cosf(angle) * speed;
y = sinf(angle) * speed;
} else {
x = myxmlGetP... | false | false | false | false | false | 0 |
test_file_perm2(void)
{
hid_t file; /* File opened with read-write permission */
hid_t filero; /* Same file opened with read-only permission */
hid_t dspace; /* Dataspace ID */
hid_t group; /* Group ID */
hid_t dset; /* Dataset ID */
hid_t type; /* Data... | false | false | false | false | false | 0 |
track_set_filename(Track *track, char *filename)
{
if (track->file.name) {
free(track->file.name);
}
track->file.name = strdup(filename);
} | false | false | false | false | false | 0 |
setAlert(const PsiIcon* icon)
{
if (alert_) {
alert_->stop();
delete alert_;
alert_ = 0;
}
if (icon) {
alert_ = new AlertIcon(icon);
alert_->activated(false);
connect(alert_, SIGNAL(pixmapChanged()), SLOT(alertFrameUpdated()));
alertFrameUpdated();
}
} | false | false | false | false | false | 0 |
recv_handler(struct ib_mad_agent *agent,
struct ib_mad_recv_wc *mad_recv_wc)
{
struct ib_umad_file *file = agent->context;
struct ib_umad_packet *packet;
if (mad_recv_wc->wc->status != IB_WC_SUCCESS)
goto err1;
packet = kzalloc(sizeof *packet, GFP_KERNEL);
if (!packet)
goto err1;
packet->length = mad_r... | false | false | false | false | false | 0 |
dump_ajp_addr(ajp_worker_t *aw, char *buf)
{
if (aw->port > 0)
return jk_dump_hinfo(&aw->worker_inet_addr, buf);
else {
if (aw->addr_sequence != aw->s->addr_sequence)
return "unresolved";
else
return "invalid";
}
} | false | false | false | false | false | 0 |
__connman_resolver_redo_servers(int index)
{
GSList *list;
if (dnsproxy_enabled == FALSE)
return 0;
DBG("index %d", index);
if (index < 0)
return -EINVAL;
for (list = entry_list; list; list = list->next) {
struct entry_data *entry = list->data;
if (entry->timeout == 0 || entry->index != index)
cont... | false | false | false | false | false | 0 |
bx_write_serial_options(FILE *fp, bx_list_c *base, int n)
{
fprintf(fp, "com%d: enabled=%d", n, SIM->get_param_bool("enabled", base)->get());
if (SIM->get_param_bool("enabled", base)->get()) {
fprintf(fp, ", mode=%s", SIM->get_param_enum("mode", base)->get_selected());
fprintf(fp, ", dev=\"%s\"", SIM->get_p... | false | false | false | false | false | 0 |
setRenderQueueGroup(uint8 queueID)
{
assert(queueID <= RENDER_QUEUE_MAX && "Render queue out of range!");
mRenderQueueIDSet = true;
mRenderQueueID = queueID;
// tell any existing regions
for (RegionMap::iterator ri = mRegionMap.begin();
ri != mRegionMap.end(); ++r... | false | false | false | false | false | 0 |
gth_file_store_get_iter (GtkTreeModel *tree_model,
GtkTreeIter *iter,
GtkTreePath *path)
{
GthFileStore *file_store;
GthFileRow *row;
int *indices, n;
g_return_val_if_fail (path != NULL, FALSE);
file_store = (GthFileStore *) tree_model;
indices = gtk_tree_path_get_indices (path);
n = indi... | false | false | false | false | false | 0 |
dumpDescriptionSet(void)
{
if (hasDescriptionDataInstalled()==MSFalse)
{
installHolidayDescriptionData();
}
MSResourceCodeDescriptionSetCursor cursor(_descSet);
forCursor(cursor)
{
_descSet.elementAt(cursor).dump();
}
} | false | false | false | false | false | 0 |
_dlmap_read(DLHandler * const dlhandler)
{
ssize_t readnb;
if (dlhandler->dlmap_size > dlhandler->sizeof_map) {
abort();
}
if (dlhandler->dlmap_size <= (size_t) 0U) {
return 0;
}
if (dlhandler->dlmap_pos != dlhandler->dlmap_fdpos) {
do {
if (lseek(dlhandl... | false | false | false | false | false | 0 |
parameter_brace_remove_pattern (varname, value, patstr, rtype, quoted)
char *varname, *value, *patstr;
int rtype, quoted;
{
int vtype, patspec, starsub;
char *temp1, *val, *pattern;
SHELL_VAR *v;
if (value == 0)
return ((char *)NULL);
this_command_name = varname;
vtype = get_var_and_type (v... | false | false | false | false | false | 0 |
RPC_ReleaseCounter_TP(struct host_table_entry* hte,
TSS_COUNTER_ID idCounter, /* in */
TPM_AUTH* pCounterAuth) /* in, out */
{
TSS_RESULT result;
initData(&hte->comm, 3);
hte->comm.hdr.u.ordinal = TCSD_ORD_RELEASECOUNTER;
LogDebugFn("IN: TCS Context: 0x%x", hte->tcsContex... | false | false | false | false | false | 0 |
getNofComponents(bool only_emf_components) const
{
if ( ptrGmtr != NULL )
return ptrGmtr->getNofComponents(only_emf_components);
else if ( meshData != NULL )
return 1;
else
return 0;
} | false | false | false | false | false | 0 |
test_checkout_typechange__checkout_typechanges_safe(void)
{
int i;
git_object *obj;
git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
for (i = 0; g_typechange_oids[i] != NULL; ++i) {
cl_git_pass(git_revparse_single(&obj, g_repo, g_typechange_oids[i]));
opts.checkout_strategy = GIT_CHECKOUT_FORCE;
/* There a... | false | false | false | false | false | 0 |
isSigned(const Variable* var)
{
return (var && !var->typeStartToken()->isUnsigned() && Token::Match(var->typeEndToken(), "int|char|short|long") && !var->isPointer() && !var->isArray());
} | false | false | false | false | false | 0 |
cnu4(buf, count)
char *buf;
unsigned count;
{
switch (count)
{
case 0:
return 0;
case 1:
return buf[0] & 0xFF;
case 2:
return c2u2(buf);
case 4:
return c4u4(buf);
default:
xxerr("WARNING: typeconv.c(cnu4) illegal count\n");
return 0;
}
} | false | false | false | false | false | 0 |
gnucash_sheet_block_set_from_table (GnucashSheet *sheet,
VirtualCellLocation vcell_loc)
{
Table *table;
SheetBlock *block;
SheetBlockStyle *style;
VirtualCell *vcell;
block = gnucash_sheet_get_block (sheet, vcell_loc);
style = gnucash_sheet_get_style_from_tab... | false | false | false | false | false | 0 |
gn_mms_content_type_lookup(gn_mms_content type)
{
int i;
type |= 0x80;
for (i = 0; i < sizeof(content_type_fields) / sizeof(content_type_fields[0]); i++) {
if (content_type_fields[i].type == type) {
return &content_type_fields[i];
}
}
return NULL;
} | false | false | false | false | false | 0 |
orthdev_series (const double *x, double *y, const DATASET *dset)
{
double xbar;
int n, s, t, Tt;
for (t=dset->t1; t<dset->t2; t++) {
if (na(x[t])) {
continue;
}
if (dataset_is_panel(dset)) {
Tt = dset->pd - (t % dset->pd) - 1;
} else {
Tt = dset->t2 - t;
}
xbar = 0.0;
n = 0;
for (... | false | false | false | false | false | 0 |
grd_INSIDE_XY (struct GRDMATH_INFO *info, float *stack[], GMT_LONG *constant, double *factor, GMT_LONG last)
{ /* Version for Cartesian data */
GMT_LONG i, j, P, inside, k;
struct GMT_TABLE *polygon;
if (GMT_io.binary[GMT_IN] && GMT_io.ncol[GMT_IN] == 0) GMT_io.ncol[GMT_IN] = 2; /* Default is 2 input cols for binar... | false | false | false | false | false | 0 |
read_long_string (void)
{
int cont = 0;
int spaceleft = textsize - (yytextLast - yytext);
while (1)
{
if (spaceleft <= 2) /* may read more than 1 char in one cicle */
{
growtext();
spaceleft = textsize - (yytextLast - yytext);
}
switch (current)
{
case EOF:
case 0:
... | false | false | false | false | false | 0 |
upd_greeteruid(Entry *ce, Section *cs ATTR_UNUSED)
{
struct passwd *pw;
char *ok, *useradd;
int uid;
if (use_destdir || !ce->active)
return;
if (!(pw = getpwnam(ce->value))) {
uid = strtol(ce->value, &ok, 10);
if (*ok || !(pw = getpwuid(uid))) {
if ((useradd = lo... | false | false | false | false | false | 0 |
perf_ustack_task_size(struct pt_regs *regs)
{
unsigned long addr = perf_user_stack_pointer(regs);
if (!addr || addr >= TASK_SIZE)
return 0;
return TASK_SIZE - addr;
} | false | false | false | false | false | 0 |
buildin_mapwarp(struct script_state *st)
{
int x,y,m;
char *mapname, *str;
mapname=conv_str(st,& (st->stack->stack_data[st->start+2]));
str=conv_str(st,& (st->stack->stack_data[st->start+3]));
x=conv_num(st,& (st->stack->stack_data[st->start+4]));
y=conv_num(st,& (st->stack->stack_data[st->start+5]));
m = scri... | false | false | false | false | false | 0 |
iser_post_recvm(struct iser_conn *iser_conn, int count)
{
struct ib_recv_wr *rx_wr, *rx_wr_failed;
int i, ib_ret;
struct ib_conn *ib_conn = &iser_conn->ib_conn;
unsigned int my_rx_head = iser_conn->rx_desc_head;
struct iser_rx_desc *rx_desc;
for (rx_wr = ib_conn->rx_wr, i = 0; i < count; i++, rx_wr++) {
rx_des... | false | false | false | false | false | 0 |
GetAtomicMass() const
{
if (_isotope == 0)
return etab.GetMass(_ele);
else
return isotab.GetExactMass(_ele, _isotope);
} | false | false | false | false | false | 0 |
addvheader ( struct dent *dp)
{
register struct dent * tdent; /* Copy of entry */
/*
** Add a second entry with the correct capitalization, and then make
** dp into a special dummy entry.
*/
tdent = static_cast<struct dent *>(malloc(sizeof (struct dent)));
if (tdent == NULL)
{
fprintf (s... | false | false | false | false | false | 0 |
hasProperty(Transaction *tx, QString name) const
{
Store *s = getStore(tx);
Uri property = getPropertyUri(name);
Triple r = s->matchOnce(Triple(m_node, property, Node()));
return (r != Triple());
} | false | false | false | false | false | 0 |
slotSeparatorChange()
{
if( m_ui->rbAnd->isChecked() )
m_separator = QString( " AND " );
else
m_separator = QString( " OR " );
updateSearchEdit();
} | false | false | false | false | false | 0 |
create_multi_NUBspline_3d_s (NUgrid* x_grid, NUgrid* y_grid, NUgrid* z_grid,
BCtype_s xBC, BCtype_s yBC, BCtype_s zBC,
int num_splines)
{
// Create new spline
multi_NUBspline_3d_s* restrict spline = malloc (sizeof(multi_NUBspline_3d_s));
if (spline == NULL)
return spline;
spline->spcode = MULTI... | false | false | false | false | false | 0 |
cache_tree_free(struct cache_tree **it_p)
{
int i;
struct cache_tree *it = *it_p;
if (!it)
return;
for (i = 0; i < it->subtree_nr; i++)
if (it->down[i])
cache_tree_free(&it->down[i]->cache_tree);
free(it->down);
free(it);
*it_p = NULL;
} | false | false | false | false | false | 0 |
isOnlyUsedInEntryBlock(const Argument *A, bool EnableFastISel) {
// With FastISel active, we may be splitting blocks, so force creation
// of virtual registers for all non-dead arguments.
if (EnableFastISel)
return A->use_empty();
const BasicBlock *Entry = A->getParent()->begin();
for (Value::const_use_i... | false | false | false | false | false | 0 |
uartslkIsr(void)
{
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
uint8_t rxDataInterrupt;
if (USART_GetITStatus(UARTSLK_TYPE, USART_IT_TXE))
{
if (outDataIsr && (dataIndexIsr < dataSizeIsr))
{
USART_SendData(UARTSLK_TYPE, outDataIsr[dataIndexIsr] & 0x00FF);
dataIndexIsr++;
}
els... | false | false | false | false | false | 0 |
inv_mix_column(UINT32 *a, UINT32 *b)
{
UINT8 c[4][4];
int i, j;
for(j = 0; j < 4; j++) {
for(i = 0; i < 4; i++) {
c[j][i] = mul(0xe, (a[j] >> i*8) & 0xff)
^ mul(0xb, (a[j] >> ((i+1)%4)*8) & 0xff)
^ mul(0xd, (a[j] >> ((i+2)%4)*8) & 0xff)
^ mul(0x9, (a[j] >> ((i+3)%4)*8) & 0xff);
}
}
for(i = ... | false | false | false | false | false | 0 |
DrucConcateneErrorFiles ( DrucFigureRds,
DrucErrorFile
)
rdsfig_list *DrucFigureRds;
FILE *DrucErrorFile;
{
rdsins_list *InstanceCourante;
char *TmpErrorFileName;
FILE *TmpErrorFile;
char DrucTmpFileBuffer [ DRUC_MAX_ST... | false | false | false | false | false | 0 |
DoStereoRender()
{
vtkCollectionSimpleIterator rsit;
this->Start();
this->StereoUpdate();
if (this->StereoType != VTK_STEREO_RIGHT)
{ // render the left eye
vtkRenderer *aren;
for (this->Renderers->InitTraversal(rsit);
(aren = this->Renderers->GetNextRenderer(rsit)); )
{
// Ug... | false | false | false | false | false | 0 |
write_one_ref(const char *name, const unsigned char *sha1,
int flags, void *data)
{
struct strbuf *buf = data;
int len = buf->len;
FILE *f;
/* when called via for_each_ref(), flags is non-zero */
if (flags && prefixcmp(name, "refs/heads/") &&
prefixcmp(name, "refs/tags/"))
return 0;
strbuf_addstr(buf, na... | false | false | false | false | true | 1 |
submodule_cache_remove_item(
git_submodule_cache *cache,
git_submodule *item,
bool free_after_remove)
{
git_strmap *map;
const char *name, *alt;
if (!cache || !(map = cache->submodules) || !item)
return;
name = item->name;
alt = (item->path != item->name) ? item->path : NULL;
for (; name; name = alt, alt... | false | false | false | false | false | 0 |
camel_transport_send_to_sync (CamelTransport *transport,
CamelMimeMessage *message,
CamelAddress *from,
CamelAddress *recipients,
GCancellable *cancellable,
GError **erro... | false | false | false | true | false | 1 |
set_pass(const char *arg)
{
struct pool *pool;
if (total_userpasses)
return "Use only user + pass or userpass, but not both";
total_passes++;
if (total_passes > total_pools)
add_pool();
pool = pools[total_passes - 1];
opt_set_charp(arg, &pool->rpc_pass);
return NULL;
} | false | false | false | false | false | 0 |
replacement(GAIncrementalGA::ReplacementScheme n,
GAIncrementalGA::ReplacementFunction f){
switch(n){
case BEST:
case WORST:
case RANDOM:
case PARENT:
rs = n;
break;
case CUSTOM:
if(f){ rs = n; rf = f; }
else GAErr(GA_LOC, className(), "replacement", gaErrNeedRS);
break;
default:... | false | false | false | false | false | 0 |
unuse()
{
lock_master();
_refcount--;
bool del = (_refcount <= 0);
unlock_master();
if (del)
delete this;
} | false | false | false | false | false | 0 |
go_combo_box_button_press (GtkWidget *widget, GdkEventButton *event, GOComboBox *combo_box)
{
GtkWidget *child = gtk_get_event_widget ((GdkEvent *) event);
if (child != widget){
while (child){
if (child == widget)
return FALSE;
child = gtk_widget_get_parent (child);
}
}
go_combo_box_popup_hide (combo... | false | false | false | false | false | 0 |
BEncAsnNull PARAMS((b, data),
BUF_TYPE b _AND_
AsnNull* data)
{
AsnLen len;
len = BEncAsnNullContent(b, data);
len += BEncDefLen(b, len);
len += BEncTag1(b, UNIV, PRIM, NULLTYPE_TAG_CODE);
return(len);
} | false | false | false | false | false | 0 |
insertInterval(dtSegInterval* ints, int& nints, const int maxInts,
const short tmin, const short tmax, const dtPolyRef ref)
{
if (nints+1 > maxInts) return;
// Find insertion point.
int idx = 0;
while (idx < nints)
{
if (tmax <= ints[idx].tmin)
break;
idx++;
}
// Move current results.
if (nints-... | false | false | false | false | false | 0 |
UpdateResult(CSearchFile* toupdate)
{
long index = FindItem(-1, reinterpret_cast<wxUIntPtr>(toupdate));
if (index != -1) {
// Update the filename, which may be changed in case of multiple variants.
SetItem(index, ID_SEARCH_COL_NAME, toupdate->GetFileName().GetPrintable());
wxString temp = CFormat(wxT("%d")) % ... | false | false | false | false | false | 0 |
outlineBox(QPainter *p, int _tx, int _ty, const char *color)
{
p->setPen(QPen(QColor(color), 1, Qt::DotLine));
p->setBrush( Qt::NoBrush );
p->drawRect(_tx, _ty, m_width, m_height);
} | false | false | false | false | false | 0 |
main(int argc, char *argv[])
{
char *file = NULL;
/* don't load strongswan.conf */
library_init("", "settings-test");
atexit(library_deinit);
dbg_default_set_level(3);
while (true)
{
struct option long_opts[] = {
{"help", no_argument, NULL, 'h' },
{"debug", no_argument, NULL, 'd' },
{"file", r... | false | true | true | false | true | 1 |
setVetoScales(tSubProPtr subpro) const {
for ( vector<Ptr<MatchboxReweightBase>::ptr>::const_iterator rw =
theReweights.begin(); rw != theReweights.end(); ++rw ) {
if ( !(**rw).apply() )
continue;
(**rw).setVetoScales(subpro);
}
} | false | false | false | false | false | 0 |
process_fw_async_msg(struct intel_sst_drv *sst_drv_ctx,
struct ipc_post *msg)
{
u32 msg_id;
int str_id;
u32 data_size, i;
void *data_offset;
struct stream_info *stream;
union ipc_header_high msg_high;
u32 msg_low, pipe_id;
msg_high = msg->mrfld_header.p.header_high;
msg_low = msg->mrfld_header.p.header_low... | false | false | false | false | false | 0 |
_destroy_decal(GkrellmDecal *d)
{
if (!d)
return;
if ((d->flags & DF_LOCAL_PIXMAPS) && d->pixmap)
g_object_unref(G_OBJECT(d->pixmap));
if (d->stencil)
g_object_unref(G_OBJECT(d->stencil));
if (d->text_list)
decal_text_list_free(&d->text_list);
if (d->scroll_text)
g_free(d->scroll_text);
if (d->panel)
... | false | false | false | false | false | 0 |
write_xml_stream (FILE *f, ggobid *gg, const gchar *filename, XmlWriteInfo *xmlWriteInfo)
{
gint numDatasets, i;
GGobiData *d;
numDatasets = g_slist_length(gg->d);
// g_printerr ("numDatasets %d\n", numDatasets);
write_xml_header (f, -1, gg, xmlWriteInfo);
for(i = 0; i < numDatasets; i++) {
d = (GGobiData ... | false | false | false | false | false | 0 |
find_other_exec_or_die(const char *argv0, const char *target, const char *versionstr)
{
int ret;
char *found_path;
found_path = pg_malloc(MAXPGPATH);
if ((ret = find_other_exec(argv0, target, versionstr, found_path)) < 0)
{
char full_path[MAXPGPATH];
if (find_my_exec(argv0, full_path) < 0)
strlcpy(... | false | false | false | false | false | 0 |
qed_int_get_num_sbs(struct qed_hwfn *p_hwfn,
int *p_iov_blks)
{
struct qed_igu_info *info = p_hwfn->hw_info.p_igu_info;
if (!info)
return 0;
if (p_iov_blks)
*p_iov_blks = info->free_blks;
return info->igu_sb_cnt;
} | false | false | false | false | false | 0 |
do_rev_list(int fd, void *create_full_pack)
{
int i;
struct rev_info revs;
pack_pipe = fdopen(fd, "w");
if (create_full_pack)
use_thin_pack = 0; /* no point doing it */
init_revisions(&revs, NULL);
revs.tag_objects = 1;
revs.tree_objects = 1;
revs.blob_objects = 1;
if (use_thin_pack)
revs.edge_hint = 1;
... | false | false | false | false | false | 0 |
get_init_priority (const char *name)
{
char *end;
unsigned long init_priority;
/* GCC uses the following section names for the init_priority
attribute with numerical values 101 and 65535 inclusive. A
lower value means a higher priority.
1: .init_array.NNNN/.fini_array.NNNN: Where NNNN is the
dec... | false | false | false | false | false | 0 |
order_regs_for_reload (struct insn_chain *chain)
{
int i;
HARD_REG_SET used_by_pseudos;
HARD_REG_SET used_by_pseudos2;
COPY_HARD_REG_SET (bad_spill_regs, fixed_reg_set);
memset (spill_cost, 0, sizeof spill_cost);
memset (spill_add_cost, 0, sizeof spill_add_cost);
/* Count number of uses of each hard re... | false | false | false | false | false | 0 |
set_test_is_active(bool b)
{
bool changed = (test_is_active_ != b);
test_is_active_ = b;
if (changed) {
signal_changed.emit(this); // so that everybody stops any test-aborting operations.
}
} | false | false | false | false | false | 0 |
iothread_init(void)
{
static bool inited = false;
if (! inited)
{
inited = true;
/* Initialize the queue lock */
VOMIT_ON_FAILURE(pthread_mutex_init(&s_request_queue_lock, NULL));
/* Initialize the completion pipes */
int pipes[2] = {0, 0};
VOMIT_ON_FAILURE(... | false | false | false | false | false | 0 |
panel_gsettings_is_valid_keyname (const gchar *key,
GError **error)
{
gint i;
if (key[0] == '\0')
{
g_set_error_literal (error, G_MARKUP_ERROR, G_MARKUP_ERROR_INVALID_CONTENT,
"empty names are not permitted");
return FALSE;
}
... | false | false | false | false | false | 0 |
config( const QString& _protocol )
{
// We call the findProtocol directly (not via KProtocolManager) to bypass any proxy settings.
KProtocolInfo::Ptr prot = KProtocolInfoFactory::self()->findProtocol(_protocol);
if ( !prot )
return QString();
return QString::fromLatin1("kio_%1rc").arg(prot->m_config);
} | false | false | false | false | false | 0 |
writePageObjects(OutStream *outStr, XRef *xRef, Guint numOffset, GBool combine)
{
Guint objectsCount = 0; //count the number of objects in the XRef(s)
Guchar *fileKey;
CryptAlgorithm encAlgorithm;
int keyLength;
xRef->getEncryptionParameters(&fileKey, &encAlgorithm, &keyLength);
for (int n = numOffset; n ... | false | false | false | false | false | 0 |
name_selector_get_client_cb (GObject *source_object,
GAsyncResult *result,
gpointer user_data)
{
ENameSelector *name_selector = user_data;
EBookClient *book_client;
EClient *client;
GArray *sections;
SourceBook source_book;
guint ii;
gboolean ignore_error... | false | false | false | false | false | 0 |
sky2_phy_power_down(struct sky2_hw *hw, unsigned port)
{
u32 reg1;
u16 ctrl;
/* release GPHY Control reset */
sky2_write8(hw, SK_REG(port, GPHY_CTRL), GPC_RST_CLR);
/* release GMAC reset */
sky2_write8(hw, SK_REG(port, GMAC_CTRL), GMC_RST_CLR);
if (hw->flags & SKY2_HW_NEWER_PHY) {
/* select page 2 to access... | false | false | false | false | false | 0 |
to_mlx4_st(struct mlx4_ib_dev *dev, enum mlx4_ib_qp_type type)
{
switch (type) {
case MLX4_IB_QPT_RC: return MLX4_QP_ST_RC;
case MLX4_IB_QPT_UC: return MLX4_QP_ST_UC;
case MLX4_IB_QPT_UD: return MLX4_QP_ST_UD;
case MLX4_IB_QPT_XRC_INI:
case MLX4_IB_QPT_XRC_TGT: return MLX4_QP_ST_XRC;
case MLX4_IB_QPT_SMI:
ca... | false | false | false | false | false | 0 |
create_dlr_from_msg(const Octstr *smsc, const Msg *msg, const Octstr *reply, long stat)
{
Msg *dlrmsg;
if (msg == NULL)
return NULL;
/* generate DLR */
debug("dlr.dlr", 0,"SMSC[%s]: creating DLR message",
(smsc ? octstr_get_cstr(smsc) : "UNKNOWN"));
dlrmsg = msg_create(sms... | false | false | false | true | false | 1 |
dht_finodelk (call_frame_t *frame, xlator_t *this, const char *volume,
fd_t *fd, int32_t cmd, struct gf_flock *lock, dict_t *xdata)
{
xlator_t *subvol = NULL;
int op_errno = -1;
VALIDATE_OR_GOTO (frame, err);
VALIDATE_OR_GOTO (this, err);
VALIDATE_OR_... | false | false | false | false | false | 0 |
eeepc_rfkill_hotplug(struct eeepc_laptop *eeepc, acpi_handle handle)
{
struct pci_dev *port;
struct pci_dev *dev;
struct pci_bus *bus;
bool blocked = eeepc_wlan_rfkill_blocked(eeepc);
bool absent;
u32 l;
if (eeepc->wlan_rfkill)
rfkill_set_sw_state(eeepc->wlan_rfkill, blocked);
mutex_lock(&eeepc->hotplug_loc... | false | false | false | false | false | 0 |
ntfs_collate_binary(ntfs_volume *vol,
const void *data1, const int data1_len,
const void *data2, const int data2_len)
{
int rc;
ntfs_debug("Entering.");
rc = memcmp(data1, data2, min(data1_len, data2_len));
if (!rc && (data1_len != data2_len)) {
if (data1_len < data2_len)
rc = -1;
else
rc = 1;
}
nt... | false | false | false | false | false | 0 |
resize(FXint w,FXint h){
if((flags&FLAG_DIRTY) || (w!=width) || (h!=height)){
width=FXMAX(w,1);
height=FXMAX(h,1);
if(xid){
#ifdef WIN32
RECT rect;
SetRect(&rect,0,0,width,height);
DWORD dwStyle=GetWindowLong((HWND)xid,GWL_STYLE);
DWORD dwExStyle=GetWindowLong((HWND)xid,GWL_EXSTYLE... | false | false | false | false | false | 0 |
print_edge_list (FILE *f, struct edge_list *elist)
{
int x;
fprintf (f, "Compressed edge list, %d BBs + entry & exit, and %d edges\n",
elist->num_blocks, elist->num_edges);
for (x = 0; x < elist->num_edges; x++)
{
fprintf (f, " %-4d - edge(", x);
if (INDEX_EDGE_PRED_BB (elist, x) == ENTRY_BL... | false | false | false | false | false | 0 |
InitProcess(void)
{
/* use volatile pointer to prevent code rearrangement */
volatile PROC_HDR *procglobal = ProcGlobal;
int i;
/*
* ProcGlobal should be set up already (if we are a backend, we inherit
* this by fork() or EXEC_BACKEND mechanism from the postmaster).
*/
if (procglobal == NULL)
elog(PANIC... | false | false | false | true | false | 1 |
_outRangeTblEntry(StringInfo str, RangeTblEntry *node)
{
WRITE_NODE_TYPE("RTE");
/* put alias + eref first to make dump more legible */
WRITE_NODE_FIELD(alias);
WRITE_NODE_FIELD(eref);
WRITE_ENUM_FIELD(rtekind, RTEKind);
switch (node->rtekind)
{
case RTE_RELATION:
WRITE_OID_FIELD(relid);
WRITE_CHAR_FIE... | false | false | false | false | false | 0 |
decode_float (GetOptsContext *ctx, GetOptsOption *opt, const char *arg, void *valuep)
{
char *endptr;
float val;
val = (float) strtod (arg, &endptr);
if (endptr == (char *) arg || *endptr != '\0')
return -1;
*((float *) valuep) = val;
return 0;
} | false | false | false | true | false | 1 |
checkInteractions()
{
if (!d->m_ComputeInteraction) {
beginResetModel();
endResetModel();
return;
}
if (d->m_InteractionResult)
delete d->m_InteractionResult;
beginResetModel();
d->m_InteractionResult = interactionManager().checkInteractions(*d->m_InteractionQuery, th... | false | false | false | false | false | 0 |
bcemit_comp(FuncState *fs, BinOpr opr, ExpDesc *e1, ExpDesc *e2)
{
ExpDesc *eret = e1;
BCIns ins;
expr_toval(fs, e1);
if (opr == OPR_EQ || opr == OPR_NE) {
BCOp op = opr == OPR_EQ ? BC_ISEQV : BC_ISNEV;
BCReg ra;
if (expr_isk(e1)) { e1 = e2; e2 = eret; } /* Need constant in 2nd arg. */
ra = exp... | false | false | false | false | false | 0 |
eina_magic_fail(void *d,
Eina_Magic m,
Eina_Magic req_m,
const char *file,
const char *fnc,
int line)
{
eina_error_set(EINA_ERROR_MAGIC_FAILED);
if (!d)
eina_log_print(EINA_LOG_DOMAIN_GLOBAL, EINA_LOG_LEVEL_CRITICAL,
... | false | false | false | false | false | 0 |
Activate()
{
jack_log("JackClient::Activate");
if (IsActive()) {
return 0;
}
// RT thread is started only when needed...
if (IsRealTime()) {
if (StartThread() < 0) {
return -1;
}
}
/*
Insertion of client in the graph will cause a kGraphOrderCallback ... | 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.