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 |
|---|---|---|---|---|---|---|
vmw_execbuf_submit_cmdbuf(struct vmw_private *dev_priv,
struct vmw_cmdbuf_header *header,
u32 command_size,
struct vmw_sw_context *sw_context)
{
u32 id = ((sw_context->dx_ctx_node) ? sw_context->dx_ctx_node->res->id :
SVGA3D_INVALID_ID);
void *cmd = vmw_cmdbuf_reserve(dev_priv->cman, co... | false | false | false | false | false | 0 |
printleader(tcp)
struct tcb *tcp;
{
if (tcp_last) {
if (tcp_last->ptrace_errno) {
if (tcp_last->flags & TCB_INSYSCALL) {
tprintf(" <unavailable>)");
tabto(acolumn);
}
tprintf("= ? <unavailable>\n");
tcp_last->ptrace_errno = 0;
} else if (!outfname || followfork < 2 || tcp_last == tcp) {
tcp_... | false | false | false | false | false | 0 |
clar_test_init(int argc, char **argv)
{
clar_print_init(
(int)_clar_callback_count,
(int)_clar_suite_count,
""
);
if (clar_sandbox() < 0) {
clar_print_onabort("Failed to sandbox the test runner.\n");
exit(-1);
}
_clar.argc = argc;
_clar.argv = argv;
} | false | false | false | false | false | 0 |
last_boss_cross_draw(tenm_object *my, int priority)
{
tenm_color color;
int status = 0;
/* sanity check */
if (my == NULL)
return 0;
if (priority != 0)
return 0;
color = tenm_map_color(99, 143, 158);
if (my->count[1] <= 0)
return 1;
if (tenm_draw_line(((int) (my->x)) - my->count[1], ... | false | false | false | false | false | 0 |
tasks_connection_option(task_queue q, const char *option, Var * value)
{
CONNECTION_OPTION_GET(TASK_CO_TABLE, (tqueue *)q.ptr, option, value);
} | false | false | false | false | false | 0 |
get_variable_attr(CHAR16 *var, UINT8 **data, UINTN *len, EFI_GUID owner,
UINT32 *attributes)
{
EFI_STATUS efi_status;
*len = 0;
efi_status = uefi_call_wrapper(RT->GetVariable, 5, var, &owner,
NULL, len, NULL);
if (efi_status != EFI_BUFFER_TOO_SMALL)
return efi_status;
*data = AllocateZeroPool(*... | false | false | false | false | false | 0 |
__lambda69_ (Block6Data* _data6_) {
BuildToolsPreferences* self;
gint build_tool_num = 0;
GtkTreeView* _tmp0_ = NULL;
gint _tmp1_ = 0;
gint _tmp2_ = 0;
self = _data6_->self;
_tmp0_ = _data6_->view;
_tmp1_ = utils_get_selected_row (_tmp0_, NULL);
build_tool_num = _tmp1_;
_tmp2_ = build_tool_num;
if (0 <= _tmp... | false | false | false | false | false | 0 |
Lgentemp()
{
# line 543 "symbol.d"
int i, j;
int narg;
register object *DPPbase=vs_base;
#define prefix DPPbase[0+0]
#define pack DPPbase[0+1]
#define smbl DPPbase[0+2+2*0+0]
narg = vs_top - vs_base;
if (narg < 0)
too_few_arguments();
if (narg <= 0 + 0) {
vs_push(gentemp_prefix);
narg++;
}
if (narg <= 0... | false | false | false | false | true | 1 |
h( int k, Twofish_Byte L[], int kCycles )
{
switch( kCycles ) {
/* We code all 3 cases separately for speed reasons. */
case 2:
return H02(k,L) ^ H12(k,L) ^ H22(k,L) ^ H32(k,L);
case 3:
return H03(k,L) ^ H13(k,L) ^ H23(k,L) ^ H33(k,L);
case 4:
return H04(k,L)... | false | false | false | false | false | 0 |
mayInstNodeLoadOrStore(const TreePatternNode *N,
const CodeGenDAGPatterns &CGP) {
Record *Op = N->getOperator();
const CodeGenTarget &CGT = CGP.getTargetInfo();
CodeGenInstruction &II = CGT.getInstruction(Op);
return II.mayLoad || II.mayStore;
} | false | false | false | false | false | 0 |
print_listed_objects (const char *s,
const DATASET *dset,
PRN *prn)
{
const gretl_matrix *m;
const int *list;
const char *p;
gretl_bundle *b;
char *name;
int err = 0;
while ((name = gretl_word_strdup(s, &s, OPT_NONE, &err)) != NULL) {
if (gretl_is_scalar(name)) {
print_s... | false | false | false | false | false | 0 |
FindNestedElementWithNameAndAttribute(
const char* name, const char* att_name, const char* att_value)
{
if (!name || !att_name || !att_value)
{
return 0;
}
int i;
for(i=0;i < this->NumberOfNestedElements;++i)
{
const char* nname = this->NestedElements[i]->GetName();
if(nname && (strcmp(... | false | false | false | false | false | 0 |
qcow_aio_read(BlockDriverState *bs,
int64_t sector_num, uint8_t *buf, int nb_sectors,
BlockDriverCompletionFunc *cb, void *opaque)
{
QCowAIOCB *acb;
acb = qcow_aio_setup(bs, sector_num, buf, nb_sectors, cb, opaque);
if (!acb)
return NULL;
qcow_aio_read_cb(acb, 0);
return &a... | false | false | false | false | false | 0 |
get_xslt_file(const std::string& xsl_file)
{
const std::string result = Glib::build_filename(get_xsl_file_dir(), xsl_file);
// Check that it exists:
const Glib::RefPtr<Gio::File> file = Gio::File::create_for_path(result);
if(file && file->query_exists())
return result;
return Glib::build_f... | false | false | false | false | false | 0 |
dock_move_towards_point(object *objp, vec3d *start, vec3d *finish, float speed_scale, float other_obj_speed = 0.0f, rotating_dockpoint_info *rdinfo = NULL)
{
physics_info *pi = &objp->phys_info;
float dist; // dist to goal
vec3d v2g; // vector to goal
dist = vm_vec_dist_quick(start, finish);
if (dist > 0.... | false | false | false | false | false | 0 |
get_linux_vendor_info(sigar_sys_info_t *info)
{
int i, status = ENOENT;
/* env vars for testing */
const char *release_file = getenv("SIGAR_OS_RELEASE_FILE");
const char *vendor_name = getenv("SIGAR_OS_VENDOR_NAME");
char buffer[8192], *data;
linux_vendor_info_t *vendor = NULL;
for (i=0; l... | false | false | false | false | false | 0 |
flow_delete_block_noexpunge (b)
basic_block b;
{
int deleted_handler = 0;
rtx insn, end, tmp;
/* If the head of this block is a CODE_LABEL, then it might be the
label for an exception handler which can't be reached.
We need to remove the label from the exception_handler_label list
and remove... | false | false | false | false | false | 0 |
IsCalledApplicationEntityTitleSupported()
// Date : December 10, 2001
// Author : Thomas Wilkens
// Task : Checks if the called application entity title is supported. This function expects
// that the called application entity title was made available for this instance through
// ... | false | false | false | false | false | 0 |
insert_merge(int l, int v) {
dprintf("insert_merge(%d, %d)\n", l, v);
// Insert by merging elements in a window of size 'chunk_size'
tmp.clear();
tmp.reserve(this->chunk_size);
for (int i = l; i < l + this->chunk_size; ++i) {
if (this->present[i]) {
th... | false | false | false | false | false | 0 |
soc_tplg_pcm_dai_elems_load(struct soc_tplg *tplg,
struct snd_soc_tplg_hdr *hdr)
{
struct snd_soc_tplg_pcm_dai *pcm_dai;
struct snd_soc_dobj *dobj;
int count = hdr->count;
int ret;
if (tplg->pass != SOC_TPLG_PASS_PCM_DAI)
return 0;
pcm_dai = (struct snd_soc_tplg_pcm_dai *)tplg->pos;
if (soc_tplg_check_elem... | false | false | false | false | false | 0 |
gnumeric_tinv (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
{
gnm_float p = value_get_as_float (argv[0]);
gnm_float dof = value_get_as_float (argv[1]);
gnm_float result;
if (p < 0 || p > 1 || dof < 1)
return value_new_error_NUM (ei->pos);
result = qt (p / 2, dof, FALSE, FALSE);
if (result < 0)
return... | false | false | false | false | false | 0 |
setSoundsEnabled(bool p_enabled) {
sndActive = p_enabled;
if (p_enabled)
{
if (!m_media1)
{
m_media1 = Phonon::createPlayer(Phonon::GameCategory);
}
if (!m_media2)
{
m_media2 = Phonon::createPlayer(Phonon::GameCategory);
}
}
els... | false | false | false | false | false | 0 |
addToMessage(MapType & m) const
{
AdminEntityData::addToMessage(m);
if(m_attrFlags & USERNAME_FLAG)
m[USERNAME_ATTR] = attr_username;
if(m_attrFlags & PASSWORD_FLAG)
m[PASSWORD_ATTR] = attr_password;
if(m_attrFlags & CHARACTERS_FLAG)
m[CHARACTERS_ATTR] = getCharactersAsList();
... | false | false | false | false | false | 0 |
ipmi_interpret_ctx_destroy (ipmi_interpret_ctx_t ctx)
{
if (!ctx || ctx->magic != IPMI_INTERPRET_CTX_MAGIC)
return;
ipmi_sel_parse_ctx_destroy (ctx->sel_parse_ctx);
ipmi_interpret_sel_destroy (ctx);
ipmi_interpret_sensor_destroy (ctx);
ctx->magic = ~IPMI_INTERPRET_CTX_MAGIC;
free (ctx);
} | false | false | false | false | false | 0 |
get_data_flag (double *data[], GMT_LONG j, struct X2SYS_INFO *s)
{
int i;
unsigned int bit, flag;
for (i = flag = 0, bit = 1; i < s->n_fields; i++, bit <<= 1) {
if (GMT_is_dnan (data[i][j])) continue; /* NaN, so no data here */
flag |= bit;
}
return (flag);
} | false | false | false | false | false | 0 |
_enable_disable_stores_tests_store_removed_cb (EnableDisableStoresTests* self, FolksPersonaStore* store) {
FolksPersonaStore* _tmp0_ = NULL;
FolksPersonaStore* _tmp1_ = NULL;
const gchar* _tmp2_ = NULL;
const gchar* _tmp3_ = NULL;
GeeHashMap* _tmp4_ = NULL;
FolksPersonaStore* _tmp5_ = NULL;
FolksBackend* backend... | false | false | false | false | false | 0 |
startPrefixMapping(const XMLString& prefix, const XMLString& namespaceURI)
{
if (prefix != NamespaceSupport::XML_NAMESPACE_PREFIX)
{
if (!_nsContextPushed)
{
_namespaces.pushContext();
_nsContextPushed = true;
}
_namespaces.declarePrefix(prefix, namespaceURI);
}
} | false | false | false | false | false | 0 |
main(int argc, char **argv)
{
char *pidfile;
setproctitle_init(argc, argv);
openlog("ovdb_monitor", L_OPENLOG_FLAGS | LOG_PID, LOG_INN_PROG);
message_program_name = "ovdb_monitor";
if(argc != 2 || strcmp(argv[1], SPACES))
die("should be started by ovdb_init");
message_handlers_warn(1,... | false | false | false | false | false | 0 |
sec_setinfo(int varnum, char *value)
{
if (*sec_varlist[varnum].setcmd){/*Not empty*/
if (sec_varlist[varnum].flags == FLAG_STRING) {
dstate_setinfo(sec_varlist[varnum].setcmd,"%s", value);
}
else if (sec_varlist[varnum].unit == 1) {
dstate_setinfo(sec_varlist[varnum].setcmd,"%s", value);
}
el... | false | false | false | false | false | 0 |
bt_start_transaction(struct si_sm_data *bt,
unsigned char *data,
unsigned int size)
{
unsigned int i;
if (size < 2)
return IPMI_REQ_LEN_INVALID_ERR;
if (size > IPMI_MAX_MSG_LENGTH)
return IPMI_REQ_LEN_EXCEEDED_ERR;
if (bt->state == BT_STATE_LONG_BUSY)
return IPMI_NODE_BUSY_ERR;
if (bt->state != BT... | false | false | false | false | false | 0 |
get_prev_terminal()
{
ED4_terminal *terminal = 0;
if (parent) {
if (index) {
terminal = parent->get_last_terminal(index-1);
}
if (!terminal) {
terminal = parent->get_prev_terminal();
}
}
return terminal;
} | false | false | false | false | false | 0 |
check_symbol_is_statement_variable(string *name)
{
check_symbol_existence(*name);
int symb_id = mod_file->symbol_table.getID(*name);
if (mod_file->symbol_table.getType(symb_id) != eStatementDeclaredVariable)
error(*name + " is not a variable assigned in a statement");
} | false | false | false | false | false | 0 |
get_total_tlg_number(int mtg_id) {
mtg_type *mtg = search_mtg(localize_mtg_head, mtg_id);
int count = 0;
if (mtg != NULL) {
tlg_list_type *list = mtg->tlg_list;
while(list != NULL) {
list = list->next;
count++;
}
}
return count;
} | false | false | false | false | false | 0 |
o_globalvalue(FUNC UNUSED *fp, GLOBAL *sp)
{
if (sp == NULL) {
math_error("Global variable not defined");
/*NOTREACHED*/
}
copyvalue(&sp->g_value, ++stack);
} | false | false | false | false | false | 0 |
dragMoveEvent(QDragMoveEvent *event)
{
QModelIndex index = indexAt(event->pos());
bool afterLastItem = false;
if(index.isValid())
{
mDropIndicator = visualRect(index);
if(event->pos().y() > mDropIndicator.top() + mDropIndicator.height() / 2)
{
index = model()->index(index.row() + 1, 0, QModelInd... | false | false | false | false | false | 0 |
__cx88_ir_start(void *priv)
{
struct cx88_core *core = priv;
struct cx88_IR *ir;
if (!core || !core->ir)
return -EINVAL;
ir = core->ir;
if (ir->polling) {
hrtimer_init(&ir->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
ir->timer.function = cx88_ir_work;
hrtimer_start(&ir->timer,
ktime_set(0, ir->p... | false | false | false | false | false | 0 |
find_aer_device_iter(struct device *device, void *data)
{
struct pcie_device **result = data;
struct pcie_device *pcie_dev;
if (device->bus == &pcie_port_bus_type) {
pcie_dev = to_pcie_device(device);
if (pcie_dev->service & PCIE_PORT_SERVICE_AER) {
*result = pcie_dev;
return 1;
}
}
return 0;
} | false | false | false | false | false | 0 |
_getFullXserver(char* givenXserver)
{
char* ret;
ENTRY(("_getFullXserver(\"%s\")",givenXserver));
if(!strchr(givenXserver,':')) {
if(!strchr(givenXserver,'.')) {
ret = tdmAllocate(strlen(givenXserver)+4);
if (!ret)
goto error;
strcpy(ret,":");
... | false | true | false | false | false | 1 |
_evas_common_text_props_cluster_move(const Evas_Text_Props *props, int pos,
Eina_Bool right)
{
int prop_pos = evas_common_text_props_index_find(props, pos);
if (!right && (prop_pos > 0))
{
#ifdef OT_SUPPORT
return props->info->ot[props->start + prop_pos - 1].source_cluster -
props->t... | false | false | false | false | false | 0 |
flocal_rec_fail (qtrans, qcmd, qsys, zwhy)
struct stransfer *qtrans;
struct scmd *qcmd;
const struct uuconf_system *qsys;
const char *zwhy;
{
if (zwhy != NULL)
{
ulog (LOG_ERROR, "%s: %s", qcmd->zfrom, zwhy);
(void) fmail_transfer (FALSE, qcmd->zuser, (const char *) NULL, zwhy,
... | false | false | false | false | false | 0 |
zlog(ZVALUE z, ZVALUE base)
{
ZVALUE *zp; /* current square */
long power; /* current power */
ZVALUE temp; /* temporary */
ZVALUE squares[32]; /* table of squares of base */
/* ignore signs */
z.sign = 0;
base.sign = 0;
/*
* Make sure that the numbers are nonzero and the base is > 1
*/
if (zisze... | false | false | false | false | false | 0 |
__sgn_ldivmod(register word32 *res, register word32 *u,
register word32 *v, int32 blen, int32 nd_quot)
{
int32 wlen, usign, vsign;
word32 *wrku, *wrkv;
struct xstk_t *uxsp, *vxsp, *tmpxsp;
/* always need unused tmp area for unused of mod/div results */
wlen = wlen_(blen);
push_xstk_(tmpxsp, wlen*WBITS/2);
wl... | false | false | false | false | false | 0 |
setmatrix(struct gspca_dev *gspca_dev)
{
struct sd *sd = (struct sd *) gspca_dev;
int i;
const u8 *matrix;
static const u8 adcm2700_matrix[9] =
/* {0x66, 0xed, 0xed, 0xed, 0x66, 0xed, 0xed, 0xed, 0x66}; */
/*ms-win*/
{0x74, 0xed, 0xed, 0xed, 0x74, 0xed, 0xed, 0xed, 0x74};
static const u8 gc0305_matrix[9] =
{0... | false | false | false | false | false | 0 |
bitvector_print (SCM vec, SCM port, scm_print_state *pstate)
{
size_t bit_len = BITVECTOR_LENGTH (vec);
size_t word_len = (bit_len+31)/32;
scm_t_uint32 *bits = BITVECTOR_BITS (vec);
size_t i, j;
scm_puts ("#*", port);
for (i = 0; i < word_len; i++, bit_len -= 32)
{
scm_t_uint32 mask = 1;
fo... | false | false | false | false | false | 0 |
ossl_default_tmp_dh_callback(SSL *ssl, int is_export, int keylength)
{
rb_warning("using default DH parameters.");
switch(keylength){
case 512:
return OSSL_DEFAULT_DH_512;
case 1024:
return OSSL_DEFAULT_DH_1024;
}
return NULL;
} | false | false | false | false | false | 0 |
udisks_linux_mdraid_object_set_property (GObject *__object,
guint prop_id,
const GValue *value,
GParamSpec *pspec)
{
UDisksLinuxMDRaidObject *object = UDISKS_LINUX_MDRAID_OBJECT (_... | false | false | false | false | false | 0 |
read_handler(Element *e, void *thunk)
{
FromNetFlowSummaryDump *fd = static_cast<FromNetFlowSummaryDump *>(e);
switch ((intptr_t)thunk) {
case H_ACTIVE:
return BoolArg::unparse(fd->_active);
case H_ENCAP:
return "IP";
default:
return "<error>";
}
} | false | false | false | false | false | 0 |
getDevicesXML()
{
// <?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\" ?>\n<Devices xmlns=\"http://www.garmin.com/xmlschemas/PluginAPI/v1\">\n<Device DisplayName=\"Oregon (/mnt/Oregon/)\" Number=\"0\"/>\n</Devices>\n
TiXmlDocument doc;
TiXmlDeclaration * decl = new TiXmlDeclaration( "1.0", "UTF-8",... | false | false | false | false | false | 0 |
lp3943_gpio_probe(struct platform_device *pdev)
{
struct lp3943 *lp3943 = dev_get_drvdata(pdev->dev.parent);
struct lp3943_gpio *lp3943_gpio;
lp3943_gpio = devm_kzalloc(&pdev->dev, sizeof(*lp3943_gpio),
GFP_KERNEL);
if (!lp3943_gpio)
return -ENOMEM;
lp3943_gpio->lp3943 = lp3943;
lp3943_gpio->chip = lp3943... | false | false | false | false | false | 0 |
setDirtyRect(int x, int y, int w, int h)
{
// adjust minDirt and maxDirt points
if (x < minDirtX)
minDirtX = x & 0xfffffff0; // rounded down to multiple of 16
if (y < minDirtY)
minDirtY = y & 0xfffffff0; // rounded down to multiple of 16
if (x+w-1 > maxDirtX)
maxDirtX = x+w-1;
if (y+h-1 > maxDirtY)
maxDi... | false | false | false | false | false | 0 |
timer_stat_free_contents(
timer_stat_t *timer_stats[]) /* timer stat hash table */
{
int i;
for (i = 0; i < TABLE_SIZE; i++) {
timer_stat_t *ts = timer_stats[i];
while (ts) {
timer_stat_t *next = ts->next;
free(ts);
ts = next;
}
timer_stats[i] = NULL;
}
} | false | false | false | false | false | 0 |
compatible_signature(unsigned char a, unsigned char b)
{
a = tolower(a & ~SAVED_FAKE_BIT);
b = tolower(b & ~SAVED_FAKE_BIT);
switch(a)
{
case 'e':
case 'f':
return b == 'e' || b == 'f';
default:
return b == a;
}
} | false | false | false | false | false | 0 |
Ns_OpenSSLServerSSLContextGet(char *server, char *name)
{
NsOpenSSLContext *sslcontext = NULL;
Server *thisServer = NULL;
Tcl_HashEntry *hPtr = NULL;
if (name == NULL) {
Ns_Log(Error, "%s (%s): attempt to get SSL context with NULL name",
MODULE, server);
... | false | false | false | true | false | 1 |
scanner_category_add_dir(scanner_category_t *sc, const char *dir)
{
char *p;
if (str_array_find(sc->dirs, dir))
return;
p = g_strdup(dir);
g_array_append_val(sc->dirs, p);
} | false | false | false | false | false | 0 |
gst_tag_xmp_writer_remove_all_schemas (GstTagXmpWriter * config)
{
GstTagXmpWriterData *data;
GSList *iter;
g_return_if_fail (GST_IS_TAG_XMP_WRITER (config));
data = gst_tag_xmp_writer_get_data (config);
GST_TAG_XMP_WRITER_DATA_LOCK (data);
if (data->schemas) {
for (iter = data->schemas; iter; iter =... | false | false | false | false | false | 0 |
LoginClicked(GtkButton * UNUSED(button), gpointer dbList)
{
const char *tmpUser, *tmpPass, *tmpHost;
DBProvider *pdb = GetSelectedDBType();
if (pdb == NULL)
return;
tmpUser = pdb->username, tmpPass = pdb->password, tmpHost = pdb->hostname;
pdb->username = gtk_entry_get_text(GTK_ENTRY(user... | false | false | false | false | false | 0 |
_fillRect(UT_RGBColor& clr,
UT_sint32 xoff,
UT_sint32 yoff,
UT_uint32 iPos1,
UT_uint32 iLen,
UT_Rect &r,
GR_Graphics * /*pG*/)
{
/*
Upon entry to this function, yoff is the TOP of the run,
NOT the baseline.
*/
// we also need to support this in printing
//... | false | false | false | false | false | 0 |
grab_blob(const unsigned char *sha1, unsigned long *size)
{
char *blob;
enum object_type type;
if (is_null_sha1(sha1)) {
/* deleted blob */
*size = 0;
return xcalloc(1, 1);
}
blob = read_sha1_file(sha1, &type, size);
if (type != OBJ_BLOB)
die("object '%s' is not a blob!", sha1_to_hex(sha1));
return blob;... | false | false | false | false | false | 0 |
qlt_free_cmd(struct qla_tgt_cmd *cmd)
{
struct qla_tgt_sess *sess = cmd->sess;
ql_dbg(ql_dbg_tgt, cmd->vha, 0xe074,
"%s: se_cmd[%p] ox_id %04x\n",
__func__, &cmd->se_cmd,
be16_to_cpu(cmd->atio.u.isp24.fcp_hdr.ox_id));
BUG_ON(cmd->cmd_in_wq);
if (cmd->sg_mapped)
qlt_unmap_sg(cmd->vha, cmd);
if ... | false | false | false | false | false | 0 |
item_width(void *p) const // I - List item data
{
int i; // Looping var
FL_BLINE *line; // Pointer to line
char *t, // Pointer into text
*ptr, // Pointer into fragment
fragment[10240]; // Fragment of text
int width, // Width of line
tempwidth; // Width of fragment
int column; // Current... | false | false | false | false | true | 1 |
get_next_vbi_buf(struct cx231xx_dmaqueue *dma_q,
struct cx231xx_buffer **buf)
{
struct cx231xx_video_mode *vmode =
container_of(dma_q, struct cx231xx_video_mode, vidq);
struct cx231xx *dev = container_of(vmode, struct cx231xx, vbi_mode);
char *outp;
if (list_empty(&dma_q->active)) {
dev_err(dev->dev... | false | false | false | false | false | 0 |
JDVPaned( const int fixmode )
: Gtk::VPaned(),
m_pctrl( *this, fixmode )
{} | false | false | false | false | false | 0 |
sim_run(int con_fd)
{
fd_set rfds;
int i;
if (sim_init_conn(SIM_BASENAME) < 0)
return -1;
while (!netstarted)
sim_run_console(con_fd);
for (;;) {
FD_ZERO(&rfds);
FD_SET(simctl, &rfds);
FD_SET(con_fd, &rfds);
for (i = 0; i < IBSIM_MAX_CLIENTS; i++)
if (clients[i].pid)
FD_SET(clients[i].fd, &rf... | false | false | false | false | false | 0 |
se_HandleNewServerVote( nMessage& m )
{
if ( sn_GetNetState() != nCLIENT || eVoteItem::AcceptNewVote( m ) )
{
// accept message
eVoteItem* item = tNEW( eVoteItemServerControlled )();
if ( !item->FillFromMessage( m ) )
delete item;
}
} | false | false | false | false | false | 0 |
intif_request_guild_storage(int account_id,int guild_id)
{
if (inter_fd < 0)
return -1;
WFIFOW(inter_fd,0) = 0x3018;
WFIFOL(inter_fd,2) = account_id;
WFIFOL(inter_fd,6) = guild_id;
WFIFOSET(inter_fd,10);
return 0;
} | false | false | false | false | false | 0 |
CloseObjectFiles(
void *theEnv,
FILE *itemFiles[SAVE_ITEMS],
int itemReopenFlags[SAVE_ITEMS],
struct CodeGeneratorFile itemCodeFiles[SAVE_ITEMS],
int maxIndices)
{
int count = maxIndices;
int arrayVersion = 0;
register int i;
for (i = 0 ; i < SAVE_ITEMS ; i++)
{
count = maxIndices;
... | false | false | false | false | false | 0 |
__ecereMethod_Workspace_GetAbsolutePathFromRelative(struct __ecereNameSpace__ecere__com__Instance * this, char * relative)
{
struct Workspace * __ecerePointer_Workspace = (struct Workspace *)(this ? (((char *)this) + __ecereClass_Workspace->offset) : 0);
char name[797];
char absolute[797];
struct Project * prj = (((voi... | true | true | false | true | false | 1 |
scriptSelected(QTreeWidgetItem *item, int /*column*/)
{
DebugDocument *doc = m_documents.key(item);
if (doc)
emit displayScript(doc);
} | false | false | false | false | false | 0 |
add_observation(bool is_ref, int obs) {
space[obs] =1;
if (is_ref) {
l1[obs]++;
// cout << "ref case" << endl;
}
else {
l2[obs]++;
// cout << "alt case" << endl;
// cout << "ref_base: " << ref_base << " alt_base: " << base << endl;
}
} | false | false | false | false | false | 0 |
mystrncasecmp(const char *ss, const char *tt, int n)
{
const unsigned char *s = (const unsigned char *) ss;
const unsigned char *t = (const unsigned char *) tt;
if (!n || ss == tt)
return 0;
while (cmap[*s] == cmap[*t++]) {
if (!*s++ || !--n)
return 0;
}
return (cmap[*s] - cmap[*--t]);
} | false | false | false | false | true | 1 |
convertTemplate(char *template, int n1, int n2, int n3, char **pname)
{
char s1[20], s2[20], s3[20];
char *t;
sprintf(s1, "%1d", n1);
sprintf(s2, "%1d", n2);
sprintf(s3, "%1d", n3);
*pname = t = (char *) HDmalloc(HDstrlen(template) + 61);
while (*template)
switch (*te... | false | false | false | false | false | 0 |
dummy_tlb_sync(void *cookie)
{
WARN_ON(cookie != cfg_cookie);
} | false | false | false | false | false | 0 |
ompi_comm_dup_with_info ( ompi_communicator_t * comm, ompi_info_t *info, ompi_communicator_t **newcomm )
{
ompi_communicator_t *newcomp = NULL;
int rsize = 0, mode = OMPI_COMM_CID_INTRA, rc = OMPI_SUCCESS;
if ( OMPI_COMM_IS_INTER ( comm ) ){
rsize = comm->c_remote_group->grp_proc_count;
mo... | false | false | false | false | false | 0 |
_set_insert(struct dev_set *ds, dev_t dev)
{
struct entry *e;
unsigned h = _hash_dev(dev);
if (!(e = dm_pool_alloc(ds->mem, sizeof(*e))))
return 0;
e->next = ds->slots[h];
e->dev = dev;
ds->slots[h] = e;
return 1;
} | false | false | false | false | false | 0 |
init_env_dictionary()
/** Initialize internal dictionary of quasi-environmental variables */
{ char buff[512];
const uid_t uid = getuid();
const gid_t gid = getgid();
struct passwd *pwent = NULL;
struct group *grent = NULL;
if (vardefns != NULL) return;
sprintf(buff, "%d", (int)uid);
... | false | false | false | false | false | 0 |
toTime_t(const QString& value, KDateTime::TimeFormat format)
{
const KDateTime dt = KDateTime::fromString(value, format);
return (dt.isValid() ? (dt.toUtc().dateTime().toMSecsSinceEpoch()/1000) : -1);
} | false | false | false | false | false | 0 |
trash()
/* Delete the compressed files and the directories that contained the deleted
files, if empty. Return an error code in the ZE_ class. Failure of
destroy() or deletedir() is ignored. */
{
extent i; /* counter on deleted names */
extent n; /* number of directories to delete */
... | false | true | false | false | true | 1 |
operator=(const Attendee &attendee)
{
// check for self assignment
if (&attendee == this) {
return *this;
}
*d = *attendee.d;
setName(attendee.name());
setEmail(attendee.email());
return *this;
} | false | false | false | false | false | 0 |
encapsulated_reader(sockreader_t * self, char **buf,
apr_size_t *len, const char *enc_info,
const char *preview) {
char *read;
char *read2;
char *last;
char *cur;
char *key;
char *val;
char *tmp;
apr_status_t status;
apr_size_t size;
apr_size_t size2;
tmp =... | false | true | false | false | true | 1 |
mq_init_ns(struct ipc_namespace *ns)
{
ns->mq_queues_count = 0;
ns->mq_queues_max = DFLT_QUEUESMAX;
ns->mq_msg_max = DFLT_MSGMAX;
ns->mq_msgsize_max = DFLT_MSGSIZEMAX;
ns->mq_msg_default = DFLT_MSG;
ns->mq_msgsize_default = DFLT_MSGSIZE;
ns->mq_mnt = kern_mount_data(&mqueue_fs_type, ns);
if (IS_... | false | false | false | false | false | 0 |
gdb_input_write_line(const gchar *line)
{
GIOStatus st;
GError *err = NULL;
gsize count;
char command[1000];
sprintf(command, "%s\n", line);
while (strlen(command))
{
st = g_io_channel_write_chars(gdb_ch_in, command, strlen(command), &count, &err);
strcpy(command, command + count);
if (err || (st == G_... | true | true | false | false | false | 1 |
q_edge_area_lagrange_hess(e_info)
struct qinfo *e_info;
{ REAL **x,**g,****h;
REAL area;
int m,k,kk;
struct gauss_lag *gl = &gauss_lagrange[web.dimension][web.gauss1D_order];
int ctrl = web.skel[EDGE].ctrlpts;
x = e_info->x;
g = e_info->grad;
h = e_info->hess;
/* main integral over edge */
area = 0.... | false | false | false | false | false | 0 |
SearchLim (cra, cdec, dra, ddec, syscoor, ra1, ra2, dec1, dec2, verbose)
double cra, cdec; /* Center of search area in degrees */
double dra, ddec; /* Horizontal and verticla half-widths of area */
int syscoor; /* Coordinate system */
double *ra1, *ra2; /* Right ascension limits in degrees */
double *dec1, *dec2; /* ... | false | false | false | false | false | 0 |
file_sparseness(const struct stat *p)
{
#if defined HAVE_STRUCT_STAT_ST_BLOCKS
if (0 == p->st_size)
{
if (0 == p->st_blocks)
return 1.0;
else
return p->st_blocks < 0 ? -HUGE_VAL : HUGE_VAL;
}
else
{
double blklen = file_blocksize(p) * (double)p->st_blocks;
return blklen / p->st... | false | false | false | false | false | 0 |
copy_clipboard_win(gpointer data){
gchar *str=NULL;
GtkClipboard* clipboard;
LOG(LOG_DEBUG, "IN : copy_clipboard()");
#ifdef __WIN32__
clipboard = gtk_clipboard_get(GDK_SELECTION_CLIPBOARD);
#else
clipboard = gtk_clipboard_get(GDK_SELECTION_PRIMARY);
#endif
str = gtk_clipboard_wait_for_text(clipboard);
if(str... | false | false | false | false | false | 0 |
snapTime(double start_,double increment_)
{
unsigned long newTime=(unsigned long)increment_;
if (fabs(start_)<LONG_MAX)
{
const int secondsPerDay=86400;
const unsigned long zeroYear =31622400; // January 1st
const unsigned long halfYear =16070400; // half year
const unsigned lon... | false | false | false | false | false | 0 |
SetProjectEnvvarSet(cbProject* project, const wxString& envvar_set)
{
#if defined(TRACE_ENVVARS)
Manager::Get()->GetLogManager()->DebugLog(F(_T("SetProjectEnvvarSet")));
#endif
m_ProjectSets[project] = envvar_set;
EV_DBGLOG(_T("EnvVars: Discarding envvars set '")+nsEnvVars::GetActiveSetName()+_T("'."));
nsEnvV... | false | false | false | false | false | 0 |
mpt3sas_config_get_raid_volume_pg0(struct MPT3SAS_ADAPTER *ioc,
Mpi2ConfigReply_t *mpi_reply, Mpi2RaidVolPage0_t *config_page, u32 form,
u32 handle, u16 sz)
{
Mpi2ConfigRequest_t mpi_request;
int r;
memset(&mpi_request, 0, sizeof(Mpi2ConfigRequest_t));
mpi_request.Function = MPI2_FUNCTION_CONFIG;
mpi_request.Ac... | false | false | false | false | false | 0 |
get_caps (GUPnPDLNAGstAudioInformation *gst_info)
{
GUPnPDLNAGstAudioInformationPrivate *priv = gst_info->priv;
GstDiscovererStreamInfo *info = GST_DISCOVERER_STREAM_INFO (get_audio_info (gst_info));
if (!priv->caps)
priv->caps = gst_discoverer_stream_info_get_caps (info);
... | false | false | false | false | false | 0 |
qib_user_sdma_queue_clean(struct qib_pportdata *ppd,
struct qib_user_sdma_queue *pq)
{
struct qib_devdata *dd = ppd->dd;
struct list_head free_list;
struct qib_user_sdma_pkt *pkt;
struct qib_user_sdma_pkt *pkt_prev;
unsigned long flags;
int ret = 0;
if (!pq->num_sending)
return 0;
INIT_LIST_HEAD(&f... | false | false | false | false | false | 0 |
scm_make_print_state ()
{
SCM answer = SCM_BOOL_F;
/* First try to allocate a print state from the pool */
scm_i_pthread_mutex_lock (&print_state_mutex);
if (!scm_is_null (print_state_pool))
{
answer = SCM_CAR (print_state_pool);
print_state_pool = SCM_CDR (print_state_pool);
}
scm_i_pthr... | false | false | false | false | false | 0 |
RemoveSpaces(char *buffer)
{
int k = 0;
while ((k < strlen(buffer)) && isblank(buffer[k]))
k++;
if (k != 0)
strcpy(buffer, &buffer[k]);
} | false | true | false | false | false | 1 |
list_changed_stacks_add(struct changed_var_stack *list_changed_stacks,
unsigned long vreg)
{
struct changed_var_stack *changed;
changed = alloc_changed_var_stack(vreg);
if (!changed)
return -ENOMEM;
insert_list(changed, &list_changed_stacks);
return 0;
} | false | false | false | false | false | 0 |
test_alloc_free (void)
{
gpointer p;
gboolean ret;
p = gnome_keyring_memory_alloc (512);
g_assert (p != NULL);
g_assert_cmpint (IS_ZERO, ==, find_non_zero (p, 512));
memset (p, 0x67, 512);
ret = gnome_keyring_memory_is_secure (p);
g_assert (ret == TRUE);
gnome_keyring_memory_free (p);
} | false | false | false | false | false | 0 |
setup_engine(BIO *err, const char *engine, int debug) {
ENGINE *e = NULL;
if (engine) {
if(strcmp(engine, "auto") == 0) {
BIO_printf(err,"enabling auto ENGINE support\n");
ENGINE_register_all_complete();
return NULL;
}
if((e = ENGINE_by_id(engine)) == NULL
&& (e = try_load_engine(eng... | false | false | false | false | false | 0 |
ntb_pow_cancel(struct ntb_pow_cookie *cookie)
{
struct ntb_pow *pow = cookie->pow;
pthread_mutex_lock(&pow->mutex);
/* If the cookie hasn't been seen by all of the threads yet
* then it is still in queue so we can remove it */
if (cookie->next_nonce_offset < pow->n_threads)
... | false | false | false | false | false | 0 |
getRhoMatrix(int i,bool) const {
// get the rho matrices for the outgoing particles
vector<RhoDMatrix> rhoout(outgoing().size()-1);
for(int ix=0,N=outgoing().size();ix<N;++ix) {
if(ix<i) rhoout[ix ] =
outgoing()[ix]->DMatrix();
else if(ix>i) rhoout[ix-1] =
outgoing()[ix]->DMatrix();
... | false | false | false | false | false | 0 |
create_recv_rtcp (GstRtpBin * rtpbin, GstPadTemplate * templ,
const gchar * name)
{
guint sessid;
GstRtpBinSession *session;
GstPad *sinkdpad;
/* first get the session number */
if (name == NULL || sscanf (name, "recv_rtcp_sink_%u", &sessid) != 1)
goto no_name;
GST_DEBUG_OBJECT (rtpbin, "finding s... | false | false | false | false | false | 0 |
select_providers (GList *providers,
GtkSourceCompletionContext *context)
{
GList *selection = NULL;
GList *l;
for (l = providers; l != NULL; l = l->next)
{
GtkSourceCompletionProvider *provider = l->data;
gboolean good_activation = (gtk_source_completion_provider_get_act... | false | false | false | false | false | 0 |
LiberateArgumentList(const int argc,char **argv)
{
int
i;
for (i=0; i< argc; i++)
MagickFreeMemory(argv[i]);
MagickFreeMemory(argv);
} | true | true | false | false | false | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.