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 |
|---|---|---|---|---|---|---|
test_root(int a, int b)
{
if (a == 0)
return 1;
while (1) {
if (a == 1)
return 1;
if (a % b)
return 0;
a = a / b;
}
} | false | false | false | false | false | 0 |
HPDF_FreeTextAnnot_Set2PointCalloutLine ( HPDF_Annotation annot, HPDF_Point startPoint, HPDF_Point endPoint) /* Callout line will be in default user space */
{
HPDF_Array clPoints;
HPDF_STATUS ret = HPDF_OK;
HPDF_PTRACE((" HPDF_FreeTextAnnot_Set3PointCalloutLine\n"));
clPoints = HPDF_Array_New ( a... | false | false | false | false | false | 0 |
eprn_get_initial_matrix(gx_device *device, gs_matrix *mptr)
{
eprn_Device *dev = (eprn_Device *)device;
float
/* The following two arrays are oriented w.r.t. pixmap device space, i.e.,
the index 0 refers to the x coordinate (horizontal) and the index 1 to
the y coordinate (vertical) in pixmap d... | false | false | false | false | false | 0 |
lib_cmd_count (sc_gameref_t game)
{
const sc_filterref_t filter = gs_get_filter (game);
sc_int index_, size, weight;
sc_char buffer[32];
/* Sum sizes for objects currently held or worn by player. */
size = 0;
for (index_ = 0; index_ < gs_object_count (game); index_++)
{
if (gs_object_position (ga... | false | false | false | false | false | 0 |
val_bool()
{
DBUG_ASSERT(fixed == 1);
if (exec())
{
reset();
return 0;
}
return value != 0;
} | false | false | false | false | false | 0 |
qrp_init(void)
{
/*
* Having a working hash function is critical.
* Check that the implementation is not broken by accident.
*/
g_assert(qrp_hash("ebcklmenq", 13) == 3527);
g_assert(qrp_hash("ndflalem", 16) == 37658);
g_assert(qrp_hash("7777a88a8a8a8", 10) == 342);
test_hash();
/*
* Install the periodi... | false | false | false | false | false | 0 |
PrintSelf(std::ostream & os, Indent indent) const
{
Superclass::PrintSelf(os, indent);
if ( m_CostFunction )
{
os << indent << "Cost Function: " << m_CostFunction.GetPointer() << std::endl;
}
} | false | false | false | false | false | 0 |
poffline(P *p)
{
if (p->ptr) {
vunlock(p->ptr);
p->ptr = NULL;
}
return p;
} | false | false | false | false | false | 0 |
columnAlignment(int ind)
{
GtkTreeViewColumn *col = gt_tree_view_find_column(GTK_TREE_VIEW(widget), ind);
if (!col)
return ALIGN_LEFT;
else
return gt_to_alignment(gtk_tree_view_column_get_alignment(col));
} | false | false | false | false | false | 0 |
xaccSchedXactionGetInstanceAfter( const SchedXaction *sx,
GDate *date,
SXTmpStateData *stateData )
{
GDate prev_occur, next_occur;
g_date_clear( &prev_occur, 1 );
if ( date )
{
prev_occur = *date;
}
if ( stateData != N... | false | false | false | false | false | 0 |
now_us ()
{
#if defined ZMQ_HAVE_WINDOWS
// Get the high resolution counter's accuracy.
LARGE_INTEGER ticksPerSecond;
QueryPerformanceFrequency (&ticksPerSecond);
// What time is it?
LARGE_INTEGER tick;
QueryPerformanceCounter (&tick);
// Convert the tick number into the number of seco... | false | false | false | false | false | 0 |
GetNonHistoricCatalogSnapshot(Oid relid)
{
/*
* If the caller is trying to scan a relation that has no syscache, no
* catcache invalidations will be sent when it is updated. For a few key
* relations, snapshot invalidations are sent instead. If we're trying to
* scan a relation for which neither catcache nor... | false | false | false | false | false | 0 |
op_stack(int opnum)
{
long n1,n2;
n1=pop_stack(); n2=pop_stack();
switch(opnum)
{
case 0: n1=n1+n2; break;
case 1: n1=n1-n2; break;
case 2:
if (mult_rangecheck(n1,n2)) n1=n1*n2;
break;
case 3:
if (n2!=0) n1=n1/n2;
else writeln("GAME ERROR: Division by zero.");
... | false | false | false | false | false | 0 |
createRule(Var head, Literal* bodyFirst, Literal* bodyEnd) const {
prg_.startRule(BASICRULE);
prg_.addHead(head);
while (bodyFirst != bodyEnd) {
prg_.addToBody(bodyFirst->var(), !bodyFirst->sign());
++bodyFirst;
}
prg_.endRule();
} | false | false | false | false | false | 0 |
zCalculateNextStopSeqValue(zStopSeq* ss, coor_t pos){
while(pos < ss->dna->length - 3 &&
zCheckDNAForPossibleStopCodon(ss->dna,pos) == false){
pos += 3;
}
return pos;
} | false | false | false | false | false | 0 |
copy_data_table(Module_table *mpt,Data_table *dpt)
{
Data_table *ndpt = NULL;
if (dpt != NULL) {
ndpt = alloc_data_table();
ndpt->op = copy_operand_with_mpt(mpt, dpt->op);
ndpt->sublist = copy_Integerlist_list_with_mpt(dpt->sublist);
ndpt->offset_of_element = dpt->offset_of_element;
n... | false | false | false | false | false | 0 |
_elm_scroller_smart_sub_object_del(Evas_Object *obj,
Evas_Object *sobj)
{
ELM_SCROLLER_DATA_GET(obj, sd);
if (!ELM_WIDGET_CLASS(_elm_scroller_parent_sc)->sub_object_del(obj, sobj))
return EINA_FALSE;
if (sobj == sd->content)
{
elm_widget_on_show_region_hoo... | false | false | false | false | false | 0 |
mlx5_query_max_pkeys(struct ib_device *ibdev,
u16 *max_pkeys)
{
struct mlx5_ib_dev *dev = to_mdev(ibdev);
struct mlx5_core_dev *mdev = dev->mdev;
switch (mlx5_get_vport_access_method(ibdev)) {
case MLX5_VPORT_ACCESS_METHOD_MAD:
return mlx5_query_mad_ifc_max_pkeys(ibdev, max_pkeys);
case MLX5_VPORT_ACCESS_M... | false | false | false | false | false | 0 |
TestCommandViewIndex( String )
char *String;
{
char *Scan;
long Index;
fprintf( stdout, "--> viewid\n" );
if ( String != (char *)0 )
{
Scan = strchr( String, ' ' );
if ( Scan != (char *)0 )
{
*Scan = '\0';
}
Index = atol( String );
if ( checkbddindex( (bddsystem *)0, I... | false | false | false | false | false | 0 |
contacts_capabilities_updated (TpConnection *connection,
GHashTable *capabilities,
gpointer user_data G_GNUC_UNUSED,
GObject *weak_object G_GNUC_UNUSED)
{
GHashTableIter iter;
gpointer handle, value;
g_hash_table_iter_init (&iter, capabilities);
while (g_hash_table_iter_next (&iter, &handle, &value... | false | false | false | false | false | 0 |
gst_au_parse_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
{
GstAuParse *auparse;
gboolean ret = TRUE;
auparse = GST_AU_PARSE (parent);
switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_CAPS:
{
/* discard, we'll come up with proper src caps */
gst_event_unref (event);
... | false | false | false | false | false | 0 |
wt_match(struct term *t,
struct term *template,
int *wtp,
struct is_tree *wt_index)
{
struct rel *r1,*r2;
int go;
if (template->type == COMPLEX && template->sym_num == Dots_sym_num &&
wt_match_dots(t, template->farg->argval, wtp, wt_index))
return(1);
else if (t->type != template->t... | false | false | false | false | false | 0 |
stir421x_fw_upload(struct irda_usb_cb *self,
const unsigned char *patch,
const unsigned int patch_len)
{
int ret = -ENOMEM;
int actual_len = 0;
unsigned int i;
unsigned int block_size = 0;
unsigned char *patch_block;
patch_block = kzalloc(STIR421X_PATCH_B... | false | false | false | false | false | 0 |
verify(bool value, const std::string& message) const {
beforeRead();
if (! value) {
ParseError p;
if (m_data) {
p.filename = m_data->source.filename;
p.line = m_data->source.line;
p.character = m_data->source.character;
}
if (name().empt... | false | false | false | false | false | 0 |
fill_label_map(uint8_t *label_map, int label_map_len, uint8_t *bytes, int code_len, int pc_start)
{
int pc = pc_start;
int wide = 0;
int address;
memset(label_map, 0, label_map_len);
while(pc - pc_start < code_len)
{
int opcode = bytes[pc];
if (opcode == 0xc4) { wide = 1; pc++; continue; }
switch(... | false | false | false | false | false | 0 |
isci_remote_device_suspend_terminate(
struct isci_host *ihost,
struct isci_remote_device *idev,
struct isci_request *ireq)
{
unsigned long flags;
enum sci_status status;
/* Put the device into suspension. */
spin_lock_irqsave(&ihost->scic_lock, flags);
set_bit(IDEV_ABORT_PATH_ACTIVE, &idev->flags);
sci_remote... | false | false | false | false | false | 0 |
mozldap_ldap_getfilter_free( LDAPFiltDesc *lfdp )
{
LDAPFiltList *flp, *nextflp;
LDAPFiltInfo *fip, *nextfip;
if ( lfdp == NULL ) {
return;
}
for ( flp = lfdp->lfd_filtlist; flp != NULL; flp = nextflp ) {
for ( fip = flp->lfl_ilist; fip != NULL; fip = nextfip ) {
nextfip = fip->lfi_next;
... | false | false | false | false | false | 0 |
search_empty(struct snd_emu10k1 *emu, int size)
{
struct list_head *p;
struct snd_emu10k1_memblk *blk;
int page, psize;
psize = get_aligned_page(size + PAGE_SIZE -1);
page = 0;
list_for_each(p, &emu->memhdr->block) {
blk = get_emu10k1_memblk(p, mem.list);
if (page + psize <= blk->first_page)
goto __found_... | false | false | false | false | false | 0 |
get_shutter(struct i2c_client *client, u32 *data)
{
int ret;
ret = reg_read(client, MT9T031_SHUTTER_WIDTH_UPPER);
*data = ret << 16;
if (ret >= 0)
ret = reg_read(client, MT9T031_SHUTTER_WIDTH);
*data |= ret & 0xffff;
return ret < 0 ? ret : 0;
} | false | false | false | false | false | 0 |
vp6_adjust(int v, int t)
{
int V = v, s = v >> 31;
V ^= s;
V -= s;
if (V-t-1 >= (unsigned)(t-1))
return v;
V = 2*t - V;
V += s;
V ^= s;
return V;
} | false | false | false | false | false | 0 |
_krb5_HMAC_MD5_checksum(krb5_context context,
struct _krb5_key_data *key,
const void *data,
size_t len,
unsigned usage,
Checksum *result)
{
EVP_MD_CTX *m;
struct _krb5_checksum_type *c = _krb5_find_checksum (CKSUMTYPE_RSA_MD5);
const char signature[] = "signaturekey";
Checksum ksign_c;
... | true | true | false | false | false | 1 |
mailimap_append(mailimap * session, const char * mailbox,
struct mailimap_flag_list * flag_list,
struct mailimap_date_time * date_time,
const char * literal, size_t literal_size)
{
struct mailimap_response * response;
int r;
int error_code;
struct mailimap_continue_req * cont_req;
size_t indx;
s... | false | false | false | false | false | 0 |
__label_insert(struct aa_labelset *ls,
struct aa_label *label, bool replace)
{
struct rb_node **new, *parent = NULL;
AA_BUG(!ls);
AA_BUG(!label);
AA_BUG(labels_set(label) != ls);
AA_BUG(!write_is_locked(&ls->lock));
AA_BUG(label->flags & FLAG_IN_TREE);
/* Figure out where to put new node */
new = &... | false | false | false | false | false | 0 |
remLCD(int lcdNumber)
{
std::map<int, ArLCDMTX *>::iterator it;
if ((it = myLCDMap.find(lcdNumber)) == myLCDMap.end())
{
ArLog::log(ArLog::Normal,
"ArRobot::remLCD: Could not find lcd %d to remove",
lcdNumber);
return false;
}
ArLog::log(ArLog::Normal,
"ArRobot::remLCD... | false | false | false | false | false | 0 |
ssd1307fb_write_array(struct i2c_client *client,
struct ssd1307fb_array *array, u32 len)
{
int ret;
len += sizeof(struct ssd1307fb_array);
ret = i2c_master_send(client, (u8 *)array, len);
if (ret != len) {
dev_err(&client->dev, "Couldn't send I2C command.\n");
return ret;
}
return 0;
} | false | false | false | false | false | 0 |
close_session(struct session_state *state)
{
if (state->find.attributes) {
application_error("application didn't do C_FindObjectsFinal\n");
find_object_final(state);
}
state->session_handle = CK_INVALID_HANDLE;
soft_token.application = NULL_PTR;
soft_token.notify = NULL_PTR;
reset_crypto_stat... | false | false | false | false | false | 0 |
check_conversion (const struct conversion *conv)
{
SoupDate *date;
char *str;
debug_printf (2, "%s\n", conv->source);
date = make_date (conv->source);
if (!date) {
debug_printf (1, " date parsing failed for '%s'.\n", conv->source);
errors++;
return;
}
str = soup_date_to_string (date, SOUP_DATE_HTTP);
i... | false | false | false | false | false | 0 |
Recover_Solutions_2(WamWord stop_word, WamWord handle_key_word,
WamWord list_word)
{
int stop;
int nb_sol;
WamWord *p, *q;
OneSol *s;
Bool handle_key;
stop = Rd_Integer(stop_word);
nb_sol = sol->sol_no - stop;
if (nb_sol == 0)
return Get_Nil(list_word);
handle_key = Rd_Integer(handle_key_... | false | false | false | false | false | 0 |
ShuffleSeqSet2(ss_type P)
{
long r,s,i,n,item;
dh_type H;
e_type E;
char *S;
for(n=0,i=1;i<=P->nent;i++) { E=P->entity[i]; n += LenSeq(E); }
H = dheap(n+2,4);
NEW(S,n+2,char);
for(item=i=1;i<=P->nent;i++) {
E=P->entity[i];
for(s=1; s<= (long) LenSeq(E); s++){
r = ResSeq(s,E);
insrtHeap(item,((keytyp... | false | false | false | false | false | 0 |
e_color_class_node_find_stringshared(const char *name)
{
Eina_List *l;
E_Color_Class *cc;
EINA_LIST_FOREACH(e_config->color_classes, l, cc)
if (cc && cc->name == name)
return l;
return NULL;
} | false | false | false | false | false | 0 |
opj_j2k_decode_tiles ( opj_j2k_t *p_j2k,
opj_stream_private_t *p_stream,
opj_event_mgr_t * p_manager)
{
OPJ_BOOL l_go_on = OPJ_TRUE;
OPJ_UINT32 l_current_tile_no;
OPJ_UINT32 l_... | false | false | false | false | false | 0 |
GetCoords (double *x, double *y, double *z) const
{
if (x == NULL || y == NULL)
return false;
*x = m_x;
*y = m_y;
if (z)
*z = 0.;
return true;
}
} | false | false | false | false | false | 0 |
update(CdlTransaction transact, CdlNode source, CdlNode dest, CdlUpdate change)
{
CYG_REPORT_FUNCNAME("CdlProperty::update");
CYG_REPORT_FUNCARG5XV(this, transact, source, dest, change);
CYG_PRECONDITION_THISC();
CYG_UNUSED_PARAM(CdlTransaction, transact);
CYG_UNUSED_PARAM(CdlNode, source);
CYG... | false | false | false | false | false | 0 |
evd_jsonrpc_transport_receive (EvdJsonrpc *self,
const gchar *message,
gpointer context,
guint invocation_id,
GError **error)
{
gsize size;
GError *_error = NULL;
g... | false | false | false | false | false | 0 |
showError(ErrorMsg& err) {
stringstream s;
s << err.file << ":" << err.line << " - " << err.msg << "." << endl;
showError(s);
} | false | false | false | false | false | 0 |
region_inside(const region *loc, const ui_event *key)
{
if ((loc->col > key->mouse.x) || (loc->col + loc->width <= key->mouse.x))
return FALSE;
if ((loc->row > key->mouse.y) || (loc->row + loc->page_rows <= key->mouse.y))
return FALSE;
return TRUE;
} | false | false | false | false | false | 0 |
_read_topo_file(slurm_conf_switches_t **ptr_array[])
{
static s_p_options_t switch_options[] = {
{"SwitchName", S_P_ARRAY, _parse_switches, _destroy_switches},
{NULL}
};
int count;
slurm_conf_switches_t **ptr;
debug("Reading the topology.conf file");
if (!topo_conf)
topo_conf = get_extra_conf_path("topolog... | false | false | false | false | false | 0 |
alloc_lattice_info(struct splitter_context *sc, int size)
{
int i;
struct lattice_info* info = (struct lattice_info*)malloc(sizeof(struct lattice_info));
info->sc = sc;
info->lattice_node_list = (struct node_list_head*)
malloc((size + 1) * sizeof(struct node_list_head));
for (i = 0; i < size + 1; i++) {
... | false | false | false | false | false | 0 |
init(void)
{
// send command to power on camera on seekur
if(myRobot)
{
ArLog::log(ArLog::Normal, "ArRVisionPTZ: turning camer power on ...");
myRobot->com2Bytes(116, 12, 1);
}
myConn = getDeviceConnection();
if(!myConn)
{
ArLog::log(ArLog::Normal, "ArRVisionPTZ: opening connection to camera... | false | false | false | false | false | 0 |
str2argv(char *str, char **argv, int max_argc)
{
int argc = 0;
while (*str) {
if (argc >= max_argc) break;
/*
* Chop out comments early.
*/
if (*str == '#') {
*str = '\0';
break;
}
while ((*str == ' ') ||
(*str == '\t') ||
(*str == '\r') ||
(*str == '\n')) *(str++) ... | false | false | false | false | false | 0 |
kept_level_p (void)
{
return (current_binding_level->blocks != NULL_TREE
|| current_binding_level->keep
|| current_binding_level->kind == sk_cleanup
|| current_binding_level->names != NULL_TREE
|| current_binding_level->using_directives);
} | false | false | false | false | false | 0 |
custom_attrs_get_by_type (MonoObject *obj, MonoReflectionType *attr_type)
{
MonoClass *attr_class = attr_type ? mono_class_from_mono_type (attr_type->type) : NULL;
MonoArray *res;
MonoError error;
if (attr_class)
mono_class_init_or_throw (attr_class);
res = mono_reflection_get_custom_attrs_by_type (obj, attr_c... | false | false | false | false | false | 0 |
GetSequenceStats(dirac_encoder_t *encoder,
const DiracByteStats& dirac_seq_stats)
{
dirac_enc_seqstats_t *sstats = &encoder->enc_seqstats;
sstats->seq_bits = dirac_seq_stats.GetBitCount(STAT_TOTAL_BYTE_COUNT);
sstats->mv_bits = dirac_seq_stats.GetBitCount(STAT_MV_BYTE_CO... | false | false | false | false | false | 0 |
poll_thread(void *data)
{
int rc;
while (1) {
if (kthread_should_stop() || signal_pending(current))
break;
if (controller->ops->query_enum()) {
do {
rc = check_slots();
if (rc > 0) {
/* Give userspace a chance to handle extraction */
msleep(500);
} else if (rc < 0) {
dbg("%s - er... | false | false | false | false | false | 0 |
_siftup(PyListObject *heap, Py_ssize_t pos)
{
Py_ssize_t startpos, endpos, childpos, rightpos, limit;
int cmp;
PyObject *newitem, *tmp, *olditem;
Py_ssize_t size;
assert(PyList_Check(heap));
size = PyList_GET_SIZE(heap);
endpos = size;
startpos = pos;
if (pos >= endpos) {
Py... | false | false | false | false | false | 0 |
KillConnection(int in_fd) {
// Let the framework clear any state info
srvframework->KillConnection(in_fd);
if (in_fd < 0)
return;
// Nuke descriptors
FD_CLR(in_fd, &server_fdset);
FD_CLR(in_fd, &pending_readset);
// Nuke ringbuffers
map<int, RingBuffer *>::iterator miter = read_buf_m... | false | false | false | false | false | 0 |
mxf_metadata_generic_sound_essence_descriptor_to_structure (MXFMetadataBase * m)
{
GstStructure *ret =
MXF_METADATA_BASE_CLASS
(mxf_metadata_generic_sound_essence_descriptor_parent_class)->to_structure
(m);
MXFMetadataGenericSoundEssenceDescriptor *self =
MXF_METADATA_GENERIC_SOUND_ESSENCE_D... | false | false | false | false | false | 0 |
decode_base64 (const std::vector<std::string> &todec,
std::string::size_type pos)
{
// Append all lines
std::string body;
while (pos < todec.size ())
body += todec[pos++];
// Decode line
return decode_base64 (body);
} | false | false | false | false | false | 0 |
kv_update_acp_boot_level(struct radeon_device *rdev)
{
struct kv_power_info *pi = kv_get_pi(rdev);
u8 acp_boot_level;
if (!pi->caps_stable_p_state) {
acp_boot_level = kv_get_acp_boot_level(rdev);
if (acp_boot_level != pi->acp_boot_level) {
pi->acp_boot_level = acp_boot_level;
kv_send_msg_to_smc_with_param... | false | false | false | false | false | 0 |
spdbuggy_get_bg_tile_info( int tile_index )
{
int code = spdbuggy_bgram[tile_index*2] + spdbuggy_bgram[tile_index*2+1]*256;
SET_TILE_INFO(BG_GFX, code & 0x0fff, code >> 12, 0 ); // $3000 tiles!
} | false | false | false | false | false | 0 |
cpu_getiloops(void)
{
VERIFY_ACTIVECPU(0, cpu_getiloops);
return cpu[activecpu].iloops;
} | false | false | false | false | false | 0 |
AddListSeparator(char *s)
{
if (s[strlen(s)-1] != LISTSEPARATOR)
{
s[strlen(s)+1] = '\0';
s[strlen(s)] = LISTSEPARATOR;
}
} | false | false | false | false | false | 0 |
cross_products( std::list<const Disjunction*>::const_iterator it,
std::list<const Disjunction*>::const_iterator end,
std::list<const StateFormula*> &flist,
std::list<const Conjunction*> &xproduct )
{
if( it == end )
{
Conjunction *conj = new Conjunction;
for( std::list<const St... | false | false | false | false | false | 0 |
do_forecast (const char *str, DATASET *dset,
gretlopt opt, PRN *prn)
{
void *ptr;
GretlObjType type;
int err;
ptr = get_last_model(&type);
if (ptr == NULL) {
return E_BADSTAT;
}
if ((opt & (OPT_R | OPT_I | OPT_U)) && type != GRETL_OBJ_EQN) {
/* "rolling", "integrate", plot option: si... | false | false | false | false | false | 0 |
avdtp_exit(const bdaddr_t *src)
{
struct avdtp_server *server;
GSList *l;
server = find_server(servers, src);
if (!server)
return;
l = server->sessions;
while (l) {
struct avdtp *session = l->data;
l = l->next;
/* value of l pointer should be updated before invoking
* connection_lost since it intern... | false | false | false | false | false | 0 |
periodic_next_shadow(union ehci_shadow *periodic,
__le32 tag)
{
switch (tag) {
default:
case Q_TYPE_QH:
return &periodic->qh->qh_next;
}
} | false | false | false | false | false | 0 |
name_card(struct snd_oxfw *oxfw)
{
struct fw_device *fw_dev = fw_parent_device(oxfw->unit);
char vendor[24];
char model[32];
const char *d, *v, *m;
u32 firmware;
int err;
/* get vendor name from root directory */
err = fw_csr_string(fw_dev->config_rom + 5, CSR_VENDOR,
vendor, sizeof(vendor));
if (err <... | false | false | false | false | false | 0 |
handleTrackDirective(Node *n) {
int trackObjects = GetFlag(n, "feature:trackobjects");
if (trackObjects) {
Printf(klass->init, "SwigClass%s.trackObjects = 1;\n", klass->name);
} else {
Printf(klass->init, "SwigClass%s.trackObjects = 0;\n", klass->name);
}
} | false | false | false | false | false | 0 |
moveItemTo(Item item, int x, int y) {
Window parent_return=0,
root_return=0,
*children_return = NULL;
unsigned int nchildren_return;
// get the root window
if (!XQueryTree(display(), window(),
&root_return, &parent_return, &children_return, &nchildren_return))
... | false | false | false | false | false | 0 |
findMetalloceneBonds(std::vector<OBBond*> &bonds, OBMol *mol, const std::vector<unsigned int> &symmetry_classes)
{
FOR_ATOMS_OF_MOL (atom, mol) {
if (!atom->IsInRingSize(3))
continue;
std::vector<unsigned int> nbrSymClasses;
FOR_NBORS_OF_ATOM (nbr, &*atom) {
if (nbr->IsInRingSize... | false | false | false | false | false | 0 |
operator<< (std::ostream &os, const EmailList &list)
{
for( EmailList::const_iterator b = list.begin(), e = list.end();
b != e;
++b )
{
if( b != list.begin() )
os << ", ";
os << *b;
}
return os;
} | false | false | false | false | false | 0 |
openfont(char *filename)
{
FILE *f;
struct myfont *t=NULL;
char c;
if ((f=fopen(filename, "rb"))) {
if ((t=malloc(sizeof(struct myfont)))) {
fread(&c, sizeof(char), 1, f);
t->width=(int)c;
fread(&c, sizeof(char), 1, f);
t->height=(int)c;
... | false | false | false | false | true | 1 |
STREAM_load(const char *path, char **buffer, int *rlen)
{
STREAM stream;
int64_t len;
STREAM_open(&stream, path, ST_READ);
STREAM_lof(&stream, &len);
if (len >> 31)
THROW(E_MEMORY);
*rlen = len;
ALLOC(buffer, *rlen, "STREAM_load");
STREAM_read(&stream, *buffer, *rlen);
STREAM_close(&stream);
} | false | false | false | false | false | 0 |
read_coincident(__isl_keep isl_stream *s)
{
isl_ctx *ctx;
isl_val_list *list;
int more;
ctx = isl_stream_get_ctx(s);
if (isl_stream_yaml_read_start_sequence(s) < 0)
return NULL;
list = isl_val_list_alloc(ctx, 0);
while ((more = isl_stream_yaml_next(s)) > 0) {
isl_val *val;
val = isl_stream_read_val(s)... | false | false | false | false | false | 0 |
qmonJobStateToColor(
Widget w,
lListElem *jat
) {
Pixel color;
static Pixel fg = 0;
int state;
int hold;
DENTER(GUI_LAYER, "qmonJobStateToColor");
if (!fg)
XtVaGetValues(w, XmNforeground, &fg, NULL);
if (!jat) {
DEXIT;
return fg;
}
state = (int)lGetUlong(jat, JAT... | false | false | false | false | false | 0 |
update_volume_on_event (GVfsUDisks2Volume *volume)
{
if (update_volume (volume))
{
emit_changed (volume);
/* It could be that volume->dev changed (cryptotext volume morphing into a cleartext
* volume)... since this is used to associated mounts with volumes (see the loop over
* @unchanged... | false | false | false | false | false | 0 |
am_auth_mellon_user(request_rec *r)
{
am_dir_cfg_rec *dir = am_get_dir_cfg(r);
int return_code = HTTP_UNAUTHORIZED;
am_cache_entry_t *session;
/* check if we are a subrequest. if we are, then just return OK
* without any checking since these cannot be injected (heh). */
if (r->main)
r... | false | false | false | false | false | 0 |
material_get_info(material_info_t * info, const board_t * board) {
uint64 key;
entry_t * entry;
ASSERT(info!=NULL);
ASSERT(board!=NULL);
// probe
if (UseTable) {
Material->read_nb++;
key = board->material_key;
entry = &Material->table[KEY_INDEX(key)&Material->mask];
if (... | false | false | false | false | false | 0 |
contacts_clickable_grab_notify (ContactsClickable* self, gboolean was_grabbed) {
gboolean _tmp0_ = FALSE;
gboolean _tmp1_ = FALSE;
guint _tmp2_ = 0U;
gboolean _tmp4_ = FALSE;
gboolean _tmp8_ = FALSE;
gboolean _tmp9_ = FALSE;
g_return_if_fail (self != NULL);
_tmp2_ = self->priv->activate_timeout;
if (_tmp2_ != ... | false | false | false | false | false | 0 |
mca_pml_bfo_process_pending_packets(mca_bml_base_btl_t* bml_btl)
{
mca_pml_bfo_pckt_pending_t *pckt;
int32_t i, rc, s = (int32_t)opal_list_get_size(&mca_pml_bfo.pckt_pending);
for(i = 0; i < s; i++) {
mca_bml_base_btl_t *send_dst = NULL;
OPAL_THREAD_LOCK(&mca_pml_bfo.lock);
pckt = (... | false | false | false | false | false | 0 |
acpi_register_phy(acpi_handle handle, u32 lvl,
void *context, void **ret)
{
struct mii_bus *mdio = context;
struct acpi_device *adev;
struct phy_device *phy_dev;
const union acpi_object *obj;
u32 phy_addr;
if (acpi_bus_get_device(handle, &adev))
return AE_OK;
if (acpi_dev_get_property(adev, "phy-cha... | false | false | false | false | false | 0 |
dict_foreach (dict_t *dict,
int (*fn)(dict_t *this,
char *key,
data_t *value,
void *data),
void *data)
{
if (!dict) {
gf_log_callingfn ("dict", GF_LOG_WARNING,
"d... | false | false | false | false | false | 0 |
queued_cb(SMSCConn *conn)
{
SMASI *smasi = conn->data;
conn->load = (smasi ? (conn->status != SMSCCONN_DEAD ?
gwlist_len(smasi->msgs_to_send) : 0) : 0);
return conn->load;
} | false | false | false | false | false | 0 |
gluebi_write(struct mtd_info *mtd, loff_t to, size_t len,
size_t *retlen, const u_char *buf)
{
int err = 0, lnum, offs, bytes_left;
struct gluebi_device *gluebi;
gluebi = container_of(mtd, struct gluebi_device, mtd);
lnum = div_u64_rem(to, mtd->erasesize, &offs);
if (len % mtd->writesize || offs % mtd->writes... | false | false | false | false | false | 0 |
nGetEndpointInfo_KET( inp_ATOM *atom, int iat, ENDPOINT_INFO *eif )
{
int nEndpointValence;
int nMobile;
S_CHAR cChargeSubtype;
/*
static U_CHAR el_number_O, el_number_C;
if ( !el_number_O ) {
el_number_O = (U_CHAR)get_periodic_table_number( "O" );
el_number_C = (U_CHAR)get_p... | false | false | false | false | false | 0 |
gen_eh_region (enum eh_region_type type, eh_region outer)
{
eh_region new_eh;
/* Insert a new blank region as a leaf in the tree. */
new_eh = ggc_alloc_cleared_eh_region_d ();
new_eh->type = type;
new_eh->outer = outer;
if (outer)
{
new_eh->next_peer = outer->inner;
outer->inner = new_eh;
... | false | false | false | false | false | 0 |
xml_report_limit_string_value(report_handler_t* handler, const char *name, const char *value, bool exclude, lList **alpp) {
escape_string(name, (dstring*)handler->ctx);
if (exclude) {
printf(" <x%s>", sge_dstring_get_string((dstring*)handler->ctx) );
} else {
printf(" <%s>", sge_dstring_get_str... | false | false | false | false | false | 0 |
elm_genlist_item_class_unref(Elm_Genlist_Item_Class *itc)
{
if (itc && (itc->version == CLASS_ALLOCATED))
{
if (itc->refcount > 0) itc->refcount--;
if (itc->delete_me && (!itc->refcount))
elm_genlist_item_class_free(itc);
}
} | false | false | false | false | false | 0 |
num2str(int64_t value, std::string& str)
{
char buf[32];
str.erase();
if (!value)
str = "0";
else
{
int i=0;
if (value < 0)
{
str = '-';
value = -value;
}
while (value)
{
buf[i++] = static_cast<char>(value % 10) + '0';
value/= 10;
}
do {
--i;
str+= buf[i];
} while (i);
}
} | false | false | false | false | true | 1 |
s5h1420_setfec_inversion(struct s5h1420_state* state,
struct dtv_frontend_properties *p)
{
u8 inversion = 0;
u8 vit08, vit09;
dprintk("enter %s\n", __func__);
if (p->inversion == INVERSION_OFF)
inversion = state->config->invert ? 0x08 : 0;
else if (p->inversion == INVERSION_ON)
inversion = state->co... | false | false | false | false | false | 0 |
AllocPacket(unsigned dataSize, unsigned char *data, const char *file, unsigned int line)
{
// Packet *p = (Packet *)rakMalloc_Ex(sizeof(Packet), file, line);
RakNet::Packet *p;
packetAllocationPoolMutex.Lock();
p = packetAllocationPool.Allocate(file,line);
packetAllocationPoolMutex.Unlock();
p = new ((void... | false | false | false | true | false | 1 |
rtl_fw_format_ok(struct rtl8169_private *tp, struct rtl_fw *rtl_fw)
{
const struct firmware *fw = rtl_fw->fw;
struct fw_info *fw_info = (struct fw_info *)fw->data;
struct rtl_fw_phy_action *pa = &rtl_fw->phy_action;
char *version = rtl_fw->version;
bool rc = false;
if (fw->size < FW_OPCODE_SIZE)
goto out;
if... | false | false | false | false | false | 0 |
read_policy(char *filename, policydb_t * policy)
{
FILE *in_fp;
struct policy_file f;
int retval;
uint32_t buf[1];
if ((in_fp = fopen(filename, "rb")) == NULL) {
fprintf(stderr, "Can't open '%s': %s\n",
filename, strerror(errno));
exit(1);
}
policy_file_init(&f);
f.type = PF_USE_STDIO;
f.fp = in_fp;
... | false | false | false | false | true | 1 |
imap_fetch_result_to_flags(clist * fetch_result, uint32_t indx,
struct mail_flags ** result)
{
clistiter * cur;
int r;
for(cur = clist_begin(fetch_result) ; cur != NULL ;
cur = clist_next(cur)) {
struct mailimap_msg_att * msg_att;
clistiter * item_cur;
uint32_t uid;
struct mailimap_ms... | false | false | false | false | false | 0 |
e_vcard_attribute_add_param_with_values (EVCardAttribute *attr,
EVCardAttributeParam *param, ...)
{
va_list ap;
gchar *v;
g_return_if_fail (attr != NULL);
g_return_if_fail (param != NULL);
va_start (ap, param);
while ((v = va_arg (ap, gchar *))) {
e_vcard_attribute_pa... | false | false | false | false | false | 0 |
encode_attr_change(struct xdr_stream *xdr, const uint32_t *bitmap, uint64_t change)
{
__be32 *p;
if (!(bitmap[0] & FATTR4_WORD0_CHANGE))
return 0;
p = xdr_reserve_space(xdr, 8);
if (unlikely(!p))
return htonl(NFS4ERR_RESOURCE);
p = xdr_encode_hyper(p, change);
return 0;
} | false | false | false | false | false | 0 |
rand_prime(void *N, long len, prng_state *prng, int wprng)
{
int err, res, type;
unsigned char *buf;
LTC_ARGCHK(N != NULL);
/* get type */
if (len < 0) {
type = USE_BBS;
len = -len;
} else {
type = 0;
}
/* allow sizes between 2 and 512 bytes for a prime size */
... | false | false | false | false | false | 0 |
classify_array_info_for_div_kind(Alg_set *alg)
{
List *l;
IntSet intset, duplicate;
Array_def_use_table_semnode *alg_aduts = NULL, *aduts;
Block *outer_loop = alg->outer_loop_list->data;
Module_table *mpt = outer_loop->module;
construct_IntSet(intset, get_max_array_entry(mpt->array_head) + 1);
... | false | false | false | false | false | 0 |
compile_range (p_ptr, pend, translate, syntax, b)
const char **p_ptr, *pend;
char *translate;
reg_syntax_t syntax;
unsigned char *b;
{
unsigned this_char;
const char *p = *p_ptr;
int range_start, range_end;
if (p == pend)
return REG_ERANGE;
/* Even though the pattern is a signed `char... | false | false | false | false | false | 0 |
dump_code(int indent, struct bytecode* bc) {
int pc = 0;
while (pc < bc->codelen) {
printf("%*s", indent, "");
dump_operation(bc, bc->code + pc);
printf("\n");
pc += bytecode_operation_length(bc->code + pc);
}
} | 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.