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 |
|---|---|---|---|---|---|---|
foo_scroll_area_unrealize (GtkWidget *widget)
{
FooScrollArea *area = FOO_SCROLL_AREA (widget);
if (area->priv->input_window)
{
gdk_window_set_user_data (area->priv->input_window, NULL);
gdk_window_destroy (area->priv->input_window);
area->priv->input_window = NULL;
}
GTK_WIDGET_CLASS ... | false | false | false | false | false | 0 |
tg3_phy_init_link_config(struct tg3 *tp)
{
u32 adv = ADVERTISED_Autoneg;
if (!(tp->phy_flags & TG3_PHYFLG_10_100_ONLY)) {
if (!(tp->phy_flags & TG3_PHYFLG_DISABLE_1G_HD_ADV))
adv |= ADVERTISED_1000baseT_Half;
adv |= ADVERTISED_1000baseT_Full;
}
if (!(tp->phy_flags & TG3_PHYFLG_ANY_SERDES))
adv |= ADVERTI... | false | false | false | false | false | 0 |
it87_init_hardware(struct ite_dev *dev)
{
ite_dbg("%s called", __func__);
/* enable just the baud rate divisor register,
disabling all the interrupts at the same time */
outb((inb(dev->cir_addr + IT87_IER) &
~(IT87_IEC | IT87_RFOIE | IT87_RDAIE | IT87_TLDLIE)) | IT87_BR,
dev->cir_addr + IT87_IER);
/* write o... | false | false | false | false | false | 0 |
useHardCodedColors()
{
HardCodedColorScheme hardCodedColors;
colors.clear();
const std::vector<ColorNamePair>* colorScheme = hardCodedColors.getHardCodedScheme();
int numOfColors = colorScheme->size();
for(int i = 0; i< numOfColors; i++)
{
colors.push_back(std::pair<QStrin... | false | false | false | false | false | 0 |
impl_deactivate (PeasActivatable *plugin)
{
GtkWidget *window, *toolbar, *sidebar;
ChamplainView *view;
SearchPluginPrivate *priv = SEARCH_PLUGIN (plugin)->priv;
if (priv->proxy)
{
g_object_unref (priv->proxy);
priv->proxy = NULL;
}
if (priv->call)
{
g_object_unref (priv->call)... | false | false | false | false | false | 0 |
move_entries_to(CVmHashTable *new_tab)
{
CVmHashEntry **tableptr;
size_t i;
/* go through each hash value */
for (tableptr = table_, i = 0 ; i < table_size_ ; ++i, ++tableptr)
{
CVmHashEntry *entry;
CVmHashEntry *nxt;
/* go through each entry at this hash value *... | false | false | false | false | false | 0 |
create_show_menu(void)
{
int i;
GtkWidget *menu = gtk_menu_new();
GtkWidget *item;
/* index starting at one (1) here to force playername to always be shown */
for (i = 1; i < num_player_dlg_columns; i++) {
struct player_dlg_column *pcol;
pcol = &player_dlg_columns[i];
item = gtk_check_... | false | false | false | false | false | 0 |
odf_write_axis_categories (GnmOOExport *state, GSList const *series)
{
if (series != NULL && series->data != NULL) {
GOData const *cat = gog_dataset_get_dim (GOG_DATASET (series->data), GOG_MS_DIM_LABELS);
if (NULL != cat) {
GnmExprTop const *texpr = gnm_go_data_get_expr (cat);
if (NULL != texpr) {
char ... | false | false | false | false | false | 0 |
git_filebuf_write(git_filebuf *file, const void *buff, size_t len)
{
int error;
const unsigned char *buf = buff;
for (;;) {
size_t space_left = file->buf_size - file->buf_pos;
/* cache if it's small */
if (space_left > len) {
add_to_cache(file, buf, len);
return GIT_SUCCESS;
}
/* flush the cache i... | false | false | false | false | false | 0 |
do_literal(uschar *p)
{
if (Ustrcmp(p, "layout") == 0) literal_state = LITERAL_LAYOUT;
else if (Ustrcmp(p, "text") == 0) literal_state = LITERAL_TEXT;
else if (Ustrcmp(p, "off") == 0) literal_state = LITERAL_OFF;
else if (Ustrcmp(p, "xml") == 0) literal_state = LITERAL_XML;
else error(5, p);
} | false | false | false | false | false | 0 |
TransparentImageCallBack(void *mutable_data, /* User provided mutable data */
const void *immutable_data, /* User provided immutable data */
Image *image, /* Modify image */
PixelPacket *pixels, /* Pixel row */
... | false | false | false | false | false | 0 |
manage_auto_explorer(struct unit *punit)
{
struct player *pplayer = unit_owner(punit);
/* Loop prevention */
const struct tile *init_tile = unit_tile(punit);
/* The log of the want of the most desirable tile,
* given nearby water, cities, etc. */
double log_most_desirable = -FC_INFINITY;
/* The maximu... | false | false | false | false | false | 0 |
gst_identity_event (GstBaseTransform * trans, GstEvent * event)
{
GstIdentity *identity;
gboolean ret = TRUE;
identity = GST_IDENTITY (trans);
if (!identity->silent) {
const GstStructure *s;
gchar *sstr;
GST_OBJECT_LOCK (identity);
g_free (identity->last_message);
if ((s = gst_event_get_... | false | false | false | false | false | 0 |
pixConnCompAreaTransform(PIX *pixs,
l_int32 connect)
{
l_int32 i, n, npix, w, h, xb, yb, wb, hb;
l_int32 *tab8;
BOXA *boxa;
PIX *pix1, *pix2, *pixd;
PIXA *pixa;
PROCNAME("pixConnCompTransform");
if (!pixs || pixGetDepth(pixs) != 1)
return (PIX *)ERROR_PTR(... | false | false | false | false | false | 0 |
compute_alpha_size (const unsigned int *alpha_inc) const
{
unsigned int max_alpha_inc = 0;
for (int i = 0; i < _max_key_len; i++)
if (max_alpha_inc < alpha_inc[i])
max_alpha_inc = alpha_inc[i];
return (option[SEVENBIT] ? 128 : 256) + max_alpha_inc;
} | false | false | false | false | false | 0 |
UpdateRDIn(WorkList<Node>* worklist, bool mark) {
BitVector new_rd_in(rd_.rd_in()->length());
predecessor_->ComputeRDOut(&new_rd_in);
if (rd_.rd_in()->Equals(new_rd_in)) return;
// Update RD_in.
*rd_.rd_in() = new_rd_in;
// Add the successors to the worklist if not already present.
if (!successor0_->IsM... | false | false | false | false | false | 0 |
H5A_dense_remove(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo, const char *name)
{
H5A_bt2_ud_rm_t udata; /* User data for v2 B-tree record removal */
H5HF_t *fheap = NULL; /* Fractal heap handle */
H5HF_t *shared_fheap = NULL; /* Fractal heap handle for shared header ... | false | false | false | false | false | 0 |
bq4802_probe(struct platform_device *pdev)
{
struct bq4802 *p = devm_kzalloc(&pdev->dev, sizeof(*p), GFP_KERNEL);
int err = -ENOMEM;
if (!p)
goto out;
spin_lock_init(&p->lock);
p->r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!p->r) {
p->r = platform_get_resource(pdev, IORESOURCE_IO, 0);
err = ... | false | false | false | false | false | 0 |
create_image_widget (NautilusPropertiesWindow *window,
gboolean is_customizable)
{
GtkWidget *button;
GtkWidget *image;
image = gtk_image_new ();
window->details->icon_image = image;
update_properties_window_icon (window);
gtk_widget_show (image);
button = NULL;
if (is_customizable) {
button = gtk... | false | false | false | false | false | 0 |
qlcnic_down(struct qlcnic_adapter *adapter, struct net_device *netdev)
{
rtnl_lock();
if (netif_running(netdev))
__qlcnic_down(adapter, netdev);
rtnl_unlock();
} | false | false | false | false | false | 0 |
StrAppend(char **st, const char *st2)
{
Int len,len2;
if (*st == NULL)
len = 0;
else
len = strlen(*st);
len2 = strlen(st2);
*st = realloc(*st,len+len2+1);
if (*st == NULL) {
printf("Extremely unexpected out of memory error. Giving up.\n");
exit(1);
}
/* If... | false | false | false | false | false | 0 |
crmf_copy_pkiarchiveoptions(PLArenaPool *poolp,
CRMFPKIArchiveOptions *destOpt,
CRMFPKIArchiveOptions *srcOpt)
{
SECStatus rv;
destOpt->archOption = srcOpt->archOption;
switch (srcOpt->archOption) {
case crmfEncryptedPrivateKey:
rv = crmf_copy_encryptedkey(poolp,
... | false | false | false | false | false | 0 |
adis16220_read_raw(struct iio_dev *indio_dev,
struct iio_chan_spec const *chan,
int *val, int *val2,
long mask)
{
struct adis16220_state *st = iio_priv(indio_dev);
const struct adis16220_address_spec *addr;
int ret = -EINVAL;
int addrind = 0;
u16 uval;
s16 sval;
u8 bits;
switch (mask... | false | false | false | false | false | 0 |
remove_child(Fl_Tree_Item *item) {
for ( int t=0; t<children(); t++ ) {
if ( child(t) == item ) {
item->clear_children();
_children.remove(t);
return(0);
}
}
return(-1);
} | false | false | false | false | false | 0 |
vfs_iter_read(struct file *file, struct iov_iter *iter, loff_t *ppos)
{
struct kiocb kiocb;
ssize_t ret;
if (!file->f_op->read_iter)
return -EINVAL;
init_sync_kiocb(&kiocb, file);
kiocb.ki_pos = *ppos;
iter->type |= READ;
ret = file->f_op->read_iter(&kiocb, iter);
BUG_ON(ret == -EIOCBQUEUED);
if (ret > 0)... | false | false | false | false | false | 0 |
find_class(const char *name, uint32 len)
{
for (Class_info **cur_rt= ci_collection;
cur_rt < ci_collection_end; cur_rt++)
{
if (*cur_rt &&
((*cur_rt)->m_name.length == len) &&
(my_strnncoll(&my_charset_latin1,
(const uchar*) (*cur_rt)->m_name.str, len,
(const uchar*) name, len) == 0))
... | false | false | false | false | false | 0 |
gtkaml_pair_finalize (GtkamlPair* obj) {
GtkamlPair * self;
self = GTKAML_PAIR (obj);
((self->name == NULL) || (self->priv->k_destroy_func == NULL)) ? NULL : (self->name = (self->priv->k_destroy_func (self->name), NULL));
((self->value == NULL) || (self->priv->v_destroy_func == NULL)) ? NULL : (self->value = (self-... | false | false | false | false | false | 0 |
operator<<(QDataStream& stream, PlayerMatrix& p)
{
stream << p.name << quint32(p.nbAttack) << quint32(p.nbCountries) << quint32(p.nbAvailArmies)
<< quint32(p.nbDefense) << p.nation << quint32(p.isAI) << quint32(p.countries.size());
foreach (const QString& s, p.countries)
{
stream << s;
}
stream << p.g... | false | false | false | false | false | 0 |
textWidth(int size_,const char *str_,int n_)
{
double w=0;
for (int i=0; i<n_; i++) w+=width((int)str_[i]-offset());
return (w*size_)/1000.;
} | false | false | false | false | false | 0 |
amitk_preferences_set_default_directory(AmitkPreferences * preferences, const gchar * new_directory) {
gboolean different=FALSE;
g_return_if_fail(AMITK_IS_PREFERENCES(preferences));
if (((AMITK_PREFERENCES_DEFAULT_DIRECTORY(preferences) == NULL) && (new_directory != NULL)) ||
((AMITK_PREFERENCES_DEFAULT_D... | false | false | false | false | false | 0 |
Execute () {
static char* default_rotatestr = strdup("45.0");
char* rotatestr =
StrEditDialog::post(GetEditor()->GetWindow(),
"Enter rotation in degrees:",
default_rotatestr, "Precise Rotate");
if (rotatestr) {
std::istrstream in(rotatestr);
float angle = 0.0;
in >> angle;... | false | false | false | false | false | 0 |
tbuf_check(void)
{
if (tbuf.arena) {
g_assert(NULL != tbuf.end);
g_assert(tbuf.size > 0);
g_assert(&tbuf.arena[tbuf.size] == tbuf.end);
if (tbuf.rptr) {
g_assert((size_t) tbuf.rptr >= (size_t) tbuf.arena);
g_assert((size_t) tbuf.rptr <= (size_t) tbuf.end);
}
if (tbuf.wptr) {
g_assert((size_t) tbuf... | false | false | false | false | false | 0 |
partial_match(const AP_sequence* part_, long *overlapPtr, long *penaltyPtr) const {
// matches the partial sequences 'part_' against 'this'
// '*penaltyPtr' is set to the number of mismatches (possibly weighted)
// '*overlapPtr' is set to the number of base positions both sequences overlap
// e... | false | false | false | false | false | 0 |
extract_clock(unsigned msr, unsigned int cpu, int failsafe)
{
int i;
/*
* Extract clock in kHz from PERF_CTL value
* for centrino, as some DSDTs are buggy.
* Ideally, this can be done using the acpi_data structure.
*/
if ((per_cpu(centrino_cpu, cpu) == &cpu_ids[CPU_BANIAS]) ||
(per_cpu(centrino_cpu, cp... | false | false | false | false | false | 0 |
git_status_should_ignore(
int *ignored,
git_repository *repo,
const char *path)
{
int error;
git_ignores ignores;
if (git_ignore__for_path(repo, path, &ignores) < 0)
return -1;
error = git_ignore__lookup(&ignores, path, ignored);
git_ignore__free(&ignores);
return error;
} | false | false | false | false | false | 0 |
GetMemberIndex(NetworkID memberId, RakNetGUID guid) const
{
for (unsigned int i=0; i < teamMembers.Size(); i++)
{
if (teamMembers[i].memberGuid==guid && teamMembers[i].memberId==memberId)
return i;
}
return (unsigned int) -1;
} | false | false | false | false | false | 0 |
brasero_burn_options_add_source (BraseroBurnOptions *self,
const gchar *title,
...)
{
va_list vlist;
GtkWidget *child;
GSList *list = NULL;
BraseroBurnOptionsPrivate *priv;
priv = BRASERO_BURN_OPTIONS_PRIVATE (self);
/* create message queue for input */
priv->message_input = brasero_notify_new ();
l... | false | false | false | false | false | 0 |
memset_RGB24(void *adr, int r, int v, int b, long count) {
long i, n;
register long v1, v2, v3,*pt = (long *)(adr);
unsigned char *p, R = (unsigned char)r, V = (unsigned char)v , B = (unsigned char)b;
p=(unsigned char *)adr;
*p++ = R;
*p++ = V;
*p++ = B;
*p++ = R;
*p++ = V;
*p++... | false | false | false | false | false | 0 |
definitions_init_curr_findex (definitions_ty *definitions)
{
/* Protect against concurrent execution. */
gl_lock_lock (definitions->curr_findex_init_lock);
if (definitions->curr_findex == NULL)
definitions->curr_findex =
message_fuzzy_index_alloc (definitions_current_list (definitions),
... | false | false | false | false | false | 0 |
compare_glists (GList *t1, GList *t2, GCompareFunc cmpfunc)
{
GList *tmp1;
for (; t2; t2=t2->next)
{
short matched = 0;
for (tmp1=t1; tmp1; tmp1=tmp1->next)
if ((*cmpfunc)(tmp1->data, t2->data) == 0) { matched = 1; break; }
if (!matched) return t2;
}
return 0;
} | false | false | false | false | false | 0 |
qos_inc_block(conn_rec *c, qos_srv_config *sconf,
qs_conn_ctx *cconf, unsigned long *ip) {
if(sconf->qos_cc_block &&
apr_table_get(sconf->setenvstatus_t, QS_CLOSE) &&
!apr_table_get(c->notes, QS_BLOCK_SEEN)) {
apr_table_set(c->notes, QS_BLOCK_SEEN, "");
*ip = ccon... | false | false | false | false | false | 0 |
save_notify (UnitInfo *ui, uae_u8 *dst, Notify *n)
{
TCHAR *s;
save_u32 (n->notifyrequest);
s = n->fullname;
if (_tcslen (s) >= _tcslen (ui->volname) && !_tcsncmp (n->fullname, ui->volname, _tcslen (ui->volname)))
s = n->fullname + _tcslen (ui->volname) + 1;
save_string (s);
write_log (_T("FS: notify %08X '%s'\... | false | false | false | false | false | 0 |
function_ooh323_read(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)
{
struct ooh323_pvt *p = ast_channel_tech_pvt(chan);
ast_channel_lock(chan);
if (!p) {
ast_channel_unlock(chan);
return -1;
}
if (strcmp(ast_channel_tech(chan)->type, "OOH323")) {
ast_log(LOG_ERROR, "This fun... | false | false | false | false | false | 0 |
funcargs (LexState *ls, int slf) {
FuncState *fs = ls->fs;
int slevel = fs->stacklevel - slf - 1; /* where is func in the stack */
switch (ls->t.token) {
case '(': { /* funcargs -> '(' [ explist1 ] ')' */
int line = ls->linenumber;
int nargs = 0;
next(ls);
if (ls->t.token != ')') /*... | false | false | false | false | false | 0 |
show_fw_ver(struct device *dev, struct device_attribute *attr,
char *buf)
{
struct nes_ib_device *nesibdev =
container_of(dev, struct nes_ib_device, ibdev.dev);
struct nes_vnic *nesvnic = nesibdev->nesvnic;
nes_debug(NES_DBG_INIT, "\n");
return sprintf(buf, "%u.%u\n",
(nesvnic->nesdev->nesadapter->firmw... | false | true | false | false | false | 1 |
write_jt_match_record(struct libjte_env *o,
char *filename, char *mirror_name, int sector_size,
off_t size, unsigned char md5[16])
{
char buf[32768];
off_t remain = size;
FILE *infile = NULL;
int u... | true | true | false | false | true | 1 |
CloneTABFeature(OGRFeatureDefn *poNewDefn /*=NULL*/)
{
/*-----------------------------------------------------------------
* Alloc new feature and copy the base stuff
*----------------------------------------------------------------*/
TABFontPoint *poNew = new TABFontPoint(poNewDefn ? poNewDefn :
... | false | false | false | false | false | 0 |
PerlIOMmap_flush(pTHX_ PerlIO *f)
{
PerlIOMmap * const m = PerlIOSelf(f, PerlIOMmap);
PerlIOBuf * const b = &m->base;
IV code = PerlIOBuf_flush(aTHX_ f);
/*
* Now we are "synced" at PerlIOBuf level
*/
if (b->buf) {
if (m->len) {
/*
* Unmap the buffer
*/
if (PerlIOMma... | false | false | false | false | false | 0 |
ISortSpace(std::vector<plSpaceBuilderNode*>& nodes, int axis) {
if (nodes.size() < 2)
// Already sorted
return;
hsRadixSort rad;
hsRadixSortElem* list = new hsRadixSortElem[nodes.size()];
hsRadixSortElem* it = list;
for (int i = nodes.size() - 1; i >= 0; i--) {
switch (axis)... | false | false | false | false | false | 0 |
SetupSSLContext() {
SSL_CTX* ctx = SSL_CTX_new(TLSv1_client_method());
if (ctx == NULL)
return NULL;
if (!ConfigureTrustedRootCertificates(ctx)) {
SSL_CTX_free(ctx);
return NULL;
}
#ifdef _DEBUG
SSL_CTX_set_info_callback(ctx, SSLInfoCallback);
#endif
SSL_CTX_set_verify(ctx, SSL_VERIFY_PEER, S... | false | false | false | false | false | 0 |
cbf_set_doublevalue (cbf_handle handle, const char *format, double number)
{
char value [64];
int lopos, hipos, ic;
/* Write the value */
sprintf (value, format, number);
/* strip the leading and trailing blanks */
for (lopos=0; (value[lopos]==' '||value[lopos]=='\t'); lopos++);
for (hipos=strl... | false | false | false | false | false | 0 |
DrawDashed (int x, int y, int tx, int ty, int active,int color)
/* draws a dashed bond */
{
GdkGC *thegc;
GdkSegment mypoints[6];
int xlen, ylen, i;
gint nsegments = 6;
xlen = tx - x;
ylen = ty - y;
for (i = 0; i < nsegments; i++)
{
mypoints[i].x1 = (gint16) ((x + 2 * i * 0.09 * xlen) * size_f... | false | false | false | false | false | 0 |
db_code(ip)
struct implement *ip;
{
register int c;
char *s;
word n;
int var_type;
int i;
/*
* read the descriptive string.
*/
c = getc(db);
SkipWhSp(c)
if (c != '"')
db_err1(1, "operation description expected");
for (c = getc(db); c != '"' && c != '\n' && c != EOF; c = g... | false | false | false | false | false | 0 |
system_call(char *cmdline)
{
int retval;
retval = system(cmdline);
if (retval == 127) {
/* couldn't exec command */
log_message(LOG_ALERT, "Couldn't exec command: %s", cmdline);
} else if (retval == -1) {
/* other error */
log_message(LOG_ALERT, "Error exec-ing command: %s", cmdline);
}
return retval;
... | false | false | false | false | false | 0 |
extractActionProperties(const QDomDocument &doc)
{
ActionPropertiesMap properties;
QDomElement actionPropElement = doc.documentElement().namedItem( "ActionProperties" ).toElement();
if ( actionPropElement.isNull() )
return properties;
QDomNode n = actionPropElement.firstChild();
while(!n.isNull())
{
... | false | false | false | false | false | 0 |
PopOperation ()
{
if (!m_UndoList.empty ()) {
delete m_UndoList.front ();
m_UndoList.pop_front ();
if (m_UndoList.empty () && m_Window)
m_Window->ActivateActionWidget ("/MainMenu/EditMenu/Undo", false);
}
SetDirty (m_LastStackSize != m_UndoList.size () || (m_LastStackSize > 0 && m_OpID != m_UndoList.front (... | false | false | false | false | false | 0 |
remote_lookup (unw_addr_space_t as,
unw_word_t table, size_t table_size, int32_t rel_ip,
struct table_entry *e, void *arg)
{
unsigned long table_len = table_size / sizeof (struct table_entry);
unw_accessors_t *a = unw_get_accessors (as);
unsigned long lo, hi, mid;
unw_word_t e_addr = 0;
int32_... | false | false | false | false | false | 0 |
gst_base_transform_acceptcaps (GstPad * pad, GstCaps * caps)
{
gboolean ret = TRUE;
GstBaseTransform *trans;
GstBaseTransformClass *bclass;
trans = GST_BASE_TRANSFORM (gst_pad_get_parent (pad));
bclass = GST_BASE_TRANSFORM_GET_CLASS (trans);
if (bclass->accept_caps)
ret = bclass->accept_caps (trans, G... | false | false | false | false | false | 0 |
new_request (char *uristr)
{
REQ *retptr;
retptr = (REQ *) malloc (sizeof (*retptr));
if (retptr == NULL || uristr == NULL)
panic ("%s: ran out of memory while parsing %s\n",
prog_name, param.wsesslog.file);
memset (retptr, 0, sizeof (*retptr));
retptr->uri = uristr;
retptr->uri_len = strlen (ur... | false | false | false | false | false | 0 |
dib3000mb_read_snr(struct dvb_frontend* fe, u16 *snr)
{
struct dib3000_state* state = fe->demodulator_priv;
short sigpow = rd(DIB3000MB_REG_SIGNAL_POWER);
int icipow = ((rd(DIB3000MB_REG_NOISE_POWER_MSB) & 0xff) << 16) |
rd(DIB3000MB_REG_NOISE_POWER_LSB);
*snr = (sigpow << 8) / ((icipow > 0) ? icipow : 1);
retur... | false | false | false | false | false | 0 |
perform_tree_ssa_dce (bool aggressive)
{
struct edge_list *el = NULL;
bool something_changed = 0;
calculate_dominance_info (CDI_DOMINATORS);
/* Preheaders are needed for SCEV to work.
Simple lateches and recorded exits improve chances that loop will
proved to be finite in testcases such as in loop-1... | false | false | false | false | false | 0 |
DetermineMatchingKeyAttributeValues( DcmDataset *dataset, const char **&matchingKeyAttrValues )
// Date : July 12, 2002
// Author : Thomas Wilkens
// Task : This function determines the values of the matching key attributes in the given dataset.
// Parameters : dataset - [in] Datas... | false | false | false | false | false | 0 |
TclX_KeylgetObjCmd (clientData, interp, objc, objv)
ClientData clientData;
Tcl_Interp *interp;
int objc;
Tcl_Obj *CONST objv[];
{
Tcl_Obj *keylPtr, *valuePtr;
char *varName, *key;
int keyLen, status;
if ((objc < 2) || (objc > 4)) {
return TclX_WrongArgs (interp, ... | false | false | false | false | false | 0 |
search_ID(const char *temp_id )
{
if ( id && strcmp( temp_id, id ) == 0 ) return (this);
return ( NULL );
} | false | false | false | false | false | 0 |
k_sc_init
(enum streamcipher_e cipher, uint32_t noncebits)
{
enum k_error_e err = K_ESUCCESS;
struct k_sc_t* c = 0;
c = k_calloc(1, sizeof(struct k_sc_t));
if (!c) {
err = K_ENOMEM;
goto k_sc_init_err;
}
if (cipher == STREAM_CIPHER_NOOP)
return c;
c->cipher = sc_get_by_id(cipher);
if (!c->cipher) {
err... | false | false | false | false | false | 0 |
GetNextKeyword()
{
if (m_posNextKeyword == m_lstKeywords.end()) {
m_posNextKeyword = m_lstKeywords.begin();
if (m_posNextKeyword == m_lstKeywords.end()) {
return NULL;
}
}
return *m_posNextKeyword++;
} | false | false | false | false | false | 0 |
TestCapability( const char * pszCap )
{
if( EQUAL(pszCap,OLCRandomRead) )
return TRUE;
else if( EQUAL(pszCap,OLCSequentialWrite))
return TRUE;
else if( EQUAL(pszCap,OLCRandomWrite))
return FALSE;
else if( EQUAL(pszCap,OLCFastFeatureCount) )
return m_poFilterGeom == NU... | false | false | false | false | false | 0 |
OnPortReady(PortAllocatorSession* session,
Port* port) {
ASSERT(session == impl_);
PortProxy* proxy_port = new PortProxy(
port->thread(), port->type(), port->socket_factory(), port->network(),
port->ip(), port->min_port(), port->max_port());
proxy_port->set... | false | false | false | false | false | 0 |
lua_pushinteger(lua_State *L, lua_Integer n)
{
setintptrV(L->top, n);
incr_top(L);
} | false | false | false | false | false | 0 |
fore200e_rate_ctrl(struct atm_qos* qos, struct tpd_rate* rate)
{
if (qos->txtp.max_pcr < ATM_OC3_PCR) {
/* compute the data cells to idle cells ratio from the tx PCR */
rate->data_cells = qos->txtp.max_pcr * FORE200E_MAX_BACK2BACK_CELLS / ATM_OC3_PCR;
rate->idle_cells = FORE200E_MAX_BACK2BACK_CELLS - rate->... | false | false | false | false | false | 0 |
SetFwRsvdPagePkt_BTCoex(struct rtw_adapter *padapter)
{
struct hal_data_8723a *pHalData;
struct xmit_frame *pmgntframe;
struct pkt_attrib *pattrib;
struct xmit_priv *pxmitpriv;
struct mlme_ext_priv *pmlmeext;
struct mlme_ext_info *pmlmeinfo;
u8 fakemac[6] = {0x00, 0xe0, 0x4c, 0x00, 0x00, 0x00};
u32 NullDataLeng... | false | true | false | false | false | 1 |
tp_account_request_new (TpAccountManager *account_manager,
const gchar *manager,
const gchar *protocol,
const gchar *display_name)
{
g_return_val_if_fail (TP_IS_ACCOUNT_MANAGER (account_manager), NULL);
g_return_val_if_fail (manager != NULL, NULL);
g_return_val_if_fail (protocol != NULL, NULL);
ret... | false | false | false | false | false | 0 |
_internal_put_on_bb_bin (xmmsv_t *bb,
const unsigned char *data,
unsigned int len)
{
if (!xmmsv_bitbuffer_put_bits (bb, 32, len))
return false;
return xmmsv_bitbuffer_put_data (bb, data, len);
} | false | false | false | false | false | 0 |
makeuniversal(XMLParserObject* self, const char* string)
{
/* convert a UTF-8 tag/attribute name from the expat parser
to a universal name string */
Py_ssize_t size = (Py_ssize_t) strlen(string);
PyObject* key;
PyObject* value;
/* look the 'raw' name up in the names dictionary */
key = ... | false | false | false | false | false | 0 |
ata_hsm_qc_complete(struct ata_queued_cmd *qc, int in_wq)
{
struct ata_port *ap = qc->ap;
if (ap->ops->error_handler) {
if (in_wq) {
/* EH might have kicked in while host lock is
* released.
*/
qc = ata_qc_from_tag(ap, qc->tag);
if (qc) {
if (likely(!(qc->err_mask & AC_ERR_HSM))) {
ata_sf... | false | false | false | false | false | 0 |
q2(const gsl_vector *x, void *params, gsl_vector *f)
{
size_t i;
double q0, q;
double alpha0, alpha;
double wavelength, theta;
double const *x_data;
double *f_data;
HklPseudoAxisEngine *engine;
HklVector kf, ki;
HklVector X = {{1, 0, 0}};
x_data = gsl_vector_const_ptr(x, 0);
f_data = gsl_vector_ptr(f, 0);
... | false | false | false | false | false | 0 |
fma(double x, double y, double z)
{
double xs, ys, zs, adj;
struct dd xy, r;
int oround;
int ex, ey, ez;
int spread;
/*
* Handle special cases. The order of operations and the particular
* return values here are crucial in handling special cases involving
* infinities, NaNs, overflows, and signed zeroes co... | false | false | false | false | false | 0 |
xsh_parameters_dispersol_create(const char* recipe_id,
cpl_parameterlist* list, xsh_dispersol_param p)
{
/* check parameters */
XSH_ASSURE_NOT_NULL(list);
/* Fill the parameter list */
/* --wavemap_x_degree */
check(xsh_parameters_new_int(list,recipe_id,"dispersol-deg-x",
p.deg_x, "Degree in X in the p... | false | false | false | false | false | 0 |
fill_device_drv(struct device_drv *drv)
{
if (!drv->drv_detect)
drv->drv_detect = &noop_detect;
if (!drv->reinit_device)
drv->reinit_device = &noop_reinit_device;
if (!drv->get_statline_before)
drv->get_statline_before = &blank_get_statline_before;
if (!drv->get_statline)
drv->get_statline = &noop_get_statl... | false | false | false | false | false | 0 |
setStepAvailable(WizardSteps step, bool available)
{
m_unavaliableSteps.removeAll(step);
if (!available) {
m_unavaliableSteps.append(step);
if (m_wizardStep == step) {
m_wizardStep = nextAvailableStep();
if (m_wizardStep == step)
m_wizardStep = previousAva... | false | false | false | false | false | 0 |
xfs_qm_vop_chown_reserve(
struct xfs_trans *tp,
struct xfs_inode *ip,
struct xfs_dquot *udqp,
struct xfs_dquot *gdqp,
struct xfs_dquot *pdqp,
uint flags)
{
struct xfs_mount *mp = ip->i_mount;
uint delblks, blkflags, prjflags = 0;
struct xfs_dquot *udq_unres = NULL;
struct xfs_dquot *gdq_unres = NULL;
str... | false | false | false | false | false | 0 |
matmulval(MATRIX *m, VALUE *vp)
{
register VALUE *val, *vres;
long index;
MATRIX *res;
res = matalloc(m->m_size);
*res = *m;
val = m->m_table;
vres = res->m_table;
for (index = m->m_size; index > 0; index--)
mulvalue(val++, vp, vres++);
return res;
} | false | false | false | false | false | 0 |
do_compile_modgroup(modcallable *parent,
int component, CONF_SECTION *cs,
int grouptype, int parentgrouptype)
{
int i;
modgroup *g;
modcallable *c;
CONF_ITEM *ci;
g = rad_malloc(sizeof(*g));
memset(g, 0, sizeof(*g));
g->grouptype = grouptype;
c = mod_grouptocallable(g);
c->parent = parent;
c->type... | false | false | false | false | false | 0 |
team_uninit(struct net_device *dev)
{
struct team *team = netdev_priv(dev);
struct team_port *port;
struct team_port *tmp;
mutex_lock(&team->lock);
list_for_each_entry_safe(port, tmp, &team->port_list, list)
team_port_del(team, port->dev);
__team_change_mode(team, NULL); /* cleanup */
__team_options_unregist... | false | false | false | false | false | 0 |
infd_directory_dispose(GObject* object)
{
InfdDirectory* directory;
InfdDirectoryPrivate* priv;
GHashTableIter iter;
gpointer key;
directory = INFD_DIRECTORY(object);
priv = INFD_DIRECTORY_PRIVATE(directory);
/* Disable chat if any */
if(priv->chat_session != NULL)
infd_directory_enable_chat(direc... | false | false | false | false | false | 0 |
new_cselib_val (value, mode)
unsigned int value;
enum machine_mode mode;
{
cselib_val *e = empty_vals;
if (e)
empty_vals = e->u.next_free;
else
e = (cselib_val *) ggc_alloc (sizeof (cselib_val));
if (value == 0)
abort ();
e->value = value;
e->u.val_rtx = gen_rtx_VALUE (mode);
CSEL... | false | false | false | false | false | 0 |
memRbtreeData(RbtCursor *pCur, int offset, int amt, char *zBuf)
{
if( !pCur->pNode ) return 0;
if( (amt + offset) <= pCur->pNode->nData ){
memcpy(zBuf, ((char*)pCur->pNode->pData)+offset, amt);
}else{
memcpy(zBuf, ((char*)pCur->pNode->pData)+offset ,pCur->pNode->nData-offset);
amt = pCur->pNode->nData... | false | false | false | false | false | 0 |
demonpet(void)
{
int i;
struct permonst *pm;
struct monst *dtmp;
pline("Some hell-p has arrived!");
i = !rn2(6) ? ndemon(u.ualign.type) : NON_PM;
pm = i != NON_PM ? &mons[i] : youmonst.data;
if ((dtmp = makemon(pm, u.ux, u.uy, NO_MM_FLAGS)) != 0)
{
tamedog(dtmp, NULL);
}
... | false | false | false | false | false | 0 |
_intsetSet(intset *is, int pos, int64_t value) {
if (is->encoding == INTSET_ENC_INT64)
((int64_t*)is->contents)[pos] = value;
else if (is->encoding == INTSET_ENC_INT32)
((int32_t*)is->contents)[pos] = value;
else
((int16_t*)is->contents)[pos] = value;
} | false | false | false | false | false | 0 |
open_packed_git_1(struct packed_git *p)
{
struct stat st;
struct pack_header hdr;
unsigned char sha1[20];
unsigned char *idx_sha1;
long fd_flag;
if (!p->index_data && open_pack_index(p))
return error("packfile %s index unavailable", p->pack_name);
p->pack_fd = open(p->pack_name, O_RDONLY);
if (p->pack_fd < ... | false | false | false | false | false | 0 |
imapx_update_message_info_flags (CamelMessageInfo *info,
guint32 server_flags,
CamelFlag *server_user_flags,
guint32 permanent_flags,
CamelFolder *folder,
... | false | false | false | false | false | 0 |
netlink_set_block(struct nl_handle *nl, int *flags)
{
if ((*flags = fcntl(nl->fd, F_GETFL, 0)) < 0) {
log_message(LOG_INFO, "Netlink: Cannot F_GETFL socket : (%s)",
strerror(errno));
return -1;
}
*flags &= ~O_NONBLOCK;
if (fcntl(nl->fd, F_SETFL, *flags) < 0) {
log_message(LOG_INFO, "Netlink: Cannot F... | false | false | false | false | false | 0 |
glade_widget_write (GladeWidget *widget,
GladeXmlContext *context,
GladeXmlNode *node)
{
GladeXmlNode *widget_node;
GList *l, *list;
GladeProjectFormat fmt = glade_project_get_format (widget->project);
widget_node = glade_xml_node_new (context, GLADE_XML_TAG_WIDGET (fmt));
glade_xml_node_append... | false | false | false | false | false | 0 |
assemble_thunks_and_aliases (struct cgraph_node *node)
{
struct cgraph_edge *e;
int i;
struct ipa_ref *ref;
for (e = node->callers; e;)
if (e->caller->thunk.thunk_p)
{
struct cgraph_node *thunk = e->caller;
e = e->next_caller;
assemble_thunks_and_aliases (thunk);
assemble_thunk (thunk);
... | false | false | false | false | false | 0 |
print_openpgp_info (gnutls_session_t session, const char *hostname,
int insecure)
{
gnutls_openpgp_crt_t crt;
const gnutls_datum_t *cert_list;
int cert_list_size = 0;
int hostname_ok = 0;
int ret;
cert_list = gnutls_certificate_get_peers (session, &cert_list_size);
if (cert_list_siz... | false | false | false | false | false | 0 |
h_order(void *priv, enum VSL_tag_e tag, unsigned fd, unsigned len,
unsigned spec, const char *ptr, uint64_t bm)
{
char type;
struct VSM_data *vd = priv;
bitmap[fd] |= bm;
type = (spec & VSL_S_CLIENT) ? 'c' :
(spec & VSL_S_BACKEND) ? 'b' : '-';
if (!(spec & (VSL_S_CLIENT|VSL_S_BACKEND))) {
if (!b_fla... | false | false | false | false | false | 0 |
CopyFileList(std::vector<CKnownFile*>& out_list) const
{
out_list.reserve(size());
// ADUNANZA BEGIN
// backport
#if 0
for (const_iterator it = begin(); it != end(); it++) {
#else
for (const_iterator it = begin(); it != end(); ++it) {
#endif
// ADUNANZA END
out_list.push_back(it->second);
}
} | false | false | false | false | false | 0 |
_glade_drag_drop (_GladeDrag *dest, gint x, gint y, GObject *data)
{
_GladeDragInterface *iface;
g_return_val_if_fail (GLADE_IS_DRAG (dest), FALSE);
iface = GLADE_DRAG_GET_INTERFACE (dest);
if (iface->drop)
return iface->drop (dest, x, y, data);
else
return FALSE;
} | false | false | false | false | false | 0 |
execute() const
{
if (!isValid())
return ActionReply::InvalidActionReply;
return execute(helperID());
} | false | false | false | false | false | 0 |
brasero_transcode_pad_idle (BraseroTranscode *transcode)
{
gint64 bytes2write;
GError *error = NULL;
BraseroTranscodePrivate *priv;
priv = BRASERO_TRANSCODE_PRIVATE (transcode);
bytes2write = brasero_transcode_pad_real (transcode,
priv->pad_fd,
priv->pad_size,
&error);
if (bytes2write ==... | 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.