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 |
|---|---|---|---|---|---|---|
connection_connect(DBusConnection *conn,
DBusMessage *msg, void *data)
{
struct network_peer *peer = data;
struct network_conn *nc;
const char *svc;
uint16_t id;
GError *err = NULL;
if (dbus_message_get_args(msg, NULL, DBUS_TYPE_STRING, &svc,
DBUS_TYPE_INVALID) == FALSE)
return NULL;
id = bnep_se... | false | false | false | false | false | 0 |
AddCoordBlockRef(GInt32 nNewBlockAddress)
{
/*-----------------------------------------------------------------
* Normally, new blocks are added to the end of the list, except
* the first one which is the beginning and the end of the list at
* the same time.
*-----------------------------------... | false | false | false | false | false | 0 |
qib_read_kreg64(const struct qib_devdata *dd,
const u32 regno)
{
if (!dd->kregbase || !(dd->flags & QIB_PRESENT))
return -1;
return readq(&dd->kregbase[regno]);
} | false | false | false | false | false | 0 |
get_search_filters( char *filename, char *filters[], char *attrs[], char *bases[], LDAPURLDesc *luds[] )
{
FILE *fp;
int filter = 0;
if ( (fp = fopen( filename, "r" )) != NULL ) {
char line[BUFSIZ];
while (( filter < MAXREQS ) && ( fgets( line, BUFSIZ, fp ))) {
char *nl;
int got_URL = 0;
if (... | false | false | false | false | false | 0 |
decompose (HepAxisAngle & rotation, Hep3Vector & boost) const {
rotation = HepAxisAngle();
boost = boostVector();
} | false | false | false | false | false | 0 |
add_forwarder_blocks (hwloop_info loop)
{
edge e;
edge_iterator ei;
FOR_EACH_EDGE (e, ei, loop->incoming)
{
if (forwarder_block_p (e->src))
{
edge e2;
edge_iterator ei2;
if (dump_file)
fprintf (dump_file,
";; Adding forwarder block %d to loop %d and retrying\n",
e->src->in... | false | false | false | false | false | 0 |
_gd_syncop_brick_op_cbk (struct rpc_req *req, struct iovec *iov,
int count, void *myframe)
{
struct syncargs *args = NULL;
gd1_mgmt_brick_op_rsp rsp = {0,};
int ret = -1;
call_frame_t *frame = NULL;
frame = myfram... | false | false | false | false | false | 0 |
_mapfile_size(void *data, off_t *presult)
{
struct _mapfile_stream *mfs = data;
if (mfs->start == NULL)
return EINVAL;
*presult = mfs->size;
return 0;
} | false | false | false | false | false | 0 |
describe_monster_exp(int r_idx, const monster_lore *l_ptr)
{
const monster_race *r_ptr = &r_info[r_idx];
bitflag f[RF_SIZE];
const char *p, *q;
long i, j;
char buf[20] = "";
/* Get the known monster flags */
monster_flags_known(r_ptr, l_ptr, f);
/* Introduction */
if (rf_has(f, RF_UNIQUE))
text_out("Kil... | false | false | false | false | false | 0 |
clear_suppress(struct dscan_state *ds, int sd)
{
int i;
struct dscan_sup *dsp_src, *dsp_dst;
if (sd == 0) {
for (i = 0; i < DSCAN_HASHSIZE; ++i) {
while (ds->hash_sup_src[i].slh_first != NULL) {
dsp_src = ds->hash_sup_src[i].slh_first;
FT_SLIST_REMOVE_HEAD(&ds->hash_sup_src[i], chain);
... | false | false | false | false | false | 0 |
I_fopen_group_file_new(const char *group, const char *file)
{
FILE *fd;
fd = G_fopen_new_misc("group", file, group);
if (!fd)
G_warning(_("Unable to create file [%s] of group [%s in %s]"),
file, group, G_mapset());
return fd;
} | false | false | false | false | false | 0 |
intel_miptree_choose_tiling(struct brw_context *brw,
mesa_format format,
uint32_t width0,
uint32_t num_samples,
enum intel_miptree_tiling_mode requested,
struct intel_mipmap_tree *... | false | false | false | false | false | 0 |
db_get_cv(pTHX_ SV *sv)
{
CV *cv;
if (SvIOK(sv)) { /* if (PERLDB_SUB_NN) { */
cv = INT2PTR(CV*,SvIVX(sv));
} else {
if (SvPOK(sv)) {
STRLEN len;
const char *const name = SvPV(sv, len);
cv = get_cvn_flags(name, len, GV_ADD | SvUTF8(sv));
} else if (SvROK(sv)) {
cv = (CV*)SvRV(sv);
} els... | false | false | false | false | false | 0 |
cx24117_get_priv(struct cx24117_priv **priv,
struct i2c_adapter *i2c, u8 client_address)
{
int ret;
mutex_lock(&cx24117_list_mutex);
ret = hybrid_tuner_request_state(struct cx24117_priv, (*priv),
hybrid_tuner_instance_list, i2c, client_address, "cx24117");
mutex_unlock(&cx24117_list_mutex);
return ret;
} | false | false | false | false | false | 0 |
license_job_copy(List license_list_src)
{
licenses_t *license_entry_src, *license_entry_dest;
ListIterator iter;
List license_list_dest = NULL;
if (!license_list_src)
return license_list_dest;
license_list_dest = list_create(license_free_rec);
iter = list_iterator_create(license_list_src);
while ((license_en... | false | false | false | false | false | 0 |
gt_add_ids_stream_new(GtNodeStream *in_stream)
{
GtAddIDsStream *add_ids_stream;
GtNodeStream *ns;
gt_assert(in_stream);
ns = gt_node_stream_create(gt_add_ids_stream_class(), false);
add_ids_stream = gt_add_ids_stream_cast(ns);
add_ids_stream->in_stream = gt_node_stream_ref(in_stream);
add_ids_stream->add... | false | false | false | false | false | 0 |
Leftof2(
Obj tree1,
Int index1,
Obj tree2,
Int index2 )
{
if ( DT_GEN(tree2, index2) < DT_GEN(tree1, DT_RIGHT(tree1, index1) ) )
return 0;
else if (Equal(tree1, DT_RIGHT(tree1, index1), tree2, index2 ) )
return ... | false | false | false | false | false | 0 |
ex_breaklist(eap)
exarg_T *eap;
{
struct debuggy *bp;
int i;
if (dbg_breakp.ga_len == 0)
MSG(_("No breakpoints defined"));
else
for (i = 0; i < dbg_breakp.ga_len; ++i)
{
bp = &BREAKP(i);
smsg((char_u *)_("%3d %s %s line %ld"),
bp->dbg_nr,
bp->dbg_type == DBG_FUNC ? "func... | false | false | false | false | false | 0 |
plimageslow(short *x, short *y, unsigned short *data, PLINT nx, PLINT ny,
PLFLT xmin, PLFLT ymin, PLFLT dx, PLFLT dy,
unsigned short zmin, unsigned short zmax)
{
PLINT ix, iy, i;
PLFLT xf[4], yf[4];
short xs[5], ys[5];
int corners[4];
unsigned short col;
for (ix = 0; ix < nx ; ix++) {
for (iy... | false | false | false | false | false | 0 |
hfs_mac2asc(struct super_block *sb, char *out, const struct hfs_name *in)
{
struct nls_table *nls_disk = HFS_SB(sb)->nls_disk;
struct nls_table *nls_io = HFS_SB(sb)->nls_io;
const char *src;
char *dst;
int srclen, dstlen, size;
src = in->name;
srclen = in->len;
if (srclen > HFS_NAMELEN)
srclen = HFS_NAMELEN;... | false | false | false | false | false | 0 |
visitValueForward(ValueForward* f)
{
if (f->abstract()) printf("abstract ");
printf("valuetype %s", f->identifier());
} | false | false | false | false | false | 0 |
updateTab( int index )
{
QString title = m_automaticResizeTabs ? m_tabNames[ index ] : m_parent->QTabWidget::tabText( index );
m_parent->setTabToolTip( index, QString() );
if ( title.length() > m_currentTabLength ) {
QString toolTipText = title;
// Remove '&'s, which are indicators for keyboard shortcuts... | false | false | false | false | false | 0 |
yajl_gen_string(yajl_gen g, const unsigned char * str,
unsigned int len)
{
ENSURE_VALID_STATE; INSERT_SEP; INSERT_WHITESPACE;
g->print(g->ctx, "\"", 1);
yajl_string_encode2(g->print, g->ctx, str, len);
g->print(g->ctx, "\"", 1);
APPENDED_ATOM;
FINAL_NEWLINE;
return yajl_gen_s... | false | false | false | false | false | 0 |
ToDisplayString(double numberToConvert,
int digitsAfterDecimalPoint /* = -1 */)
{
wxString decSep = wxString(GetDecimalSeparator());
wxString result;
if (digitsAfterDecimalPoint == -1)
{
result.Printf(wxT("%f"), numberToConvert);
// Not all libcs respe... | false | false | false | false | false | 0 |
spi_hyperlink_append_reference (DBusMessageIter * iter, AtkHyperlink * obj)
{
DBusMessageIter iter_struct;
const gchar *name;
gchar *path;
if (!obj) {
spi_object_append_null_reference (iter);
return;
}
spi_object_lease_if_needed (G_OBJECT (obj));
name = dbus_bus_get_unique_name (spi_global_app_... | false | false | false | false | false | 0 |
writeMetadata()
{
#ifdef DEBUG
EXV_DEBUG << "Exiv2::EpsImage::writeMetadata: Writing EPS file " << io_->path() << "\n";
#endif
// encode XMP metadata if necessary
if (!writeXmpFromPacket() && XmpParser::encode(xmpPacket_, xmpData_) > 1) {
#ifndef SUPPRESS_WARNING... | false | false | false | false | false | 0 |
set_backend_db_type(enum gfarm_backend_db_type set)
{
if (gfarm_backend_db_type == set)
return (GFARM_ERR_NO_ERROR);
switch (gfarm_backend_db_type) {
case GFARM_BACKEND_DB_TYPE_UNKNOWN:
gfarm_backend_db_type = set;
return (GFARM_ERR_NO_ERROR);
case GFARM_BACKEND_DB_TYPE_LDAP:
return (GFARM_ERRMSG_BACKEND_AL... | false | false | false | false | false | 0 |
netsnmp_table_build_oid(netsnmp_handler_registration *reginfo,
netsnmp_request_info *reqinfo,
netsnmp_table_request_info *table_info)
{
oid tmpoid[MAX_OID_LEN];
netsnmp_variable_list *var;
if (!reginfo || !reqinfo || !table_info)
return SN... | false | false | false | false | false | 0 |
cp_parser_implicitly_scoped_statement (cp_parser* parser)
{
tree statement;
/* If the token is not a `{', then we must take special action. */
if (cp_lexer_next_token_is_not (parser->lexer, CPP_OPEN_BRACE))
{
/* Create a compound-statement. */
statement = begin_compound_stmt (/*has_no_scope=*/f... | false | false | false | false | false | 0 |
main(int argc, char **argv)
{
CONDITION
cond;
IDB_HANDLE
* handle;
IDB_Query
recs;
long
i,
count;
char *dbname = "INSTRUMENT_IDB";
char *patientID = "";
char *studyInstanceUID = "";
char *accessionNumber = "";
LST_HEAD *imageList = NULL;
LST_HEAD *cloneList = N... | false | false | false | false | false | 0 |
loader_read_childs_output(void)
{
struct list_head * node_ptr;
struct loader_child * child_ptr;
list_for_each (node_ptr, &g_childs_list)
{
child_ptr = list_entry(node_ptr, struct loader_child, siblings);
if (!child_ptr->dead && !child_ptr->terminal)
{
loader_read_child_output(
child_... | false | false | false | false | false | 0 |
R2Contains(const R2Box& box, const R2Circle& circle)
{
// Return whether box contains circle
if (box.IsEmpty()) return FALSE;
if (circle.IsEmpty()) return TRUE;
if (RNIsLess(circle.Center().X() - circle.Radius(), box.XMin())) return FALSE;
if (RNIsLess(circle.Center().Y() - circle.Radius(), box.YMi... | false | false | false | false | false | 0 |
cli_cmd_volume_status_parse (const char **words, int wordcount,
dict_t **options)
{
dict_t *dict = NULL;
int ret = -1;
GF_ASSERT (words);
GF_ASSERT (options);
dict = dict_new ();
if (!dict)
goto ... | true | true | false | true | false | 1 |
constructed (GObject *object)
{
void (*chain_up) (GObject *) =
((GObjectClass *) example_call_channel_parent_class)->constructed;
ExampleCallChannel *self = EXAMPLE_CALL_CHANNEL (object);
TpBaseChannel *base = (TpBaseChannel *) self;
TpBaseCallChannel *call = (TpBaseCallChannel *) self;
if (chain_up !=... | false | false | false | false | false | 0 |
GetJobDescription(const Job& job, std::string& desc_str) const {
MCCConfig cfg;
usercfg.ApplyToConfig(cfg);
AREXClient ac(job.JobManagementURL, cfg, usercfg.Timeout(), false);
if (ac.getdesc(job.IDFromEndpoint, desc_str)) {
std::list<JobDescription> descs;
if (JobDescription::Parse(desc_str,... | false | false | false | false | false | 0 |
gf_dash_load_representation_sidx(GF_DASH_Group *group, GF_MPD_Representation *rep, const char *cache_name, Bool seperate_index, Bool needs_mov_range)
{
GF_Err e;
GF_BitStream *bs;
FILE *f=NULL;
if (!strncmp(cache_name, "gmem://", 7)) {
u32 size;
u8 *mem_address;
if (sscanf(cache_name, "gmem://%d@%p", ... | false | false | false | false | false | 0 |
_matewnck_get_pixmap (Window xwindow,
Atom atom,
Pixmap *val)
{
Atom type;
int format;
gulong nitems;
gulong bytes_after;
Window *w;
int err, result;
*val = 0;
_matewnck_error_trap_push ();
type = None;
result = XGetWindowProperty (_matewnck_get_default_di... | false | false | false | false | false | 0 |
InitializeEssential(int _length,
MET_ValueEnumType _elementType,
int _elementNumberOfChannels,
void * _elementData,
bool _allocateElementData,
bool _autoFreeElementData)
{
if(META_DEBUG)
{
METAIO_STREAM::cout... | false | false | false | false | false | 0 |
set(gint64 v)
{
gint64 i64;
get(i64);
int diff = (i64 ^ v) &0xfff;
Integer::set(v);
if (m_pCpu)
{
if (diff & MCLRE)
(v & MCLRE) ? m_pCpu->assignMCLRPin(4) : m_pCpu->unassignMCLRPin();
}
} | false | false | false | false | false | 0 |
handleEvent(XEvent &event) {
if (event.type == ConfigureNotify && event.xconfigure.window != window()) {
moveResize(event.xconfigure.x, event.xconfigure.y,
event.xconfigure.width, event.xconfigure.height);
} else if (event.type == DestroyNotify)
delete this;
} | false | false | false | false | false | 0 |
bus_owner_unref (BusOwner *owner)
{
_dbus_assert (owner->refcount > 0);
owner->refcount -= 1;
if (owner->refcount == 0)
{
bus_connection_remove_owned_service (owner->conn, owner->service);
_dbus_mem_pool_dealloc (owner->service->registry->owner_pool, owner);
}
} | false | false | false | false | false | 0 |
AdvertiseNextProtoCallback_(SSL *s,
const unsigned char **data,
unsigned int *len,
void *arg) {
Connection *p = static_cast<Connection*>(SSL_get_app_data(s));
if (p->npnProtos_.IsEmp... | false | false | false | false | false | 0 |
wpt_name(const char* args, const char** unused)
{
char* s;
if (!args) {
return;
}
wpt_tmp->description = xstrappend(wpt_tmp->description,args);
s = xstrrstr(wpt_tmp->description, " by ");
if (s) {
waypt_alloc_gc_data(wpt_tmp)->placer = xstrdup(s + 4);
if (nuke_placer) {
*s = '\0';
}
... | false | false | false | false | false | 0 |
glusterd_volume_defrag_restart (glusterd_volinfo_t *volinfo, char *op_errstr,
size_t len, int cmd, defrag_cbk_fn_t cbk)
{
glusterd_conf_t *priv = NULL;
char pidfile[PATH_MAX];
int ret ... | true | true | false | false | false | 1 |
setDefaultSize()
{
if (sizeRefd)
image->derefSize(size);
size = image->size();
sizeRefd = false;
} | false | false | false | false | false | 0 |
brcms_set_basic_rate(struct brcm_rateset *rs, u16 rate, bool is_br)
{
u32 i;
for (i = 0; i < rs->count; i++) {
if (rate != (rs->rates[i] & 0x7f))
continue;
if (is_br)
rs->rates[i] |= BRCMS_RATE_FLAG;
else
rs->rates[i] &= BRCMS_RATE_MASK;
return;
}
} | false | false | false | false | false | 0 |
stmts_from_loop (struct loop *loop, VEC (gimple, heap) **stmts)
{
unsigned int i;
basic_block *bbs = get_loop_body_in_dom_order (loop);
for (i = 0; i < loop->num_nodes; i++)
{
basic_block bb = bbs[i];
gimple_stmt_iterator bsi;
gimple stmt;
for (bsi = gsi_start_phis (bb); !gsi_end_p (... | false | false | false | false | false | 0 |
gcr_parser_format_supported (GcrParser *self,
GcrDataFormat format)
{
g_return_val_if_fail (GCR_IS_PARSER (self), FALSE);
g_return_val_if_fail (format != GCR_FORMAT_ALL, FALSE);
g_return_val_if_fail (format != GCR_FORMAT_INVALID, FALSE);
return parser_format_lookup (format) ? TRUE : FAL... | false | false | false | false | false | 0 |
ck_ht_map_bound_get(struct ck_ht_map *m, struct ck_ht_hash h)
{
CK_HT_TYPE offset = h.value & m->mask;
CK_HT_TYPE r = CK_HT_WORD_MAX;
if (m->probe_bound != NULL) {
r = CK_HT_LOAD(&m->probe_bound[offset]);
if (r == CK_HT_WORD_MAX)
r = CK_HT_TYPE_LOAD(&m->probe_maximum);
} else {
r = CK_HT_TYPE_LOAD(&m->pro... | false | false | false | false | false | 0 |
calc_constr_energy_v(v_id)
vertex_id v_id;
{
REAL e;
int j;
conmap_t *conmap = get_v_constraint_map(v_id);
struct constraint *constr;
int_val = ordinal(get_original(v_id))+1; /* for eval of file parameters */
for ( j = 1 ; j <= (int)conmap[0] ; j++ )
{ constr = get_constraint(conmap[j]);
if ( !(co... | false | false | false | false | true | 1 |
parse_font_face_start_font_face_cb (CRDocHandler * a_this,
CRParsingLocation *a_location)
{
CRStatement *stmt = NULL;
enum CRStatus status = CR_OK;
stmt = cr_statement_new_at_font_face_rule (NULL, NULL);
g_return_if_fail (stmt);
status = cr_d... | false | false | false | false | false | 0 |
afr_create_unwind (call_frame_t *frame, xlator_t *this)
{
call_frame_t *main_frame = NULL;
afr_local_t *local = NULL;
struct iatt *unwind_buf = NULL;
local = frame->local;
LOCK (&frame->lock);
{
if (local->transaction.main_frame) {
... | false | false | false | false | false | 0 |
st_theme_node_dispose (GObject *gobject)
{
StThemeNode *node = ST_THEME_NODE (gobject);
if (node->parent_node)
{
g_object_unref (node->parent_node);
node->parent_node = NULL;
}
if (node->border_image)
{
g_object_unref (node->border_image);
node->border_image = NULL;
}
... | false | false | false | false | false | 0 |
mem_frob(void *data, int len)
{
/* correct for Intel only! little endian */
unsigned char b[4] = { 0xef, 0xbe, 0xad, 0xde };
int i;
char *cdata = data;
for (i = 0; i < len; i++)
{
*cdata = b[i % 4];
cdata++;
}
} | true | true | false | false | false | 1 |
ahd_set_active_fifo(struct ahd_softc *ahd)
{
u_int active_fifo;
AHD_ASSERT_MODES(ahd, AHD_MODE_SCSI_MSK, AHD_MODE_SCSI_MSK);
active_fifo = ahd_inb(ahd, DFFSTAT) & CURRFIFO;
switch (active_fifo) {
case 0:
case 1:
ahd_set_modes(ahd, active_fifo, active_fifo);
return (1);
default:
return (0);
}
} | false | false | false | false | false | 0 |
isPreviousPositionEscapeChar(const ImportationJob &job)
{
if (!IN_RANGE_STRICT_MAX(_currentPos-1, 0, _currentContent.size()))
return false;
return (_currentContent.at(_currentPos-1)==job.textEscapingChar);
} | false | false | false | false | false | 0 |
onCaptureLost(WindowEventArgs& e)
{
// default handling
PushButton::onCaptureLost(e);
d_beingDragged = false;
// trigger tracking ended event
WindowEventArgs args(this);
onThumbTrackEnded(args);
// send notification whenever thumb is released
onThumbPositionChanged(args);
} | false | false | false | false | false | 0 |
backend_db_insert(
BackendDB *be,
int idx
)
{
/* If idx < 0, just add to end of list */
if ( idx < 0 ) {
LDAP_STAILQ_INSERT_TAIL(&backendDB, be, be_next);
} else if ( idx == 0 ) {
LDAP_STAILQ_INSERT_HEAD(&backendDB, be, be_next);
} else {
int i;
BackendDB *b2;
b2 = LDAP_STAILQ_FIRST(&backendDB);
idx-... | false | false | false | false | false | 0 |
gth_toggle_menu_tool_button_set_menu (GthToggleMenuToolButton *button,
GtkWidget *menu)
{
g_return_if_fail (GTH_IS_TOGGLE_MENU_TOOL_BUTTON (button));
g_return_if_fail (GTK_IS_MENU (menu) || menu == NULL);
if (button->priv->menu != GTK_MENU (menu)) {
if ((button->priv->menu != NULL) && gtk_... | false | false | false | false | false | 0 |
mono_walk_stack_with_ctx (MonoJitStackWalk func, MonoContext *start_ctx, MonoUnwindOptions unwind_options, void *user_data)
{
MonoContext extra_ctx;
MonoThreadInfo *thread = mono_thread_info_current_unchecked ();
MONO_ARCH_CONTEXT_DEF
if (!thread || !thread->jit_data)
return;
if (!start_ctx) {
mono_arch_flus... | false | false | false | false | false | 0 |
barracks_scroll_callsign_down()
{
if (Selected_line < Num_pilots - 1) {
Selected_line++;
gamesnd_play_iface(SND_SCROLL);
} else {
gamesnd_play_iface(SND_GENERAL_FAIL);
}
// num_pilots_to_fill_height is the number of pilots that can fit in given height
int num_pilots_to_fill_height = Barracks_list_coords[gr... | false | false | false | false | false | 0 |
plugin_init (GstPlugin * plugin)
{
if (!gst_element_register (plugin, "breakmydata", GST_RANK_NONE,
gst_break_my_data_get_type ())
|| !gst_element_register (plugin, "capssetter", GST_RANK_NONE,
gst_caps_setter_get_type ())
|| !gst_element_register (plugin, "rndbuffersize", GST_RANK_NON... | false | false | false | false | false | 0 |
ip_registry_check_remote(struct Client* cptr, int is_burst)
{
struct IPRegistryEntry* entry;
/*
* Mark that we did add/update an IPregistry entry
*/
SetIPChecked(cptr);
if (!irc_in_addr_valid(&cli_ip(cptr))) {
Debug((DEBUG_DNS, "IPcheck accepting remote connection from invalid %s.", ircd_ntoa(&cli_ip... | false | false | false | false | false | 0 |
gst_video_box_src_event (GstBaseTransform * trans, GstEvent * event)
{
GstVideoBox *video_box = GST_VIDEO_BOX (trans);
GstStructure *new_structure;
const GstStructure *structure;
const gchar *event_name;
gdouble pointer_x;
gdouble pointer_y;
GST_OBJECT_LOCK (video_box);
if (GST_EVENT_TYPE (event) == GS... | false | false | false | false | false | 0 |
warning_builder( struct sip_msg *msg, unsigned int *returned_len)
{
static char buf[MAX_WARNING_LEN];
str *foo;
int print_len, l, clen;
char* t;
#define str_print(string, string_len) \
do{ \
l=(string_len); \
if ((clen+l)>MAX_WARNING_LEN) \
goto error_overflow; \
memcpy(buf+clen, (string), l); \
... | false | false | false | false | false | 0 |
main(int argc, char **argv)
{ struct soap soap;
ns__polytestResponse r;
soap_init(&soap);
if (argc <= 1)
soap_serve(&soap); // if no args, act as a CGI Web service
else
{ switch (*argv[1])
{ case 'o':
{ ns__Object o("SOAP");
cout << "Sending: ";
o.print();
soap_call_ns__polytest... | false | false | false | false | false | 0 |
inf_adopted_algorithm_update_local_user_times(InfAdoptedAlgorithm* algorithm)
{
/* TODO: I don't think we even need this because we could treat local
* users implicitely as in-sync with priv->current. It would make some loops
* a bit more complex, perhaps.
*
* Alternative: Let the local users just point t... | false | false | false | false | false | 0 |
showConnectors(const QStringList & connectorIDs) {
foreach (ConnectorItem * connectorItem, cachedConnectorItems()) {
if (connectorIDs.contains(connectorItem->connectorSharedID())) {
connectorItem->setVisible(true);
}
}
} | false | false | false | false | false | 0 |
fs_emu_update_video_stats_1() {
int t = fs_emu_monotonic_time();
if (g_frame_time_first == 0) {
return;
}
int time_ms = (t - g_frame_time_first) / 1000;
int dt = (int) (time_ms - g_frame_time_last);
// more than 5 seconds => do not record entry (abnormality)
fs_emu_stat_queue_add_en... | false | false | false | false | false | 0 |
giraffe_linedata_accepted(const GiLineData* self)
{
cxsize count = 0;
cx_assert(self != NULL);
count = self->nfibers * self->nlines;
return count - giraffe_linedata_rejected(self);
} | false | false | false | true | false | 1 |
gee_sorted_map_empty (GType k_type, GBoxedCopyFunc k_dup_func, GDestroyNotify k_destroy_func, GType v_type, GBoxedCopyFunc v_dup_func, GDestroyNotify v_destroy_func) {
GeeMap* result = NULL;
GeeTreeMap* _tmp0_ = NULL;
GeeTreeMap* _tmp1_ = NULL;
GeeBidirSortedMap* _tmp2_ = NULL;
GeeBidirSortedMap* _tmp3_ = NULL;
G... | false | false | false | false | false | 0 |
changeTextColor() {
QColor color(m_color);
QColor newColor = QColorDialog::getColor(color, NULL, tr("Select text color"));
if (!newColor.isValid()) return;
if (newColor.name().compare(m_color, Qt::CaseInsensitive) == 0) return;
InfoGraphicsView * infoGraphicsView = InfoGraphicsView::getInfoGraphics... | false | false | false | false | false | 0 |
hash_number(cvs_number *n)
/* look up the node associated with a specifued CVS release number */
{
cvs_number key = *n;
Node *p;
int hash;
int i;
if (key.c > 2 && !key.n[key.c - 2]) {
key.n[key.c - 2] = key.n[key.c - 1];
key.c--;
}
if (key.c & 1)
key.n[key.c] = 0;
for (i = 0, hash = 0; i < key.c - 1; i++... | false | false | false | false | false | 0 |
buildCFindRSP(T_DIMSE_C_FindRSP * e, DcmDataset * obj)
{
OFCondition cond = buildCommonRSP(obj, DIMSE_C_FIND_RSP,
e->MessageIDBeingRespondedTo,
e->DataSetType, e->DimseStatus); RET(cond);
/* build optional items */
if (e->opts & O_FIND_AFFECTEDSOPCLASSUID) {
cond = addString(obj, DCM_Affec... | false | false | false | false | false | 0 |
entry_free( Bqueue *bq )
{
Bqueue *tmp;
if( bcache.count < CACHE_MAX )
{
pthread_mutex_lock( &bcache.lock );
if( bcache.count >= CACHE_MAX )
{
pthread_mutex_unlock( &bcache.lock );
free( bq );
return;
}
tmp = bcache.list;
bcache.list = bq;
bq->next = tmp;
bcache.count++;
pthread_mutex_unl... | false | false | false | false | false | 0 |
cms_content_bio(CMS_ContentInfo *cms)
{
ASN1_OCTET_STRING **pos = CMS_get0_content(cms);
if (!pos)
return NULL;
/* If content detached data goes nowhere: create NULL BIO */
if (!*pos)
return BIO_new(BIO_s_null());
/* If content not detached and created return memory BIO
*/
if (!*pos || ((*pos)->flags == AS... | false | false | false | false | false | 0 |
paperSize() const
{
return usesCustomPaperSize()?customPaperSize()
:Types::paperSize(paperFormat(), paperOrientation(), m_unitOfLength);
} | false | false | false | false | false | 0 |
pp_cxx_function_specifier (cxx_pretty_printer *pp, tree t)
{
switch (TREE_CODE (t))
{
case FUNCTION_DECL:
if (DECL_VIRTUAL_P (t))
pp_cxx_ws_string (pp, "virtual");
else if (DECL_CONSTRUCTOR_P (t) && DECL_NONCONVERTING_P (t))
pp_cxx_ws_string (pp, "explicit");
else
pp_c_function_specifier ... | false | false | false | false | false | 0 |
_gcry_mpi_getbyte( gcry_mpi_t a, unsigned idx )
{
int i, j;
unsigned n;
mpi_ptr_t ap;
mpi_limb_t limb;
ap = a->d;
for(n=0,i=0; i < a->nlimbs; i++ ) {
limb = ap[i];
for( j=0; j < BYTES_PER_MPI_LIMB; j++, n++ )
if( n == idx )
return (limb >> j*8) & 0xff;
}
return -1;
} | false | false | false | false | false | 0 |
add_value (MatchState *ms, luaL_Buffer *b, const char *s,
const char *e) {
lua_State *L = ms->L;
switch (lua_type(L, 3)) {
case LUA_TNUMBER:
case LUA_TSTRING: {
add_s(ms, b, s, e);
return;
}
case LUA_TFUNCTION: {
int n;
l... | false | false | false | false | false | 0 |
findAutoDeletableObjects(const ObjectAddress *object,
ObjectAddresses *oktodelete,
Relation depRel, bool addself)
{
ScanKeyData key[3];
int nkeys;
SysScanDesc scan;
HeapTuple tup;
ObjectAddress otherObject;
/*
* If this object is already in oktodelete, then we already visited it;
* don't do s... | false | false | false | false | false | 0 |
ParsePIN(const Data &data, uint32_t &pin)
{
// validate response data
const unsigned char *pd = data.GetData();
if( !CheckSize(data, 0x14) )
return false;
// capture the PIN
memcpy(&pin, &pd[16], sizeof(pin));
pin = btohl(pin);
return true;
} | false | false | false | false | false | 0 |
intel_iommu_memory_notifier(struct notifier_block *nb,
unsigned long val, void *v)
{
struct memory_notify *mhp = v;
unsigned long long start, end;
unsigned long start_vpfn, last_vpfn;
switch (val) {
case MEM_GOING_ONLINE:
start = mhp->start_pfn << PAGE_SHIFT;
end = ((mhp->start_pfn + mhp->nr_pages)... | false | false | false | false | false | 0 |
parse_htpl_net_get(stack, untag)
int untag;
STR stack; {
TOKEN token;
static done = 0;
STR buff;
int code;
static int nesting = 0;
static int refcount = 0;
refcount++;
makepersist(stack);
if (numtokens < 2) RETURN(croak("%sNET GET called with %d arguments, minimum needed is... | false | false | false | false | false | 0 |
ResetPixelList(PixelList *pixel_list)
{
int
level;
register ListNode
*root;
register SkipList
*list;
register ssize_t
channel;
/*
Reset the skip-list.
*/
for (channel=0; channel < 5; channel++)
{
list=pixel_list->lists+channel;
root=list->nodes+65536UL;
list->level=0;... | false | false | false | false | false | 0 |
isStdVectorOrString()
{
// THIS ARRAY MUST BE ORDERED ALPHABETICALLY
static const char* const stl_vector[] = {
"array", "vector"
};
// THIS ARRAY MUST BE ORDERED ALPHABETICALLY
static const char* const stl_string[] = {
"string", "u16string", "u32string", "wstring"
};
if (var... | false | false | false | false | false | 0 |
_read_jobacct_id(int fd, jobacct_id_t *jobacct_id,
uint16_t rpc_version)
{
safe_read(fd, &jobacct_id->nodeid, sizeof(uint32_t));
safe_read(fd, &jobacct_id->taskid, sizeof(uint16_t));
return SLURM_SUCCESS;
rwfail:
return SLURM_ERROR;
} | false | false | false | false | false | 0 |
ProcessMaterials(const IFC::IfcRepresentationItem& item, ConversionData& conv)
{
if (conv.materials.empty()) {
aiString name;
std::auto_ptr<aiMaterial> mat(new aiMaterial());
name.Set("<IFCDefault>");
mat->AddProperty(&name,AI_MATKEY_NAME);
const aiColor4D col = aiColor4D(0.6f,0.6f,0.6f,1.0f);
mat->AddPr... | false | false | false | false | false | 0 |
ures_cleanup(void)
{
if (cache != NULL) {
ures_flushCache();
if (cache != NULL && uhash_count(cache) == 0) {
uhash_close(cache);
cache = NULL;
}
}
if (cache == NULL && resbMutex != NULL) {
umtx_destroy(&resbMutex);
}
return (cache == NULL);
} | false | false | false | false | false | 0 |
e_dbus_properties_get(E_DBus_Connection *conn, const char *destination, const char *path, const char *interface, const char *property, E_DBus_Method_Return_Cb cb_return, const void *data)
{
DBusMessage *msg;
DBusPendingCall *ret;
EINA_SAFETY_ON_NULL_RETURN_VAL(conn, NULL);
msg = _dbus_message_property_method_c... | false | false | false | false | false | 0 |
slotResult( KJob * job )
{
if ( job->error() ) {
emit q->error();
job->uiDelegate()->showErrorMessage();
}
else
{
// Update the desktop file which is used for mount/unmount (icon change)
kDebug(7015) << "unmount finished : updating " << m_desktopFile;
KUrl dfURL;
... | false | false | false | false | false | 0 |
Load_Read(HITS_DB *db, int i, char *read, int ascii)
{ FILE *bases = (FILE *) db->bases;
int64 off;
int len, clen;
HITS_READ *r = db->reads;
if (bases == NULL)
{ db->bases = (void *) (bases = Fopen(Catenate(db->path,"","",".bps"),"r"));
if (bases == NULL)
exit (1);
}
i... | false | false | false | false | true | 1 |
output_constant_def_contents (rtx symbol)
{
tree decl = SYMBOL_REF_DECL (symbol);
tree exp = DECL_INITIAL (decl);
unsigned int align;
/* Make sure any other constants whose addresses appear in EXP
are assigned label numbers. */
output_addressed_constants (exp);
/* We are no longer deferring this con... | false | false | false | false | false | 0 |
__add_dbregid(lvh, freg, dbregid, opcode, lsn, dbtype, meta_pgno, addp)
DB_LOG_VRFY_INFO *lvh;
VRFY_FILEREG_INFO *freg;
int32_t dbregid;
u_int32_t opcode;
DB_LSN lsn;
DBTYPE dbtype;
db_pgno_t meta_pgno;
int *addp;
{
int inarray, ret, tret;
u_int32_t i, j;
VRFY_FILELIFE flife;
inarray = ret = tret = 0;
for... | false | false | false | false | false | 0 |
streamer_read_string (struct data_in *data_in, struct lto_input_block *ib)
{
unsigned int len;
const char *ptr;
ptr = streamer_read_indexed_string (data_in, ib, &len);
if (!ptr)
return NULL;
if (ptr[len - 1] != '\0')
internal_error ("bytecode stream: found non-null terminated string");
return ptr;... | false | false | false | false | false | 0 |
rb_hash_update_block_i(key, value, hash)
VALUE key, value;
VALUE hash;
{
if (key == Qundef) return ST_CONTINUE;
if (rb_hash_has_key(hash, key)) {
value = rb_yield_values(3, key, rb_hash_aref(hash, key), value);
}
rb_hash_aset(hash, key, value);
return ST_CONTINUE;
} | false | false | false | false | false | 0 |
print_ts(char *buf, size_t n, const time_t *t)
{
size_t res;
res = print_ts_rev(buf + 1, n - 1, t);
if(res) {
buf[0] = '\0';
strreverse_l(buf, buf + res);
}
return res;
} | false | false | false | false | false | 0 |
nominal_output_voltage_fun(double value)
{
static long nominal = -1;
if (nominal < 0) {
nominal = value;
}
switch ((long)nominal)
{
/* LV models */
case 100:
case 110:
case 120:
case 127:
switch ((long)value)
{
case 100:
case 110:
case 120:
case 127:
break;
default:
return NULL;
}
... | false | false | false | false | false | 0 |
DamageTaken(Unit* dealer, uint32& damage)
{
if (m_InvinceabilityHpLevel > 0 && m_creature->GetHealth() < m_InvinceabilityHpLevel + damage)
{
if (m_creature->GetHealth() <= m_InvinceabilityHpLevel)
{ damage = 0; }
else
{ damage = m_creature->GetHealth() - m_InvinceabilityH... | false | false | false | false | false | 0 |
rv6xx_program_stepping_parameters_except_lowest_entry(struct radeon_device *rdev)
{
struct rv6xx_power_info *pi = rv6xx_get_pi(rdev);
rv6xx_program_mclk_stepping_parameters_except_lowest_entry(rdev);
if (pi->voltage_control)
rv6xx_program_voltage_stepping_parameters_except_lowest_entry(rdev);
rv6xx_program_backb... | 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.