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 |
|---|---|---|---|---|---|---|
diodon_image_clipboard_item_construct (GType object_type, DiodonClipboardType clipboard_type, const gchar* data, GError** error) {
DiodonImageClipboardItem * self = NULL;
DiodonClipboardType _tmp0_ = 0;
const gchar* _tmp1_ = NULL;
gchar* _tmp2_ = NULL;
GdkPixbuf* pixbuf = NULL;
const gchar* _tmp3_ = NULL;
GdkPix... | false | false | false | false | false | 0 |
schedd_conf_update_master_list(sge_evc_class_t *evc, object_description *object_base, sge_object_type type,
sge_event_action action, lListElem *event, void *clientdata)
{
lList *list = NULL;
lList *answer_list = NULL;
lDescr *list_descr;
lList *data_list;
lListElem *ep = ... | false | false | false | false | false | 0 |
_layout_format_value_handle(Ctxt *c, Evas_Object_Textblock_Format *fmt, const char *item)
{
const char *key = NULL, *val = NULL;
_format_param_parse(item, &key, &val);
if ((key) && (val)) _format_command(c->obj, fmt, key, val);
if (key) eina_stringshare_del(key);
if (val) eina_stringshare_del(val);
c... | false | false | false | false | false | 0 |
getCommandString() const
{
ASCString c;
c.format("constructBuilding ( map, %d, asc.MapCoordinate(%d, %d), %d )", getUnitID(), target.x, target.y, buildingTypeID );
return c;
} | false | false | false | false | false | 0 |
fatal __V((int code, const char *fmt, ...))
{
va_list args;
#ifdef __STDC__
va_start(args, fmt);
#else
int code;
char *fmt;
va_start(args);
code = va_arg(args, int);
fmt = va_arg(args, char *);
#endif
vfmtmsg(line, sizeof(line), fmt, args);
if (to_log)
syslog(LOG_ERR, "%s", line);... | false | false | false | false | false | 0 |
visor_close(struct usb_serial_port *port)
{
unsigned char *transfer_buffer;
usb_serial_generic_close(port);
usb_kill_urb(port->interrupt_in_urb);
transfer_buffer = kmalloc(0x12, GFP_KERNEL);
if (!transfer_buffer)
return;
usb_control_msg(port->serial->dev,
usb_rcvctrlpipe(port->serial->dev, 0),
VIS... | false | false | false | false | false | 0 |
dbzclose(void)
{
bool ret = true;
if (!opendb) {
warn("dbzclose: not opened!");
return false;
}
if (!dbzsync())
ret = false;
#ifdef DO_TAGGED_HASH
closehashtable(&pagtab);
if (Fclose(basef) == EOF) {
syswarn("dbzclose: fclose(basef) failed");
ret = false;
}
if (basefname !... | false | false | false | false | false | 0 |
remove_key_events (GSWindow *window)
{
window->priv->key_events = g_list_reverse (window->priv->key_events);
while (window->priv->key_events) {
GdkEventKey *event = window->priv->key_events->data;
gdk_event_free ((GdkEvent *)event);
window->priv->key_eve... | false | false | false | false | false | 0 |
UsbLan_Read(unsigned int &len, uint8_t *data)
{
int err = recv(sock, reinterpret_cast<char*>(data), len, 0);
if (err == SOCKET_ERROR) {
report_net_error("recv()");
len = 0;
return LC_ERROR_OS_NET;
}
len = static_cast<unsigned int>(err);
debug("%i bytes received", len);
return 0;
} | false | false | false | false | false | 0 |
check_kill_permission(int sig, struct siginfo *info,
struct task_struct *t)
{
struct pid *sid;
int error;
if (!valid_signal(sig))
return -EINVAL;
if (!si_fromuser(info))
return 0;
error = audit_signal_info(sig, t); /* Let audit system see the signal */
if (error)
return error;
if (!same_thread_gro... | false | false | false | false | false | 0 |
parq_upload_unfreeze_one(struct parq_ul_queued *puq)
{
g_assert(puq);
g_assert(puq->by_addr);
if (!(puq->flags & PARQ_UL_FROZEN))
return;
g_assert(!puq->has_slot);
g_assert(puq->is_alive);
if (GNET_PROPERTY(parq_debug) >= 5)
g_debug("[PARQ UL] thawing one %s [#%d] from IP %s",
guid_hex_str(&puq->id), pu... | false | false | false | false | false | 0 |
gnm_expr_new_name (GnmNamedExpr *name,
Sheet *optional_scope, Workbook *optional_wb_scope)
{
GnmExprName *ans;
ans = CHUNK_ALLOC (GnmExprName, expression_pool_big);
if (!ans)
return NULL;
ans->oper = GNM_EXPR_OP_NAME;
ans->name = name;
expr_name_ref (name);
ans->optional_scope = optional_scope;
ans->o... | false | false | false | false | false | 0 |
initPreferences()
{
outputs_ = StateOutputs(APPLIED + 1, ButtonPolicy::ALL_BUTTONS);
state_machine_ = StateMachine(APPLIED + 1,
StateArray(int(SMI_TOTAL), ButtonPolicy::BOGUS));
// Build the state output map
outputs_[INITIAL] = CLOSE;
outputs_[VALID] = RESTORE | OKAY | APPLY | CANCEL;
outputs_[INVALID] = RES... | false | false | false | false | false | 0 |
iRandom(int low, int high) {
int r = iFloor(low + (high - low + 1) * (double)rand() / RAND_MAX);
// There is a *very small* chance of generating
// a number larger than high.
if (r > high) {
return high;
} else {
return r;
}
} | false | false | false | false | false | 0 |
next_line (int fd, char *const buffer, char **cp, char **re,
char *const buffer_end)
{
char *res = *cp;
char *nl = memchr (*cp, '\n', *re - *cp);
if (nl == NULL)
{
if (*cp != buffer)
{
if (*re == buffer_end)
{
memmove (buffer, *cp, *re - *cp);
*re = buffer + (*re - *cp);
... | false | false | false | false | true | 1 |
pp_remainder(enum cmit_fmt fmt,
const char **msg_p,
struct strbuf *sb,
int indent)
{
int first = 1;
for (;;) {
const char *line = *msg_p;
int linelen = get_one_line(line);
*msg_p += linelen;
if (!linelen)
break;
if (is_empty_line(line, &linelen)) {
if (first)
continue;
if (fmt == ... | false | false | false | false | false | 0 |
cin_iswhileofdo(p, lnum, ind_maxparen) /* XXX */
char_u *p;
linenr_T lnum;
int ind_maxparen;
{
pos_T cursor_save;
pos_T *trypos;
int retval = FALSE;
p = cin_skipcomment(p);
if (*p == '}') /* accept "} while (cond);" */
p = cin_skipcomment(p + 1);
if (STRNCMP(p, "while", 5) =... | false | false | false | false | false | 0 |
MutableString(int number, FieldType type) {
Extension* extension;
if (MaybeNewExtension(number, &extension)) {
extension->type = type;
GOOGLE_DCHECK_EQ(cpp_type(extension->type), WireFormatLite::CPPTYPE_STRING);
extension->is_repeated = false;
extension->string_value = new string;
} else {
GOO... | false | false | false | false | false | 0 |
show_error_dialog(const Glib::ustring&, const Glib::ustring& secondary)
{
Utils::show_ok_dialog(_("Error Importing CSV File"),
secondary, *this, Gtk::MESSAGE_ERROR);
} | false | false | false | false | false | 0 |
_round(QString &str, int precision)
{
int decimalSymbolPos = str.indexOf(QLatin1Char('.'));
if (decimalSymbolPos == -1) {
if (precision == 0) return;
else if (precision > 0) { // add dot if missing (and needed)
str.append(QLatin1Char('.'));
decimalSymbolPos = str.length... | false | false | false | false | false | 0 |
compare_print(struct metaentry *real, struct metaentry *stored, int cmp)
{
if (!real && (!stored || (cmp == DIFF_NONE || cmp & DIFF_ADDED))) {
msg(MSG_ERROR, "%s called with incorrect arguments\n", __func__);
return;
}
if (cmp == DIFF_NONE) {
msg(MSG_DEBUG, "%s:\tno difference\n", real->path);
return;
}
... | false | false | false | false | false | 0 |
create_osi_cksum (const u_int8_t *pptr, int checksum_offset, int length)
{
int x;
int y;
u_int32_t mul;
u_int32_t c0;
u_int32_t c1;
u_int16_t checksum;
int index;
c0 = 0;
c1 = 0;
for (index = 0; index < length; index++) {
/*
* Ignore the contents of the checks... | false | false | false | false | false | 0 |
object_created (GObject *obj, const char *path, gpointer user_data)
{
ObjectCreatedData *odata = user_data;
/* We assume that on error, the creator_func printed something */
if (obj == NULL && g_strcmp0 (path, "/") != 0 ) {
GError *error;
error = g_error_new (NM_OBJECT_ERROR,
NM_OBJECT_E... | false | false | false | false | false | 0 |
pack_backend__refresh(git_odb_backend *backend_)
{
int error;
struct stat st;
git_buf path = GIT_BUF_INIT;
struct pack_backend *backend = (struct pack_backend *)backend_;
if (backend->pack_folder == NULL)
return 0;
if (p_stat(backend->pack_folder, &st) < 0 || !S_ISDIR(st.st_mode))
return git_odb__error_notf... | false | false | false | false | false | 0 |
MakeMesh(const std::vector<aiVector3D>& positions,
unsigned int numIndices)
{
if (positions.size() & numIndices || positions.empty() || !numIndices)
return NULL;
// Determine which kinds of primitives the mesh consists of
aiMesh* out = new aiMesh();
switch (numIndices)
{
case 1:
out->mPrimitiveTypes = aiPr... | false | false | false | false | false | 0 |
operator==(TimeControl &src) {
if (mode != src.mode) return 0;
switch(mode) {
case TC_SPM:
return(value[0] == src.value[0]);
case TC_XMOVES:
case TC_ICS:
return(value[0] == src.value[0] && value[1] == src.value[1]);
default:
return 1;
}
} | false | false | false | false | false | 0 |
lgl_xml_get_prop_length (xmlNodePtr node,
const gchar *property,
gdouble default_val)
{
gdouble val;
xmlChar *string;
xmlChar *unit_id;
lglUnits units;
string = xmlGetProp (node, (xmlChar *)property);
if ( string ... | false | false | false | false | false | 0 |
isl29035_detect(struct isl29018_chip *chip)
{
int status;
unsigned int id;
status = regmap_read(chip->regmap, ISL29035_REG_DEVICE_ID, &id);
if (status < 0) {
dev_err(chip->dev,
"Error reading ID register with error %d\n",
status);
return status;
}
id = (id & ISL29035_DEVICE_ID_MASK) >> ISL29035_DEVICE... | false | false | false | false | false | 0 |
iwl_update_chain_flags(struct iwl_priv *priv)
{
struct iwl_rxon_context *ctx;
for_each_context(priv, ctx) {
iwlagn_set_rxon_chain(priv, ctx);
if (ctx->active.rx_chain != ctx->staging.rx_chain)
iwlagn_commit_rxon(priv, ctx);
}
} | false | false | false | false | false | 0 |
bad_option(VOID)
{
printf("! (%s): Unknown option `%s' ignored.\n",
cmd_prms?"Command line":".fweb",(char*)pa_begin);
mark_harmless;
} | false | false | false | false | false | 0 |
send_server(aClient *cptr, aClient *server)
{
aConfItem *aconf;
if (cptr->from == server->from)
{
return;
}
aconf = cptr->serv->nline;
if (!aconf)
{
return;
}
if (!match(my_name_for_link(ME, aconf->port), server->name) ||
IsMasked(server))
{
/* I'm masking this server, or it was introduced to us wi... | false | false | false | true | false | 1 |
Callback_Print_Attrs(char *word[], hexchat_event_attrs *attrs, void *userdata)
{
Hook *hook = (Hook *) userdata;
PyObject *retobj;
PyObject *word_list;
PyObject *word_eol_list;
PyObject *attributes;
char **word_eol;
char *word_eol_raw;
int listsize = 0;
int next = 0;
int i;
int ret = 0;
PyObject *plugin;
... | false | false | false | false | false | 0 |
job_modify(struct job_descriptor *job_desc, struct job_record *job_ptr,
uint32_t submit_uid)
{
if (job_desc->time_limit == INFINITE) {
info("Bad replacement time limit for %u", job_desc->job_id);
return ESLURM_INVALID_TIME_LIMIT;
}
return SLURM_SUCCESS;
} | false | false | false | false | false | 0 |
scep_generate_pkcs10_fingerprint(chunk_t pkcs10)
{
chunk_t digest = chunk_alloca(HASH_SIZE_MD5);
hasher_t *hasher;
hasher = lib->crypto->create_hasher(lib->crypto, HASH_MD5);
if (!hasher || !hasher->get_hash(hasher, pkcs10, digest.ptr))
{
DESTROY_IF(hasher);
return chunk_empty;
}
hasher->destroy(hasher);
... | false | false | false | false | false | 0 |
cbuf_rewind (cbuf_t src, int len)
{
int reused;
assert(src != NULL);
if (len < -1) {
errno = EINVAL;
return(-1);
}
if (len == 0) {
return(0);
}
cbuf_mutex_lock(src);
assert(cbuf_is_valid(src));
reused = (src->i_out - src->i_rep + (src->size + 1)) % (src->si... | false | false | false | false | false | 0 |
gst_asteriskh263_chain (GstPad * pad, GstObject * parent, GstBuffer * buf)
{
GstAsteriskh263 *asteriskh263;
GstBuffer *outbuf;
GstFlowReturn ret;
asteriskh263 = GST_ASTERISK_H263 (parent);
{
gint payload_len;
guint8 *payload;
gboolean M;
guint32 timestamp;
guint32 samples;
guint16 as... | false | true | false | false | false | 1 |
isl_flow_alloc(__isl_keep isl_access_info *acc)
{
int i;
struct isl_ctx *ctx;
struct isl_flow *dep;
if (!acc)
return NULL;
ctx = isl_map_get_ctx(acc->sink.map);
dep = isl_calloc_type(ctx, struct isl_flow);
if (!dep)
return NULL;
dep->dep = isl_calloc_array(ctx, struct isl_labeled_map,
2 * acc->n_mus... | false | false | false | false | false | 0 |
file2memory(char **bufp, size_t *size, FILE *file)
{
char *newbuf;
char *buffer = NULL;
size_t alloc = 512;
size_t nused = 0;
size_t nread;
if(file) {
do {
if(!buffer || (alloc == nused)) {
/* size_t overflow detection for huge files */
if(alloc+1 > ((size_t)-1)/2) {
Cur... | false | false | false | false | false | 0 |
addPreRegAlloc(PassManagerBase &PM,
CodeGenOpt::Level OptLevel) {
// FIXME: temporarily disabling load / store optimization pass for Thumb1.
if (OptLevel != CodeGenOpt::None && !Subtarget.isThumb1Only())
PM.add(createARMLoadStoreOptimizationPass(true));
if (OptLevel !... | false | false | false | false | false | 0 |
beep(obj)
CcWnnObject obj;
{
if (JCBUF(obj)->nClause == 0) return;
bell(obj);
} | false | false | false | false | false | 0 |
trash(const KUrl& src, JobFlags flags)
{
KUrl::List srcList;
srcList.append( src );
return CopyJobPrivate::newJob(srcList, KUrl( "trash:/" ), CopyJob::Move, false, flags);
} | false | false | false | false | false | 0 |
stapling_cb(SSL *ssl, void *arg)
{
conn_rec *conn = (conn_rec *)SSL_get_app_data(ssl);
server_rec *s = mySrvFromConn(conn);
SSLSrvConfigRec *sc = mySrvConfig(s);
SSLConnRec *sslconn = myConnConfig(conn);
modssl_ctx_t *mctx = myCtxConfig(sslconn, sc);
certinfo *cinf = NULL;
OCSP_R... | false | false | false | false | false | 0 |
bcd2000_probe(struct usb_interface *interface,
const struct usb_device_id *usb_id)
{
struct snd_card *card;
struct bcd2000 *bcd2k;
unsigned int card_index;
char usb_path[32];
int err;
mutex_lock(&devices_mutex);
for (card_index = 0; card_index < SNDRV_CARDS; ++card_index)
if (!test_bit(card_index, device... | true | true | false | false | false | 1 |
set_is_for_non_editable()
{
m_for_print_layout = true;
m_show_editable_options = false;
//Add labels (because we will hide the checkboxes):
Gtk::Label* label = Gtk::manage(new Gtk::Label(_("Font")));
label->show();
m_hbox_font->pack_start(*label, Gtk::PACK_SHRINK);
label = Gtk::manage(new Gtk::Label(_("F... | false | false | false | false | false | 0 |
BsaveObjectsFind(
void *theEnv)
{
register unsigned i;
SLOT_NAME *snp;
/* ========================================================
The counts need to be saved in case a bload is in effect
======================================================== */
SaveBloadCount(theEnv,ObjectBinaryData(t... | false | false | false | false | false | 0 |
match_attributes_any_p (AtkObject * child, AtkAttributeSet * attributes)
{
int i, k;
AtkAttributeSet *oa;
gint length, oa_length;
length = g_slist_length (attributes);
if (length == 0)
return TRUE;
oa = atk_object_get_attributes (child);
oa_length = g_slist_length (oa);
for (i = 0; i < length; i... | false | false | false | false | false | 0 |
gobj_delete(t_gobj *x, t_glist *glist)
{
if (x->g_pd->c_wb && x->g_pd->c_wb->w_deletefn)
(*x->g_pd->c_wb->w_deletefn)(x, glist);
} | false | false | false | false | false | 0 |
ignore_del (char *mask, struct ignore *ig)
{
if (!ig)
{
GSList *list = ignore_list;
while (list)
{
ig = (struct ignore *) list->data;
if (!rfc_casecmp (ig->mask, mask))
break;
list = list->next;
ig = 0;
}
}
if (ig)
{
ignore_list = g_slist_remove (ignore_list, ig);
free (ig->mask);
fr... | false | false | false | false | false | 0 |
dbiterator_next(dns_dbiterator_t *iterator) {
sdb_dbiterator_t *sdbiter = (sdb_dbiterator_t *)iterator;
sdbiter->current = ISC_LIST_NEXT(sdbiter->current, link);
if (sdbiter->current == NULL)
return (ISC_R_NOMORE);
else
return (ISC_R_SUCCESS);
} | false | false | false | false | false | 0 |
utest_stotrace(ESL_GETOPTS *go, ESL_RANDOMNESS *rng, ESL_ALPHABET *abc, P7_PROFILE *gm, P7_OPROFILE *om, ESL_DSQ *dsq, int L, int ntrace)
{
P7_GMX *gx = NULL;
P7_OMX *ox = NULL;
P7_TRACE *vtr = NULL;
P7_TRACE *tr = NULL;
char errbuf[eslERRBUFSIZE];
int idx;
float maxsc = -eslINFINITY... | true | true | false | false | false | 1 |
readSettings() {
QSettings s;
s.beginGroup(configKey());
QStringList savedShortcuts = s.childKeys();
foreach(const QString &name, _actionByName.keys()) {
if(!savedShortcuts.contains(name))
continue;
Action *action = qobject_cast<Action *>(_actionByName.value(name));
if(action)
action->s... | false | false | false | false | false | 0 |
filter_is_subtype(Slapi_Filter *f)
{
char *p = NULL;
size_t len = 0;
int issubtype = 0;
if (f) {
p = strchr(f->f_type, ';');
if (p) {
len = p - f->f_type;
if (len < strlen(f->f_type)) {
issubtype = 1;
}
}
}
return issubt... | true | true | false | false | false | 1 |
baseCmp(unsigned char c1, unsigned char c2) // c1,c2 == 1=A,2=C (==index of character in nucleic_acid_order[])
// returns 0 for equal
// 1 for probably mutations
// 2 for improbably mutations
{
#define COMPARABLE_BASES 5
if (c1==c2) return 0;
if (c2<c1) // swap
{
int... | false | false | false | false | false | 0 |
apu_square(square_t *chan)
{
int env_delay;
int sweep_delay;
int8 output;
/* reg0: 0-3=volume, 4=envelope, 5=hold, 6-7=duty cycle
** reg1: 0-2=sweep shifts, 3=sweep inc/dec, 4-6=sweep length, 7=sweep on
** reg2: 8 bits of freq
** reg3: 0-2=high freq, 7-4=vbl length counter
*/
if... | false | false | false | false | false | 0 |
Subtract(GeneralMatrix* gm, GeneralMatrix* gm1, GeneralMatrix* gm2)
{
REPORT
Real* s1=gm1->Store(); Real* s2=gm2->Store();
Real* s=gm->Store(); int i=gm->Storage() >> 2;
while (i--)
{
*s++ = *s1++ - *s2++; *s++ = *s1++ - *s2++;
*s++ = *s1++ - *s2++; *s++ = *s1++ - *s2++;
}
i=gm->Stora... | false | false | false | false | false | 0 |
SetLinkDomain(const std::string& Domain)
{
if (Domain.length() == 0)
SetLinkDomain (Link_Unknown);
else if (Domain == "SameServer")
SetLinkDomain (Link_Unknown);
else if (Domain == "Internal")
SetLinkDomain (Link_Internal);
else if (Domain == "External")
SetLinkDomain (Link_External... | false | false | false | false | false | 0 |
canonicalizePath(const string &path) {
#ifdef __GLIBC__
// We're using a GNU extension here. See the 'BUGS'
// section of the realpath(3) Linux manpage for
// rationale.
char *tmp = realpath(path.c_str(), NULL);
if (tmp == NULL) {
int e = errno;
string message;
message = "Cannot resolve the path... | false | false | false | false | false | 0 |
nouveau_object_new(struct nouveau_object *parent, uint64_t handle,
uint32_t oclass, void *data, uint32_t length,
struct nouveau_object **pobj)
{
struct nouveau_device *dev;
struct nouveau_object *obj;
int ret = -EINVAL;
if (length == 0)
length = sizeof(struct nouveau_object *);
obj = malloc(sizeof(*ob... | false | true | false | false | true | 1 |
quantify_u32(unsigned int i, int bits)
{
int high;
if (!bits)
return 0;
if (i)
high = fls_auto(i); // 1 to 32
else
high = 0;
if (high <= bits)
return i;
return i & ~((1 << (high - bits)) - 1);
} | false | false | false | false | false | 0 |
initmask(pattern, Mask, m, D, endposition)
CHARTYPE *pattern;
unsigned *Mask;
register int m, D;
unsigned *endposition;
{
register unsigned Bit1, c;
register int i, j, frag_num;
/* Bit1 = 1 << 31;*/ /* the first bit of Bit1 is 1, others 0. */
Bit1 = (unsigned)0x80000000;
frag_num = D+1;
*endposition = 0;... | false | false | false | false | false | 0 |
nfcwilink_fw_download_receive(struct nfcwilink *drv,
struct sk_buff *skb)
{
struct nci_vs_nfcc_info_rsp *rsp = (void *)skb->data;
/* Detect NCI_VS_NFCC_INFO_RSP and store the result */
if ((skb->len > 3) && (rsp->gid == NCI_VS_NFCC_INFO_RSP_GID) &&
(rsp->oid == NCI_VS_NFCC_INFO_RSP_OID)) {
memcpy(&drv->nf... | false | true | false | false | false | 1 |
tsig_rdata_alg(const knot_rrset_t *tsig)
{
/* Get the algorithm name. */
const knot_dname_t *alg_name = tsig_rdata_alg_name(tsig);
if (!alg_name) {
dbg_tsig("TSIG: rdata: cannot get algorithm name.\n");
return KNOT_TSIG_ALG_NULL;
}
/* Convert alg name to string. */
char *name = knot_dname_to_str(alg_name);
... | false | false | false | false | false | 0 |
movepts_history_delete_last (GGobiData * d, ggobid * gg)
{
gint n;
if ((n = g_slist_length (d->movepts_history)) > 0) {
celld *cell = (celld *) g_slist_nth_data (d->movepts_history, n - 1);
/*-- especially ignore cells with indices == -1 --*/
if (cell->i > -1 && cell->i < d->nrows_in_plot) {
if ... | false | false | false | false | false | 0 |
on_menu_file_print_preview()
{
//Save any recent changes in the document,
//so that the preview will show them:
Document* document = dynamic_cast<Document*>(get_document());
if(!document)
return;
const Glib::ustring original_name = get_original_name();
sharedptr<PrintLayout> print_layout = get_print_la... | false | false | false | false | false | 0 |
shootScreen()
{
QString is_cli = settings->value("ui/cli",
"false").toString();
if (is_cli.contains("false")) {
screenshotPixmap = QPixmap::grabWindow(QApplication::desktop()->winId());
QString format = "png";
QString filePath;
#ifdef WIN32
... | false | false | false | false | false | 0 |
splitline(char *buff, char **key, char **value)
{
char *tmp;
if (!buff[0] || buff[0] == '#')
return 0;
if (strchr(buff, '=') <= buff)
return 0;
/* remove leading spaces */
for (; *buff && isspace(*buff); buff++) ;
if (!*buff) /* empty key */
return 0;
*key = buff;
*value = strchr(buff, '=');
**valu... | true | true | false | false | true | 1 |
xml_parse_vertex(const gchar **names, const gchar **values)
{
gint i=0;
gdouble x[3], n[3], c[3];
g_assert(xml_spatial != NULL);
VEC3SET(x, 0.0, 0.0, 0.0);
VEC3SET(n, 0.0, 0.0, 0.0);
VEC3SET(c, 0.0, 0.0, 0.0);
while (*(names+i))
{
if (g_ascii_strncasecmp(*(names+i), "red", 3) == 0)
c[0] = str_to_float(*(valu... | false | false | false | false | false | 0 |
vector_ensure(vector_t *v, unsigned int num)
{
if (v->allocated > num)
return;
v->slot = REALLOC(v->slot, sizeof(void *) * (v->allocated * 2));
memset(&v->slot[v->allocated], 0, sizeof (void *) * v->allocated);
v->allocated *= 2;
if (v->allocated <= num)
vector_ensure(v, num);
} | false | false | false | false | true | 1 |
subbuf_start_default_callback (struct rchan_buf *buf,
void *subbuf,
void *prev_subbuf,
size_t prev_padding)
{
if (relay_buf_full(buf))
return 0;
return 1;
} | false | false | false | false | false | 0 |
filelayout_set_layoutcommit(struct nfs_pgio_header *hdr)
{
if (FILELAYOUT_LSEG(hdr->lseg)->commit_through_mds ||
hdr->res.verf->committed != NFS_DATA_SYNC)
return;
pnfs_set_layoutcommit(hdr->inode, hdr->lseg,
hdr->mds_offset + hdr->res.count);
dprintk("%s inode %lu pls_end_pos %lu\n", __func__, hdr->inod... | false | false | false | false | false | 0 |
pack_float_SIGNED_RG88(const GLfloat src[4], void *dst)
{
GLushort *d = (GLushort *) dst;
GLbyte r = FLOAT_TO_BYTE(CLAMP(src[RCOMP], -1.0f, 1.0f));
GLbyte g = FLOAT_TO_BYTE(CLAMP(src[GCOMP], -1.0f, 1.0f));
*d = (r << 8) | (g & 0xff);
} | false | false | false | false | false | 0 |
inertia(int igroup, double *cm, double itensor[3][3])
{
int i,j;
int groupbit = bitmask[igroup];
double **x = atom->x;
int *mask = atom->mask;
int *type = atom->type;
tagint *image = atom->image;
double *mass = atom->mass;
double *rmass = atom->rmass;
int nlocal = atom->nlocal;
double dx,dy,dz,ma... | false | false | false | false | false | 0 |
get_icon_source (GladeIconSources *sources,
const gchar *icon_name,
gint index)
{
GList *source_list =
g_hash_table_lookup (sources->sources, icon_name);
if (source_list)
{
if (index < 0)
return NULL;
else
return (GtkIconSource *)g_list_nth_data (source_list, index);
}
return ... | false | false | false | false | false | 0 |
soup_auth_get_property (GObject *object, guint prop_id,
GValue *value, GParamSpec *pspec)
{
SoupAuth *auth = SOUP_AUTH (object);
SoupAuthPrivate *priv = SOUP_AUTH_GET_PRIVATE (object);
switch (prop_id) {
case PROP_SCHEME_NAME:
g_value_set_string (value, soup_auth_get_scheme_name (auth));
break;
case PROP_R... | false | false | false | false | false | 0 |
sas_end_task(struct scsi_cmnd *sc, struct sas_task *task)
{
struct task_status_struct *ts = &task->task_status;
int hs = 0, stat = 0;
if (ts->resp == SAS_TASK_UNDELIVERED) {
/* transport error */
hs = DID_NO_CONNECT;
} else { /* ts->resp == SAS_TASK_COMPLETE */
/* task delivered, what happened afterwards? */... | false | true | false | false | false | 1 |
main(int argc, char **argv)
{
FILE *instream;
char *err = NULL;
sieve_script_t *s;
bytecode_info_t *bc;
int c, fd, usage_error = 0;
char *alt_config = NULL;
while ((c = getopt(argc, argv, "C:")) != EOF)
switch (c) {
case 'C': /* alt config file */
alt_config = optarg;
break;
d... | false | true | false | false | true | 1 |
handleDefFile( void* userData, uint32_t stream,
uint32_t token, const char *name,
uint32_t group, OTF_KeyValueList* kvlist )
{
Control* c= (Control*) userData;
if( c->records[OTF_DEFFILE_RECORD] ) {
++c->num;
if( c->num >= c->minNum && c->num <= c-... | false | false | false | false | false | 0 |
RefreshNewSettings(void)
/* Periodically redraws the screen, in case another process has changed the
mixer settings. */
{
int dev, ii = 0;
for (dev = 0; dev < SOUND_MIXER_NRDEVICES; dev++) {
/* record/play indicators */
if ((1 << dev) & recmask) {
ErrorExitWarn(ReadRecSrc(), 'e');
/* Redraw i... | false | false | false | false | false | 0 |
read(hsStream* S, plResManager* mgr) {
pfGUIControlMod::read(S, mgr);
fControls.setSize(S->readInt());
for (size_t i=0; i<fControls.getSize(); i++)
fControls[i] = mgr->readKey(S);
fDefaultValue = S->readShort();
} | false | false | false | false | false | 0 |
set_var (env, ns, sym, val, filename, linenum)
Environment *env;
StringHashPtr ns;
Node *sym;
Node *val;
char *filename;
unsigned int linenum;
{
Node *n;
Environment *e;
/* Local variables. */
for (e = env; e; e = e->next)
if (strcmp (e->name, sym->u.sym) == 0)
{
node_f... | false | false | false | false | false | 0 |
gtr_code_view_plugin_deactivate (GtrWindowActivatable *activatable)
{
GtrCodeViewPluginPrivate *priv = GTR_CODE_VIEW_PLUGIN (activatable)->priv;
GList *tabs, *l;
GtkTextView *view;
GtrContextPanel *panel;
GtkWidget *notebook;
tabs = gtr_window_get_all_tabs (priv->window);
notebook = GTK_WIDGET (gtr_windo... | false | false | false | false | false | 0 |
cause(delay_type delay, ...)
/* note: the routine parameter is not checked because any routine type can
be passed as a parameter, but in the call struct it's an int (*)()
*/
#endif
{
register call_type call = call_alloc();
#ifdef DOTS_FOR_ARGS
va_list xp;
#endif
if (!call) {
gprintf(ERROR, "cau... | false | false | false | true | false | 1 |
fetion_process_message(fetion_account *account, const gchar *sipmsg)
{
gchar *from;
gchar *sid;
gchar *callid;
gchar *sequence;
gchar *sendtime;
gchar *text;
gchar *sip_text;
fetion_buddy *buddy;
g_return_val_if_fail(account != NULL, ... | false | false | false | false | false | 0 |
s_unpack(PyObject *self, PyObject *inputstr)
{
Py_buffer buf;
char *start;
Py_ssize_t len;
PyObject *args=NULL, *result;
PyStructObject *soself = (PyStructObject *)self;
assert(PyStruct_Check(self));
assert(soself->s_codes != NULL);
if (inputstr == NULL)
goto fail;
if (PyStri... | false | false | false | false | false | 0 |
Curl_expire(struct SessionHandle *data, long milli)
{
struct Curl_multi *multi = data->multi;
struct timeval *nowp = &data->state.expiretime;
int rc;
/* this is only interesting while there is still an associated multi struct
remaining! */
if(!multi)
return;
if(!milli) {
/* No timeout, clear ... | false | false | false | false | false | 0 |
save_cma_presets(struct section_file *file)
{
int i;
secfile_insert_int_comment(file, cmafec_preset_num(),
_("If you add a preset by hand,"
" also update \"number_of_presets\""),
"cma.number_of_presets");
for (i = 0; i < cma... | true | true | false | false | true | 1 |
stats_mapping(struct Client *to, const struct StatDesc* sd, char* param)
{
struct s_map *map;
send_reply(to, RPL_STATSRLINE, "Command", "Name", "Prepend", "Target");
for (map = GlobalServiceMapList; map; map = map->next) {
struct nick_host *nh;
for (nh = map->services; nh; nh = nh->next) {
send_rep... | false | false | false | false | false | 0 |
get_parameter(int param) const
{
switch (param) {
case 1:
return dtime_msec;
case 2:
return vartime;
case 3:
return feedback * 100.0;
case 4:
return lfo.get_parameter(1);
}
return 0.0;
} | false | false | false | false | false | 0 |
bnxt_hwrm_vnic_cfg(struct bnxt *bp, u16 vnic_id)
{
int grp_idx = 0;
struct bnxt_vnic_info *vnic = &bp->vnic_info[vnic_id];
struct hwrm_vnic_cfg_input req = {0};
bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_VNIC_CFG, -1, -1);
/* Only RSS support for now TBD: COS & LB */
req.enables = cpu_to_le32(VNIC_CFG_REQ_ENABLES_DFL... | false | false | false | false | false | 0 |
remount_smb (GVfsBackendNetwork *backend, GVfsJobMount *job)
{
GFile *file;
char *workgroup;
if (! g_mutex_trylock (&backend->smb_mount_lock))
/* Do nothing when the mount operation is already active */
return;
backend->mount_job = job ? g_object_ref (job) : NULL;
if (backend->current_workgroup... | false | false | false | false | false | 0 |
MouseDown( const SDL_MouseButtonEvent &button ) {
if ( ((button.button == SDL_BUTTON_LEFT) ||
(button.button == SDL_BUTTON_RIGHT)) &&
Contains( button.x - surface->LeftEdge(),
button.y - surface->TopEdge() ) ) {
up = (button.button == SDL_BUTTON_LEFT);
Push();
} else if ( Clic... | false | false | false | false | false | 0 |
stripe_fsetattr (call_frame_t *frame, xlator_t *this, fd_t *fd,
struct iatt *stbuf, int32_t valid, dict_t *xdata)
{
stripe_local_t *local = NULL;
stripe_private_t *priv = NULL;
xlator_list_t *trav = NULL;
int32_t op_errno = EINVAL;
VALIDATE_OR_GOT... | false | false | false | false | false | 0 |
get_supported_applications (void)
{
const char *list[] = {
"openpgp",
"nks",
"p15",
"geldkarte",
"dinsig",
/* Note: "undefined" is not listed here because it needs special
treatment by the client. */
NULL
};
int idx;
size_t nbytes;
char *buffer, *p;
for (nbytes=1, idx=... | false | false | false | false | false | 0 |
gst_rmdemux_src_query (GstPad * pad, GstObject * parent, GstQuery * query)
{
gboolean res = FALSE;
GstRMDemux *rmdemux;
rmdemux = GST_RMDEMUX (parent);
switch (GST_QUERY_TYPE (query)) {
case GST_QUERY_POSITION:
GST_DEBUG_OBJECT (rmdemux, "Position query: no idea from demuxer!");
break;
cas... | false | false | false | false | false | 0 |
afr_sh_entry_impunge_check_hardlink (call_frame_t *impunge_frame,
xlator_t *this,
int child_index, struct iatt *stbuf)
{
afr_private_t *priv = NULL;
call_frame_t *frame = NULL;
afr_local_t *im... | false | false | false | false | false | 0 |
RequestData(
vtkInformation *vtkNotUsed(request),
vtkInformationVector **inputVector,
vtkInformationVector *outputVector)
{
// get the info objects
vtkInformation *inInfo = inputVector[0]->GetInformationObject(0);
vtkInformation *outInfo = outputVector->GetInformationObject(0);
// get the input and outpu... | false | false | false | false | false | 0 |
DisplayGuildBankContent(WorldSession* session, uint8 TabId)
{
GuildBankTab const* tab = m_TabListMap[TabId];
if (!IsMemberHaveRights(session->GetPlayer()->GetGUIDLow(), TabId, GUILD_BANK_RIGHT_VIEW_TAB))
return;
WorldPacket data(SMSG_GUILD_BANK_LIST, 1200);
data << uint64(GetGuildBankMoney())... | false | false | false | false | false | 0 |
String2HashType(char *typestr)
{ int i;
for (i = 0; CF_DIGEST_TYPES[i][0] != NULL; i++)
{
if (typestr && strcmp(typestr,CF_DIGEST_TYPES[i][0]) == 0)
{
return (enum cfhashes)i;
}
}
return cf_nohash;
} | false | false | false | false | false | 0 |
client_destroy_rpc (xlator_t *this)
{
int ret = -1;
clnt_conf_t *conf = NULL;
conf = this->private;
if (!conf)
goto out;
if (conf->rpc) {
/* cleanup the saved-frames before last unref */
rpc_clnt_connection_cleanup (&con... | false | false | false | false | false | 0 |
glp_add_cols(glp_prob *lp, int ncs)
{ glp_tree *tree = lp->tree;
GLPCOL *col;
int n_new, j;
if (tree != NULL && tree->reason != 0)
xerror("glp_add_cols: operation not allowed\n");
/* determine new number of columns */
if (ncs < 1)
xerror("glp_add_cols: ncs = %d; inval... | false | 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.