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 |
|---|---|---|---|---|---|---|
IsFighting() const
{
for (MemberList::const_iterator itr = m_members.begin(); itr != m_members.end(); ++itr)
{
if (Player* p = sObjectMgr.GetPlayer(itr->guid))
{
if (p->GetMap()->IsBattleArena())
return true;
}
}
return false;
} | false | false | false | false | false | 0 |
get_image_size (const char *filename, int *width, int *height)
{
RsvgHandle *handle;
RsvgDimensionData dimensions;
GError* error = NULL;
if (filename == NULL)
return FALSE;
handle = rsvg_handle_new_from_file (filename, &error);
if (error != NULL) {
g_printerr ("%s\n", error->message);
g_error_free (... | false | false | false | false | false | 0 |
se_prop_set_int (se_t *se, se_o_t *o, const char *id, int value)
{
se_prop_t *p;
if (!o)
o = se->g;
p = se_prop_find (se, o, id);
if (p)
{
se_prop_read_t v;
if (p->reader && p->se_type != SE_TYPE_INT)
{
g_printerr (_("script_engine: se_prop_set%s: can't change type of property %s\n"),
... | false | false | false | false | false | 0 |
getFileName(uint64_t file_number){
std::stringstream filename;
filename << cache_dir << "/cache" << file_number;
return filename.str();
} | false | false | false | false | false | 0 |
Reset(uint8_t kind)
{
int err;
uint8_t rsp[MH_MAX_PACKET_SIZE];
/* write reset msg */
const uint8_t msg_reset[MH_MAX_PACKET_SIZE] =
{ 0xFF, 0xFF, 0x02, 0x01, 0x01 };
if ((err = HID_WriteReport(msg_reset))) {
debug("Failed to write to remote");
return 1;
}
if ((err = HID_ReadReport(rsp, MH_TIMEOUT))) {
d... | false | false | false | false | false | 0 |
peek_token()
{
if (!peeked_)
read_token();
peeked_ = true;
return tok_;
} | false | false | false | false | false | 0 |
loggerPut(const string& unitName, unsigned char unitNameLen,
const char* format, int args, const Subst arg[]) {
if (unitName == UNIT) {
if (strncmp(format, "add", 6) != 0) {
logged += Subst::subst(format, args, arg);
logged += '\n';
}
if (!unitEnabled) return;
... | false | false | false | false | false | 0 |
_compile(AbstractNodeListPtr nodes, const String &group, bool doImports, bool doObjects, bool doVariables)
{
// Set up the compilation context
mGroup = group;
// Clear the past errors
mErrors.clear();
// Clear the environment
mEnv.clear();
// Processes the ... | false | false | false | false | false | 0 |
output_text(ostream& out, const char* text, int indent) {
if (!text) {
out << "(null)";
return out.good() ? 0 : -1;
}
int len = strlen(text);
int beg, end, lineSize, nextBeg, ypos = 0;
if (len == 0)
out << "\"\"";
else {
for (beg = 0; beg < len; ) {
Get_Line(text, len, beg, ... | false | false | false | false | false | 0 |
lto_read_file_options (struct lto_file_decl_data *file_data)
{
size_t len, l, skip;
const char *data, *p;
const struct lto_simple_header *header;
int opts_offset;
struct lto_input_block ib;
data = lto_get_section_data (file_data, LTO_section_opts, NULL, &len);
if (!data)
return;
/* Option could be ... | false | false | false | false | false | 0 |
ima_free_atfm(struct crypto_ahash *tfm)
{
if (tfm != ima_ahash_tfm)
crypto_free_ahash(tfm);
} | false | false | false | false | false | 0 |
nfs_need_check_write(struct file *filp, struct inode *inode)
{
struct nfs_open_context *ctx;
ctx = nfs_file_open_context(filp);
if (test_bit(NFS_CONTEXT_ERROR_WRITE, &ctx->flags) ||
nfs_ctx_key_to_expire(ctx))
return 1;
return 0;
} | false | false | false | false | false | 0 |
IisSymbol(object f)
{ if (type_of(f) != t_symbol)
{ FEerror("Not a symbol ~s",1,f); }
return f;
} | false | false | false | false | false | 0 |
_datalv_disp(struct dm_report *rh, struct dm_pool *mem __attribute__((unused)),
struct dm_report_field *field,
const void *data, void *private __attribute__((unused)))
{
const struct logical_volume *lv = (const struct logical_volume *) data;
if (lv_is_thin_pool(lv))
return _lvname_disp(rh, mem, field,
... | false | false | false | false | false | 0 |
gupnp_service_action_get_value (GUPnPServiceAction *action,
const char *argument,
GValue *value)
{
xmlNode *node;
gboolean found;
g_return_if_fail (action != NULL);
g_return_if_fail (argument != NULL);
... | false | false | false | false | false | 0 |
toString() const
{
return DOMString("<![CDATA[") + nodeValue() + DOMString("]]>");
} | false | false | false | false | false | 0 |
iser_alloc_pi_ctx(struct ib_device *ib_device,
struct ib_pd *pd,
struct iser_fr_desc *desc,
unsigned int size)
{
struct iser_pi_context *pi_ctx = NULL;
int ret;
desc->pi_ctx = kzalloc(sizeof(*desc->pi_ctx), GFP_KERNEL);
if (!desc->pi_ctx)
return -ENOMEM;
pi_ctx = desc->pi_ctx;
ret = iser_alloc_re... | false | false | false | false | false | 0 |
__log_bus_error(struct mem_ctl_info *mci, struct err_info *err,
u8 ecc_type)
{
enum hw_event_mc_err_type err_type;
const char *string;
if (ecc_type == 2)
err_type = HW_EVENT_ERR_CORRECTED;
else if (ecc_type == 1)
err_type = HW_EVENT_ERR_UNCORRECTED;
else {
WARN(1, "Something is rotten in the state of... | false | false | false | false | false | 0 |
NSS_SMIMEUtil_CreateMSSMIMEEncKeyPrefs(PLArenaPool *poolp, SECItem *dest, CERTCertificate *cert)
{
SECItem *dummy = NULL;
PLArenaPool *tmppoolp = NULL;
CERTIssuerAndSN *isn;
if (cert == NULL)
goto loser;
tmppoolp = PORT_NewArena(1024);
if (tmppoolp == NULL)
goto loser;
isn = CERT_GetCer... | false | false | false | false | false | 0 |
stop()
{
if (m_running)
{
int exit = m_gs->gsapi_exit(ghostScriptInstance);
if (exit) handleExit(exit);
m_running = false;
}
return m_running;
} | false | false | false | false | false | 0 |
_dbus_timeout_list_add_timeout (DBusTimeoutList *timeout_list,
DBusTimeout *timeout)
{
if (!_dbus_list_append (&timeout_list->timeouts, timeout))
return FALSE;
_dbus_timeout_ref (timeout);
if (timeout_list->add_timeout_function != NULL)
{
if (!(* timeout_list->add_timeout_function) (timeou... | false | false | false | false | false | 0 |
uriencode(struct ast_channel *chan, const char *cmd, char *data,
char *buf, size_t len)
{
if (ast_strlen_zero(data)) {
ast_log(LOG_WARNING, "Syntax: URIENCODE(<data>) - missing argument!\n");
return -1;
}
ast_uri_encode(data, buf, len, ast_uri_http);
return 0;
} | false | false | false | false | false | 0 |
LUKS_write_phdr(struct luks_phdr *hdr,
struct crypt_device *ctx)
{
struct device *device = crypt_metadata_device(ctx);
ssize_t hdr_size = sizeof(struct luks_phdr);
int devfd = 0;
unsigned int i;
struct luks_phdr convHdr;
int r;
log_dbg("Updating LUKS header of size %d on device %s",
sizeof(struct luks_p... | false | false | false | false | false | 0 |
do_modprint (const char *line, gretlopt opt, PRN *prn)
{
gretl_matrix *coef_se = NULL;
gretl_matrix *addstats = NULL;
char *parnames = NULL;
char *litstr = NULL;
const char *s;
char name[VNAMELEN];
int err = 0;
err = incompatible_options(opt, OPT_C | OPT_R | OPT_T);
if (err) {
retu... | true | true | true | false | false | 1 |
ges_simple_timeline_layer_nth (GESSimpleTimelineLayer * layer, gint position)
{
GList *list;
GESSimpleTimelineLayerPrivate *priv = layer->priv;
list = g_list_nth (priv->objects, position);
if (list)
return GES_TIMELINE_OBJECT (list->data);
return NULL;
} | false | false | false | false | false | 0 |
it_newdesc(integer item,descr_ptr *newdesc)
{
descr_ptr *desc;
if (tnoun(item)) desc=noun_ptr+(item-first_noun);
else if (tcreat(item)) desc=creat_ptr+(item-first_creat);
else if (item>=first_room && item<=maxroom)
desc=room_ptr+(item-first_room);
else {
writeln("INTERNAL ERROR: it_newdesc called wit... | false | false | false | false | false | 0 |
messageTextCallback(size_t messageNum,
string text)
{
setTimeout();
callback.reportProgress(messageTextCompleted,
messageTextEstimatedSize,
messageCntDone, messageCntTotal);
callback.messageTextCallback(messageNum, text);
} | false | false | false | false | false | 0 |
visorutil_spar_detect(void)
{
unsigned int eax, ebx, ecx, edx;
if (cpu_has_hypervisor) {
/* check the ID */
cpuid(UNISYS_SPAR_LEAF_ID, &eax, &ebx, &ecx, &edx);
return (ebx == UNISYS_SPAR_ID_EBX) &&
(ecx == UNISYS_SPAR_ID_ECX) &&
(edx == UNISYS_SPAR_ID_EDX);
} else {
return 0;
}
} | false | false | false | false | false | 0 |
iforce_usb_out(struct urb *urb)
{
struct iforce *iforce = urb->context;
if (urb->status) {
clear_bit(IFORCE_XMIT_RUNNING, iforce->xmit_flags);
dev_dbg(&iforce->intf->dev, "urb->status %d, exiting\n",
urb->status);
return;
}
iforce_usb_xmit(iforce);
wake_up(&iforce->wait);
} | false | false | false | false | false | 0 |
bnx2fc_split_bd(struct bnx2fc_cmd *io_req, u64 addr, int sg_len,
int bd_index)
{
struct fcoe_bd_ctx *bd = io_req->bd_tbl->bd_tbl;
int frag_size, sg_frags;
sg_frags = 0;
while (sg_len) {
if (sg_len >= BNX2FC_BD_SPLIT_SZ)
frag_size = BNX2FC_BD_SPLIT_SZ;
else
frag_size = sg_len;
bd[bd_index + sg_fra... | false | false | false | false | false | 0 |
mlx4_remove_one(struct pci_dev *pdev)
{
struct mlx4_dev_persistent *persist = pci_get_drvdata(pdev);
struct mlx4_dev *dev = persist->dev;
struct mlx4_priv *priv = mlx4_priv(dev);
int active_vfs = 0;
if (mlx4_is_slave(dev))
persist->interface_state |= MLX4_INTERFACE_STATE_NOWAIT;
mutex_lock(&persist->interfa... | false | false | false | false | false | 0 |
failIf( bool shouldFail,
std::string message,
const SourceLine &sourceLine )
{
failIf( shouldFail, Message( "assertion failed", message ), sourceLine );
} | false | false | false | false | false | 0 |
test_dns_rbtnodechain_next(const char *filename) {
FILE *fp;
char *p;
int line;
int cnt;
int result;
int nfails;
int nprobs;
nfails = 0;
nprobs = 0;
fp = fopen(filename, "r");
if (fp != NULL) {
line = 0;
while ((p = t_fgetbs(fp)) != NULL) {
++line;
/*
* Skip comment lines.
*/
... | false | false | false | false | true | 1 |
LI62(V375,V376,V377)
object V375;object V376;object V377;
{ VMB52 VMS52 VMV52
goto TTL;
TTL:;
{object V378 = (VFUN_NARGS=4,(*(LnkLI364))((V375),(V376),(V377),Ct));
VMR52(V378)}
return Cnil;
} | false | false | false | false | false | 0 |
get_affected_vars( std::set<ushort_t>* setAffectedVars ) const
{
for( size_t i = 0; i < add_list().size(); ++i )
{
setAffectedVars->insert(add_list().atom( i ));
}
for( size_t i = 0; i < del_list().size(); ++i )
{
setAffectedVars->insert(del_list().atom( i ));
}
} | false | false | false | false | false | 0 |
ec2_is_initialized(sge_evc_class_t *thiz)
{
sge_evc_t *sge_evc = (sge_evc_t *) thiz->sge_evc_handle;
if (sge_evc == NULL || sge_evc->ec == NULL) {
return false;
} else {
return true;
}
} | false | false | false | false | false | 0 |
LightCheck(void){
int iocon;
char iodir;
iocon=IOCON_PIO1_11;
//LED3 is on pin 11
iodir= (GPIO_GPIO1DIR & (1 << (11) ))?1:0;
//gpioSetDir(RB_LED3, gpioDirection_Input);
if (iodir == gpioDirection_Input) {
IOCON_PIO1_11 = IOCON_PIO1_11_FUNC_AD7|IOCON_PIO1_11_ADMODE_ANALOG;
l... | false | false | false | false | false | 0 |
rideSelected() {
if (!amVisible()) return;
RideItem *ride = myRideItem;
if (!ride)
return;
aerolab->setData(ride, true);
allZoomer->setZoomBase();
} | false | false | false | false | false | 0 |
_ecore_file_monitor_inotify_monitor_find(int wd)
{
Ecore_File_Monitor *l;
EINA_INLIST_FOREACH(_monitors, l)
{
if (ECORE_FILE_MONITOR_INOTIFY(l)->wd == wd)
return l;
}
return NULL;
} | false | false | false | false | false | 0 |
BuildPointPath(const float* startPoint, const float* endPoint)
{
float pathPoints[MAX_POINT_PATH_LENGTH * VERTEX_SIZE];
uint32 pointCount = 0;
dtStatus dtResult = DT_FAILURE;
if (m_useStraightPath)
{
dtResult = m_navMeshQuery->findStraightPath(
startPoint, // s... | false | false | false | false | false | 0 |
open_connection(ne_request *req)
{
ne_session *sess = req->session;
int ret;
if (sess->connected) return NE_OK;
if (!sess->use_proxy)
ret = do_connect(req, &sess->server, _("Could not connect to server"));
else
ret = do_connect(req, &sess->proxy,
_("Could not connect to proxy server"));... | false | false | false | false | false | 0 |
scrup(struct vc_data *vc, unsigned int t, unsigned int b, int nr)
{
unsigned short *d, *s;
if (t+nr >= b)
nr = b - t - 1;
if (b > vc->vc_rows || t >= b || nr < 1)
return;
if (CON_IS_VISIBLE(vc) && vc->vc_sw->con_scroll(vc, t, b, SM_UP, nr))
return;
d = (unsigned short *)(vc->vc_origin + vc->vc_size_row * t)... | false | false | false | false | false | 0 |
ghwp_document_new_from_filename (const gchar *filename, GError **error)
{
g_return_val_if_fail (filename != NULL, NULL);
GHWPFile *file = ghwp_file_new_from_filename (filename, error);
if (file == NULL) {
return NULL;
}
if (*error) return NULL;
return ghwp_file_get_document (file, er... | false | false | false | false | false | 0 |
isStatisfy(SPtr<TSrvMsg> msg)
{
if (condition->exec(msg) == "true")
return true ;
return false;
} | false | false | false | false | false | 0 |
stream_int_shutr(struct stream_interface *si)
{
DPRINTF(stderr, "%s: si=%p, si->state=%d ib->flags=%08x ob->flags=%08x\n",
__FUNCTION__,
si, si->state, si->ib->flags, si->ob->flags);
si->ib->flags &= ~BF_SHUTR_NOW;
if (si->ib->flags & BF_SHUTR)
return;
si->ib->flags |= BF_SHUTR;
si->ib->rex = TICK_ETERNITY;... | false | false | false | false | false | 0 |
test_stemmer(tst_case *tc, void *data)
{
int stemmer_cnt = 0;
const char **stemmers = sb_stemmer_list();
const char **st = stemmers;
struct sb_stemmer *stemmer;
(void)data;
while (*st) {
stemmer_cnt++;
/* printf("%d. -> %s\n", stemmer_cnt, *st); */
st++;
}
stemm... | false | false | false | false | false | 0 |
load_tables (MonoImage *image)
{
const char *heap_tables = image->heap_tables.data;
const guint32 *rows;
guint64 valid_mask, sorted_mask;
int valid = 0, table;
int heap_sizes;
heap_sizes = heap_tables [6];
image->idx_string_wide = ((heap_sizes & 0x01) == 1);
image->idx_guid_wide = ((heap_sizes & 0x02) == 2)... | false | false | false | false | false | 0 |
handle_java_interface_attribute (tree* node,
tree name,
tree args ATTRIBUTE_UNUSED ,
int flags,
bool* no_add_attrs)
{
if (DECL_P (*node)
|| !CLASS_TYPE_P (*node)
|| !TYPE... | false | false | false | false | false | 0 |
mx_window_x11_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec)
{
switch (property_id)
{
case PROP_WINDOW:
MX_WINDOW_X11 (object)->priv->window = g_value_get_object ... | false | false | false | false | false | 0 |
venetian (eraser_state *st)
{
int i;
if (st->ratio == 0.0)
{
int j = 0;
st->horiz_p = (random() & 1);
st->flip_p = (random() & 1);
st->nlines = (st->horiz_p ? st->height : st->width);
st->lines = (int *) calloc (st->nlines, sizeof(*st->lines));
for (i = 0; i < st->nlines * 2... | false | false | false | false | false | 0 |
readString() {
std::error_code EC;
StringRef Str(reinterpret_cast<const char *>(Data));
if (Data + Str.size() + 1 > End) {
EC = sampleprof_error::truncated;
reportError(0, EC.message());
return EC;
}
Data += Str.size() + 1;
return Str;
} | false | false | false | false | false | 0 |
get_primary_disc_info (CcInfoPanel *self)
{
GList *points;
GList *p;
points = g_unix_mount_points_get (NULL);
for (p = points; p != NULL; p = p->next)
{
GUnixMountEntry *mount = p->data;
const char *mount_path;
mount_path = g_unix_mount_get_mount_path (mount);
if (gs... | false | false | false | false | false | 0 |
clk_dump_subtree(struct seq_file *s, struct clk_core *c, int level)
{
struct clk_core *child;
if (!c)
return;
clk_dump_one(s, c, level);
hlist_for_each_entry(child, &c->children, child_node) {
seq_printf(s, ",");
clk_dump_subtree(s, child, level + 1);
}
seq_printf(s, "}");
} | false | false | false | false | false | 0 |
cgiformfdw(const char *p, size_t n)
{
while (n)
{
int k=write(cgiformfd, p, n);
if (k <= 0) enomem();
p += k;
n -= k;
}
} | false | false | false | false | false | 0 |
ReadDirEntry(void)
{
size_t len;
raw_wad_entry_t entry;
lump_t *lump;
DisplayTicker();
len = fread(&entry, sizeof(entry), 1, in_file);
if (len != 1)
FatalError("Trouble reading wad directory");
lump = NewLump(UtilStrNDup(entry.name, 8));
lump->start = UINT32(entry.start);
lump->length = UI... | false | false | false | false | true | 1 |
arch_gnttab_init(unsigned long nr_shared)
{
if (!xen_pv_domain())
return 0;
return arch_gnttab_valloc(&gnttab_shared_vm_area, nr_shared);
} | false | false | false | false | false | 0 |
mvs_94xx_detect_porttype(struct mvs_info *mvi, int i)
{
u32 reg;
struct mvs_phy *phy = &mvi->phy[i];
u32 phy_status;
mvs_write_port_vsr_addr(mvi, i, VSR_PHY_MODE3);
reg = mvs_read_port_vsr_data(mvi, i);
phy_status = ((reg & 0x3f0000) >> 16) & 0xff;
phy->phy_type &= ~(PORT_TYPE_SAS | PORT_TYPE_SATA);
switch (ph... | false | false | false | false | false | 0 |
ldif_add_user_attr(
Ldif_ParsedRec *rec, gchar *tagName, gchar *tagValue,
GHashTable *hashField )
{
Ldif_FieldRec *fld = NULL;
Ldif_UserAttr *attr = NULL;
gchar *name;
fld = g_hash_table_lookup( hashField, tagName );
if( fld ) {
if( ! fld->selected ) return;
name = fld->tagName;
if( fld->userName ) {
... | false | false | false | false | false | 0 |
fso_framework_test_wait_for_condition (gint timeout, GObject* emitter, const gchar* signame, FsoFrameworkTestPredicate predicate, void* predicate_target, GDestroyNotify predicate_target_destroy_notify, FsoFrameworkTestBlock block, void* block_target) {
gboolean result = FALSE;
FsoFrameworkTestSignalWaiter* waiter = N... | false | false | false | false | false | 0 |
au_nhash_test_known_wh(struct au_nhash *whlist, char *name, int nlen)
{
struct hlist_head *head;
struct au_vdir_wh *pos;
struct au_vdir_destr *str;
head = au_name_hash(whlist, name, nlen);
hlist_for_each_entry(pos, head, wh_hash) {
str = &pos->wh_str;
AuDbg("%.*s\n", str->len, str->name);
if (au_nhash_test_... | false | false | false | false | false | 0 |
instance (void)
{
#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
# if defined (ACE_HAS_THREAD_SPECIFIC_STORAGE) || \
defined (ACE_HAS_TSS_EMULATION)
// TSS Singleton implementation.
if (!ACE_Log_Msg::key_created_)
{
ACE_thread_mutex_t *lock =
reinterpret_cast<ACE_thread_mutex_t *> (
... | false | false | false | false | false | 0 |
elm_list_item_insert_after(Evas_Object *obj,
Elm_Object_Item *after,
const char *label,
Evas_Object *icon,
Evas_Object *end,
Evas_Smart_Cb func,
const void *d... | false | false | false | false | false | 0 |
SetClientEncoding(int encoding, bool doit)
{
int current_server_encoding;
Oid to_server_proc,
to_client_proc;
FmgrInfo *to_server;
FmgrInfo *to_client;
MemoryContext oldcontext;
if (!PG_VALID_FE_ENCODING(encoding))
return -1;
/* Can't do anything during startup, per notes above */
if (!backend_s... | false | false | false | false | false | 0 |
exec_fw_op(discovery_rec_t *drec, struct list_head *ifaces,
int info_level, int do_login, int op)
{
struct boot_context *context;
struct list_head targets, rec_list;
struct node_rec *rec;
int rc = 0;
INIT_LIST_HEAD(&targets);
INIT_LIST_HEAD(&rec_list);
if (drec)
return exec_fw_disc_op(drec, ifaces, i... | false | false | false | false | false | 0 |
enterNotifyEvent(XCrossingEvent &ev) {
// ignore grab activates, or if we're not visible
if (ev.mode == NotifyGrab || ev.mode == NotifyUngrab ||
!isVisible()) {
return;
}
if (ev.window == frame().window())
Fluxbox::instance()->keys()->doAction(ev.type, ev.state, 0,
... | false | false | false | false | false | 0 |
addTags( const QStringList& tags )
{
foreach( const QString &tag, tags )
if ( !d->tags.contains( tag ) )
d->tags.append( tag );
d->buildDisplay();
} | false | false | false | false | false | 0 |
blank_frame (rp_frame *frame)
{
rp_screen *s;
rp_window *win;
if (frame->win_number == EMPTY) return;
s = frames_screen (frame);
win = find_window_number (frame->win_number);
hide_window (win);
hide_others (win);
set_frames_window (frame, NULL);
update_bar (s);
/* Give the key window focus. */... | false | false | false | false | false | 0 |
isl_hash_table_free(struct isl_ctx *ctx, struct isl_hash_table *table)
{
if (!table)
return;
isl_hash_table_clear(table);
free(table);
} | false | false | false | false | false | 0 |
rule_list(void)
#else
rule_list()
#endif
{
zzRULE;
zzBLOCK(zztasp1);
zzMake0;
{
if ( (setwd1[LA(1)]&0x10) ) {
rule();
zzaRet.l=zzaArg(zztasp1,1 ).l; zzaRet.r=zzaArg(zztasp1,1 ).r;
{
zzBLOCK(zztasp2);
zzMake0;
{
while ( (setwd1[LA(1)]&0x20) ) {
rule();
{nfa_n... | false | false | false | false | false | 0 |
evaluate_conditions_for_known_args (struct cgraph_node *node,
bool inline_p,
VEC (tree, heap) *known_vals)
{
clause_t clause = inline_p ? 0 : 1 << predicate_not_inlined_condition;
struct inline_summary *info = inline_summary (node);
int i;
struct condition *c;
for (i = 0; VEC_iterate (conditi... | false | false | false | false | false | 0 |
range_strinbuf(const void* buf,size_t len,const void* stringstart) {
const char* x;
const char* y;
if (!range_ptrinbuf(buf,len,x=stringstart)) return 0;
y=x+len;
for (; x<y && *x; ++x);
return (x<y);
} | false | false | false | false | false | 0 |
getChar() {
if (pred) {
return pred->getChar();
}
if (eof) {
return EOF;
}
if (seqIndex >= seqLength) {
if (!processNextCode()) {
return EOF;
}
}
return seqBuf[seqIndex++];
} | false | false | false | false | false | 0 |
gst_argb_control_binding_get_value (GstControlBinding * _self,
GstClockTime timestamp)
{
GstARGBControlBinding *self = GST_ARGB_CONTROL_BINDING (_self);
GValue *dst_val = NULL;
gdouble src_val_a = 1.0, src_val_r = 0.0, src_val_g = 0.0, src_val_b = 0.0;
gboolean ret = TRUE;
g_return_val_if_fail (GST_IS_AR... | false | false | false | false | false | 0 |
LOG_RateLimited(void)
{
time_t now;
now = time(NULL);
if (last_limited + 10 > now && last_limited <= now)
return 1;
last_limited = now;
return 0;
} | false | false | false | false | false | 0 |
enable_multicast(unsigned short eth_nic_base) {
unsigned char mcfilter[8];
int i;
memset(mcfilter, 0xFF, 8);
outb(4, eth_nic_base + D8390_P0_RCR);
outb(D8390_COMMAND_RD2 + D8390_COMMAND_PS1, eth_nic_base + D8390_P0_COMMAND);
for (i = 0; i < 8; i++) {
outb(mcfilter[i], eth_nic_base + 8 + i);
if (inb(eth_nic_b... | false | false | false | false | false | 0 |
F_string_to_integer(struct alisp_instance *instance, struct alisp_object * args)
{
struct alisp_object * p = eval(instance, car(args)), * p1;
delete_tree(instance, cdr(args));
delete_object(instance, args);
if (alisp_compare_type(p, ALISP_OBJ_INTEGER))
return p;
if (alisp_compare_type(p, ALISP_OBJ_FLOAT)) {
p... | false | false | false | false | false | 0 |
ixgbe_update_itr(struct ixgbe_q_vector *q_vector,
struct ixgbe_ring_container *ring_container)
{
int bytes = ring_container->total_bytes;
int packets = ring_container->total_packets;
u32 timepassed_us;
u64 bytes_perint;
u8 itr_setting = ring_container->itr;
if (packets == 0)
return;
/* simple throttl... | false | false | false | false | false | 0 |
ConvertVector(const FMVector3& v)
{
if (IsEquivalent(v, FMVector3::XAxis)) return X;
else if (IsEquivalent(v, FMVector3::YAxis)) return Y;
else if (IsEquivalent(v, FMVector3::ZAxis)) return Z;
else return UNKNOWN;
} | false | false | false | false | false | 0 |
odf_parse_float (char *text, char **end)
{
gnm_float x = gnm_strto (text, end);
if (text == *end)
x = 1.;
if (**end == 'E' || **end == 'e') {
gnm_float exp = gnm_strto (*end + 1, end);
x *= gnm_pow10 (exp);
}
return x;
} | false | false | false | false | false | 0 |
text_editor_scintilla_command (TextEditor *te, gint command, glong wparam,
glong lparam)
{
GList *node;
node = te->views;
while (node)
{
GtkWidget *scintilla;
scintilla = aneditor_get_widget (GPOINTER_TO_INT (node->data));
scintilla_send_message (SCINTILLA(scintilla), command, wparam, lparam);
no... | false | false | false | false | false | 0 |
export_progress (SeahorseOperation *op, const gchar *message,
gdouble fract, SeahorseTransferOperation *top)
{
SeahorseTransferOperationPrivate *pv = SEAHORSE_TRANSFER_OPERATION_GET_PRIVATE (top);
g_assert (op == pv->operation);
DEBUG_OPERATION (("[transfer] export progress: %lf\n", f... | false | false | false | false | false | 0 |
vdi_dns_getfd(const struct director *director, struct sess *sp)
{
struct vdi_dns *vs;
struct director *dir;
struct vbc *vbe;
CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
CHECK_OBJ_NOTNULL(director, DIRECTOR_MAGIC);
CAST_OBJ_NOTNULL(vs, director->priv, VDI_DNS_MAGIC);
dir = vdi_dns_find_backend(sp, vs);
if (!dir || !VDI... | false | false | false | false | false | 0 |
HPDF_NewEx (HPDF_Error_Handler user_error_fn,
HPDF_Alloc_Func user_alloc_fn,
HPDF_Free_Func user_free_fn,
HPDF_UINT mem_pool_buf_size,
void *user_data)
{
HPDF_Doc pdf;
HPDF_MMgr mmgr;
HPDF_Error_Rec tmp_error;
... | false | false | false | false | false | 0 |
bvfs_parse_arg(UAContext *ua,
DBId_t *pathid, char **path, char **jobid,
char **username,
int *limit, int *offset)
{
*pathid=0;
*limit=2000;
*offset=0;
*path=NULL;
*jobid=NULL;
*username=NULL;
for (int i=1; i<ua->arg... | false | false | false | false | false | 0 |
xkl_config_registry_find_option_group(XklConfigRegistry * config, XklConfigItem * pitem /* in/out */
)
{
xmlNodePtr node = NULL;
gboolean rv = xkl_config_registry_find_object(config,
XKBCR_GROUP_PATH
"[configItem/name = '%s%s']",
"", pitem, &node);
if (rv) {
xmlChar *val = x... | false | false | false | false | false | 0 |
notes_rewrite_config(const char *k, const char *v, void *cb)
{
struct notes_rewrite_cfg *c = cb;
if (!prefixcmp(k, "notes.rewrite.") && !strcmp(k+14, c->cmd)) {
c->enabled = git_config_bool(k, v);
return 0;
} else if (!c->mode_from_env && !strcmp(k, "notes.rewritemode")) {
if (!v)
config_error_nonbool(k);
... | false | false | false | false | true | 1 |
CacheDestroy(cc)
ChimeraCache cc;
{
FILE *fp;
CacheEntry *ce;
GList list;
list = cc->cachelist;
cc->refcount--;
if (cc->refcount > 0) return;
if (cc->persist)
{
/*
* This can take a really long time so its only done once at the end.
*/
if ((fp = fopen(cc->cindex, "w")) != NULL)
{... | false | false | false | false | false | 0 |
clearlabels(patchbuf, patchtop)
char *patchbuf;
char *patchtop;
{
register struct labdatstruct *labptr;
struct labdatstruct *labtop;
register char *labpatch;
for (labptr = &vislab[0], labtop = &vislab[MAXVISLAB];
labptr < labtop; ++labptr)
if ((labpatch = labptr->labpatch) >= patchbuf && labpatch < ... | false | false | false | false | false | 0 |
sigmaHat() {
// Charge and colour factors.
double eNow = couplingsPtr->ef( abs(id1) );
double sigma = sigma0 * pow2(eNow);
if (abs(id1) < 9) sigma /= 3.;
// Answer.
return sigma;
} | false | false | false | false | false | 0 |
push(stk_t* sp, Agnode_t * np)
{
if (sp->curp == sp->curblk->endp) {
if (sp->curblk->next == NULL) {
blk_t *bp = GNEW(blk_t);
if (bp == 0) {
agerr(AGERR, "gc: Out of memory\n");
longjmp(jbuf, 1);
}
bp->prev = sp->curblk;
bp->next = NULL;
bp->data = N_GNEW(BIGBUF, Agnode_t *);
... | false | false | false | false | false | 0 |
sendVariables(map<string, Variable> globals, list<pair<string, pair<string, int> > >& stk, bool globalScope) {
if(clientsock < 0) return;
stringstream s;
s << "<vars for=\"" << (globalScope?"$global":"$local")
<< "\" scope=\"" << (globalScope?stk.front().second.first:stk.back().first) << "\">";
bool primi... | false | false | false | false | false | 0 |
ad_sd_write_reg(struct ad_sigma_delta *sigma_delta, unsigned int reg,
unsigned int size, unsigned int val)
{
uint8_t *data = sigma_delta->data;
struct spi_transfer t = {
.tx_buf = data,
.len = size + 1,
.cs_change = sigma_delta->bus_locked,
};
struct spi_message m;
int ret;
data[0] = (reg << sigma_delta... | false | false | false | false | false | 0 |
__vtfind(char *nam, struct symtab_t *sytp)
{
register struct tnode_t *cur, *down;
struct tnode_t *balpt_par, *bal_pt, *vtnew, *bal_down;
int32 cv;
/* DBG remove --
if (sytp->stsyms != NULL) __misc_terr(__FILE__, __LINE__);
--- */
vtnew = NULL;
if (sytp->n_head == NULL)
{ sytp->n_head = alloc_tnode(sytp); r... | false | false | false | false | false | 0 |
erase()
{
m_pEdit->erase();
m_pEdit->setFocus();
if (m_Type == NewPassword)
m_pEdit2->erase();
} | false | false | false | false | false | 0 |
scan_for_free_cb(struct ubifs_info *c,
const struct ubifs_lprops *lprops, int in_tree,
struct scan_data *data)
{
int ret = LPT_SCAN_CONTINUE;
/* Exclude LEBs that are currently in use */
if (lprops->flags & LPROPS_TAKEN)
return LPT_SCAN_CONTINUE;
/* Determine whether to add these LEB properties to ... | false | false | false | false | false | 0 |
process_dir (const gchar *directory,
GList **ret,
xmms_error_t *error)
{
GList *list;
list = xmms_xform_browse (directory, error);
if (!list) {
return FALSE;
}
list = g_list_sort (list, cmp_val);
while (list) {
xmmsv_t *val = list->data;
const gchar *str;
gint isdir;
xmmsv_... | false | false | false | false | false | 0 |
scm_dynwind_current_input_port (SCM port)
#define FUNC_NAME NULL
{
SCM_VALIDATE_OPINPORT (1, port);
scm_dynwind_fluid (cur_inport_fluid, port);
} | false | false | false | false | false | 0 |
hostap_join_ap(struct net_device *dev)
{
struct hostap_interface *iface;
local_info_t *local;
struct hfa384x_join_request req;
unsigned long flags;
int i;
struct hfa384x_hostscan_result *entry;
iface = netdev_priv(dev);
local = iface->local;
memcpy(req.bssid, local->preferred_ap, ETH_ALEN);
req.channel = 0;... | false | true | false | false | false | 1 |
get_exc_message(VMG_ const CVmException *exc,
char *buf, size_t buflen, int add_unh_prefix)
{
CVmException tmpexc;
const char *tmpmsg;
const char *msg;
/* set up our temporary exception object with no parameters by default */
tmpexc.param_count_ = 0;
... | false | false | false | false | false | 0 |
DLdiv(quotient, divisor)
doublelong *quotient; /* also where dividend is, originally */
ULONG divisor;
{
register ULONG u1u2 = quotient->high;
register ULONG u3u4 = quotient->low;
register LONG u3; /* single digit of dividend */
register int v1... | 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.