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 |
|---|---|---|---|---|---|---|
gd_main_view_generic_set_rubberband_range (GdMainViewGeneric *self,
GtkTreePath *start,
GtkTreePath *end)
{
RubberbandInfo *info;
info = get_rubber_band_info (self);
if (start == NULL || end == NULL)
{
g_clear_pointer (&info->rubberband_start,
gtk_tree_path_free);
g_clea... | false | false | false | false | false | 0 |
getDepth(const Coordinate& p)
{
vector<DepthSegment*> stabbedSegments;
findStabbedSegments(p, stabbedSegments);
// if no segments on stabbing line subgraph must be outside all others
if (stabbedSegments.size()==0) return 0;
sort(stabbedSegments.begin(), stabbedSegments.end(), DepthSegmentLessThen());
DepthSegm... | false | false | false | false | false | 0 |
individual_retrieval_tests_test_aliases (IndividualRetrievalTests* self) {
Block2Data* _data2_;
GMainLoop* _tmp0_ = NULL;
KfTestBackend* _tmp1_ = NULL;
FolksIndividualAggregator* aggregator = NULL;
FolksIndividualAggregator* _tmp2_ = NULL;
KfTestBackend* _tmp3_ = NULL;
#line 97 "/home/treitter/collabora/folks/tes... | false | false | false | false | false | 0 |
DeepCopy(vtkFieldData *fd)
{
this->Initialize(); //free up memory
vtkDataSetAttributes* dsa = vtkDataSetAttributes::SafeDownCast(fd);
// If the source is a vtkDataSetAttributes
if (dsa)
{
int numArrays = fd->GetNumberOfArrays();
int attributeType, i;
vtkAbstractArray *data, *newData;
// Al... | false | false | false | false | false | 0 |
str2race(str)
char *str;
{
int i, len;
/* Is str valid? */
if (!str || !str[0])
return ROLE_NONE;
/* Match as much of str as is provided */
len = strlen(str);
for (i = 0; races[i].noun; i++) {
/* Does it match the noun? */
if (!strncmpi(str, races[i].noun, len))
return i;
/* Or the fileco... | false | false | false | false | false | 0 |
free_all_cert_matching_data(krb5_context context,
pkinit_cert_matching_data **matchdata)
{
krb5_error_code retval;
pkinit_cert_matching_data *md;
int i;
if (matchdata == NULL)
return EINVAL;
for (i = 0, md = matchdata[i]; md != NULL; md = matchdata[++i]) {
... | false | false | false | false | false | 0 |
st_box_layout_pick (ClutterActor *actor,
const ClutterColor *color)
{
StBoxLayout *self = ST_BOX_LAYOUT (actor);
StBoxLayoutPrivate *priv = self->priv;
StThemeNode *theme_node = st_widget_get_theme_node (ST_WIDGET (actor));
gdouble x, y;
ClutterActorBox allocation_box;
ClutterActor... | false | false | false | false | false | 0 |
TwoFishAlloc(unsigned long len,bool binhex,bool decrypt,TWOFISH *tfdata)
{
/* TwoFishFree(tfdata); */ /* (don't for now) discard whatever was allocated earlier. */
if(decrypt) /* if decrypting... */
{ if(binhex) /* ...and input is binhex encoded... */
len/=2; /* ...use half as much for output. */... | false | false | false | false | false | 0 |
jclass_string_is_primitive_type(const char* type)
{
int prim;
prim = (strcmp("void", type) == 0) ||
(strcmp("byte", type) == 0) ||
(strcmp("char", type) == 0) ||
(strcmp("double", type) == 0) ||
(strcmp("float", type) == 0) ||
(strcmp("int", type) == 0) ||
(strcmp("long", type) == 0) ||
(strcmp... | false | false | false | false | false | 0 |
aim_conn_findbygroup(aim_session_t *sess, fu16_t group)
{
aim_conn_t *cur;
for (cur = sess->connlist; cur; cur = cur->next) {
aim_conn_inside_t *ins = (aim_conn_inside_t *)cur->inside;
struct snacgroup *sg;
for (sg = ins->groups; sg; sg = sg->next) {
if (sg->group == group)
return cur;
}
}
return ... | false | false | false | false | false | 0 |
already_warned(PyObject *registry, PyObject *key, int should_set)
{
PyObject *already_warned;
if (key == NULL)
return -1;
already_warned = PyDict_GetItem(registry, key);
if (already_warned != NULL) {
int rc = PyObject_IsTrue(already_warned);
if (rc != 0)
return rc;
... | false | false | false | false | false | 0 |
cleanUp(){
printf("Cleaning up...\n");
SDL_FreeSurface(hedge);
SDL_FreeSurface(hedge2);
SDL_FreeSurface(hedge3);
SDL_FreeSurface(hedge4);
SDL_FreeSurface(pill);
SDL_FreeSurface(powerpill);
SDL_FreeSurface(grass);
SDL_FreeSurface(grass2);
SDL_FreeSurface(grass3);
SDL_FreeSurface(grass4);
SDL_FreeSurface(bg... | false | false | false | false | false | 0 |
dns_ip64_packet_add(stralloc *out,char *buf,unsigned int len)
{
unsigned int pos;
char header[16];
uint16 numanswers;
uint16 datalen;
pos = dns_packet_copy(buf,len,0,header,12); if (!pos) return -1;
uint16_unpack_big(header + 6,&numanswers);
pos = dns_packet_skipname(buf,len,pos); if (!pos) return -1;
... | true | true | false | false | false | 1 |
git_attr_cache_flush(git_repository *repo)
{
git_attr_cache *cache;
/* this could be done less expensively, but for now, we'll just free
* the entire attrcache and let the next use reinitialize it...
*/
if (repo && (cache = git__swap(repo->attrcache, NULL)) != NULL)
attr_cache__free(cache);
} | false | false | false | false | false | 0 |
rcv_lbnd_col(NPP *npp, void *_info)
{ /* recover column with (non-zero) lower bound */
struct bnd_col *info = _info;
if (npp->sol == GLP_SOL)
{ if (npp->c_stat[info->q] == GLP_BS ||
npp->c_stat[info->q] == GLP_NL ||
npp->c_stat[info->q] == GLP_NU)
npp->c_stat... | false | false | false | false | false | 0 |
cut_sub_process_group_run (CutSubProcessGroup *sub_process_group)
{
CutSubProcessGroupPrivate *priv;
GList *node;
priv = CUT_SUB_PROCESS_GROUP_GET_PRIVATE(sub_process_group);
for (node = priv->sub_processes; node; node = g_list_next(node)) {
CutSubProcess *sub_process = node->data;
if ... | false | false | false | false | false | 0 |
createChecksums(const UnitPtr& u)
{
ChecksumMap result;
ChecksumVisitor visitor(result);
u->visit(&visitor, false);
return result;
} | false | false | false | false | false | 0 |
est_doc_add_attr_mime(ESTDOC *doc, const char *name, const char *value){
char enc[64], *ebuf, *rbuf;
assert(doc && name && value);
ebuf = cbmimedecode(value, enc);
if((rbuf = est_iconv(ebuf, -1, enc, "UTF-8", NULL, NULL)) != NULL){
est_doc_add_attr(doc, name, rbuf);
free(rbuf);
}
free(ebuf);
} | false | false | false | false | false | 0 |
pushOperand(ParameterPtr parameter, Operand::OpSemantic opSemantic, int opMask, int indirectionLevel)
{
mOperands.push_back(Operand(parameter, opSemantic, opMask, indirectionLevel));
} | false | false | false | false | false | 0 |
pproxy_set_trim(const pproxy_set_t *ps)
{
pproxy_set_check(ps);
if (0 == ps->max_proxies)
return; /* Unlimited length */
while (hash_list_length(ps->proxies) > ps->max_proxies) {
gnet_host_t *host = hash_list_remove_tail(ps->proxies);
gnet_host_free(host);
}
} | false | false | false | false | false | 0 |
elementGUISchemeStart(const XMLAttributes& attributes)
{
const String name(attributes.getValueAsString(NameAttribute));
Logger& logger(Logger::getSingleton());
logger.logEvent("Started creation of Scheme from XML specification:");
logger.logEvent("---- CEGUI GUIScheme name: " + name);
// create emp... | false | false | false | false | false | 0 |
set_error_msg( const char * msg )
{
if( !msg ) msg = "";
strncpy( errmsg, msg, sizeof errmsg );
errmsg[sizeof(errmsg)-1] = 0;
} | false | true | false | false | false | 1 |
init_btih_data(struct file_info *info)
{
assert((info->rctx->hash_id & RHASH_BTIH) != 0);
rhash_transmit(RMSG_BT_ADD_FILE, info->rctx, RHASH_STR2UPTR((char*)get_basename(file_info_get_utf8_print_path(info))), (rhash_uptr_t)&info->size);
rhash_transmit(RMSG_BT_SET_PROGRAM_NAME, info->rctx, RHASH_STR2UPTR(PROGRAM_NAME... | false | false | false | false | false | 0 |
irtty_change_speed(struct sir_dev *dev, unsigned speed)
{
struct sirtty_cb *priv = dev->priv;
struct tty_struct *tty;
struct ktermios old_termios;
int cflag;
IRDA_ASSERT(priv != NULL, return -1;);
IRDA_ASSERT(priv->magic == IRTTY_MAGIC, return -1;);
tty = priv->tty;
down_write(&tty->termios_rwsem);
o... | false | false | false | false | false | 0 |
currentToOriginalShmid(int shmid)
{
WRAPPER_EXECUTION_DISABLE_CKPT();
int originalShmid = -1;
_do_lock_tbl();
for (ShmidMapIter i = _originalToCurrentShmids.begin();
i != _originalToCurrentShmids.end();
++i) {
if ( shmid == i->second ) {
originalShmid = i->first;
break;
}
}
... | false | false | false | false | false | 0 |
zend_symtable_exists(Z_ARRVAL_P(orig_array_ptr), var, strlen(var)+1)) {
return 0;
} | false | false | false | false | false | 0 |
ps_string_len(FILE *fp, int *cc, char const *str, int len) {
char const *c;
int score = 0;
for (c = str; c < str+len; c++) {
if (*c < ' ' || *c > '~')
score += 2;
else if (*c == '(' || *c == ')' || *c == '\\')
score += 0;
else
score -= 1;
}
if (score > 0) {
ps_token(fp, cc, "<");... | false | false | false | false | false | 0 |
VisitAssignment(Assignment* expr) {
ASSERT(av_.IsEmpty());
if (expr->target()->AsProperty() != NULL) {
// Visit receiver and key of property store and rhs.
Visit(expr->target()->AsProperty()->obj());
ProcessExpression(expr->target()->AsProperty()->key());
ProcessExpression(expr->value());
// I... | false | false | false | false | false | 0 |
document_get_short_name_for_display (Document* self) {
gchar* result = NULL;
GFile* _tmp0_ = NULL;
GFile* _tmp2_ = NULL;
gchar* _tmp3_ = NULL;
g_return_val_if_fail (self != NULL, NULL);
_tmp0_ = self->priv->_location;
if (_tmp0_ == NULL) {
gchar* _tmp1_ = NULL;
_tmp1_ = document_get_unsaved_document_name (se... | false | false | false | false | false | 0 |
get_build_directory(char *buf)
{
char *p;
if (symbol_exists("schedule"))
get_line_number(symbol_value("schedule"), buf, FALSE);
else if (symbol_exists("do_schedule"))
get_line_number(symbol_value("do_schedule"), buf, FALSE);
else
return NULL;
if ((p = strstr(buf, "/kernel/")))
*p = NULLCHAR;
else
ret... | false | false | false | false | false | 0 |
DefineTSTemplate(List *names, List *parameters)
{
ListCell *pl;
Relation tmplRel;
HeapTuple tup;
Datum values[Natts_pg_ts_template];
bool nulls[Natts_pg_ts_template];
NameData dname;
int i;
Oid dictOid;
Oid namespaceoid;
char *tmplname;
if (!superuser())
ereport(ERROR,
(errcode(ERRCODE_IN... | false | false | false | false | false | 0 |
ospf6_print_lsaprefix(const u_int8_t *tptr, u_int lsa_length)
{
const struct lsa6_prefix *lsapp = (struct lsa6_prefix *)tptr;
u_int wordlen;
struct in6_addr prefix;
if (lsa_length < sizeof (*lsapp) - 4)
goto trunc;
lsa_length -= sizeof (*lsapp) - 4;
TCHECK2(*lsapp, sizeof (*lsapp) - 4);
wordlen = (lsapp->lsa_... | false | false | false | false | false | 0 |
build_rdg_partition_for_component (struct graph *rdg, rdgc c,
bool *part_has_writes)
{
int i, v;
bitmap partition = BITMAP_ALLOC (NULL);
bitmap loops = BITMAP_ALLOC (NULL);
bitmap processed = BITMAP_ALLOC (NULL);
FOR_EACH_VEC_ELT (int, c->vertices, i, v)
if (!already_processed_vertex_p (processed,... | false | false | false | false | false | 0 |
matchv_set_offsets(MatchVector *mv, Offset *offsets)
{
int i;
for (i = 0; i < mv->size; i++) {
mv->matches[i].start_offset = offsets[mv->matches[i].start].start;
mv->matches[i].end_offset = offsets[mv->matches[i].end].end;
}
return mv;
} | false | false | false | false | false | 0 |
gee_hash_map_node_iterator_has_next (GeeHashMapNodeIterator* self) {
gboolean result = FALSE;
gint _tmp0_ = 0;
GeeHashMap* _tmp1_ = NULL;
gint _tmp2_ = 0;
GeeHashMapNode* _tmp3_ = NULL;
GeeHashMapNode* _tmp19_ = NULL;
g_return_val_if_fail (self != NULL, FALSE);
_tmp0_ = self->_stamp;
_tmp1_ = self->_map;
_tmp... | false | false | false | false | false | 0 |
GetMagickPixelPacket(const Image *image,
MagickPixelPacket *pixel)
{
pixel->storage_class=DirectClass;
pixel->colorspace=sRGBColorspace;
pixel->matte=MagickFalse;
pixel->fuzz=0.0;
pixel->depth=MAGICKCORE_QUANTUM_DEPTH;
pixel->red=0.0;
pixel->green=0.0;
pixel->blue=0.0;
pixel->opacity=(MagickRealType... | false | false | false | false | false | 0 |
sockopt_linger(VALUE self)
{
int level = sockopt_level(self);
int optname = sockopt_optname(self);
VALUE data = sockopt_data(self);
struct linger l;
VALUE vonoff, vsecs;
if (level != SOL_SOCKET || optname != SO_LINGER)
rb_raise(rb_eTypeError, "linger socket option expected");
if (RS... | false | false | false | false | false | 0 |
gm_mcp_vmoo_userlist_get_string(GmMcpVmooUserlist *package, MOOVar *v,
MOOType type, gchar *cmp) {
GList *fields = package->priv->fields;
while (fields && strcasecmp(((gchar *) (fields->data)), cmp) != 0) {
fields = fields->next;
if (v) {
v = v->next;
}
}
if (v && v->type == type) {
return g_strdu... | false | false | false | false | false | 0 |
handle_system_exit(void)
{
PyObject *exception, *value, *tb;
int exitcode = 0;
if (Py_InspectFlag)
/* Don't exit if -i flag was given. This flag is set to 0
* when entering interactive mode for inspecting. */
return;
PyErr_Fetch(&exception, &value, &tb);
fflush(stdout);
... | false | false | false | false | false | 0 |
string_splitlines(PyStringObject *self, PyObject *args)
{
int keepends = 0;
if (!PyArg_ParseTuple(args, "|i:splitlines", &keepends))
return NULL;
return stringlib_splitlines(
(PyObject*) self, PyString_AS_STRING(self), PyString_GET_SIZE(self),
keepends
);
} | false | false | false | false | false | 0 |
parseEndTag()
{
Markup *markup = startMarkup(eventsWanted().wantInstanceMarkup(),
currentLocation());
currentInput()->discardInitial();
extendNameToken(syntax().namelen(), ParserMessages::nameLength);
if (markup) {
markup->addDelim(Syntax::dETAGO);
markup->addName(currentInput());
}
String... | false | false | false | false | false | 0 |
proxy_setitem(PyWeakReference *proxy, PyObject *key, PyObject *value)
{
if (!proxy_checkref(proxy))
return -1;
if (value == NULL)
return PyObject_DelItem(PyWeakref_GET_OBJECT(proxy), key);
else
return PyObject_SetItem(PyWeakref_GET_OBJECT(proxy), key, value);
} | false | false | false | false | false | 0 |
end_cb (void * unused)
{
g_return_val_if_fail (playing, FALSE);
if (! playback_error)
song_finished = TRUE;
hook_call ("playback end", NULL);
if (playback_error)
failed_entries ++;
else
failed_entries = 0;
int playlist = playlist_get_playing ();
if (get_bool (NUL... | false | false | false | false | false | 0 |
rr_index_desc(READ_RECORD *info)
{
int tmp= info->file->index_prev(info->record);
if (tmp)
tmp= rr_handle_error(info, tmp);
return tmp;
} | false | false | false | false | false | 0 |
format(const DigitList &number,
UnicodeString& appendTo,
FieldPosition& pos,
UErrorCode &status) const {
// DecimalFormat overrides this function, and handles DigitList based big decimals.
// Other subclasses (ChoiceFormat, RuleBasedNumberFormat) d... | false | false | false | false | false | 0 |
_regexp_match(HSQUIRRELVM v)
{
SETUP_REX(v);
const SQChar *str;
sq_getstring(v,2,&str);
if(sqstd_rex_match(self,str) == SQTrue)
{
sq_pushbool(v,SQTrue);
return 1;
}
sq_pushbool(v,SQFalse);
return 1;
} | false | false | false | false | false | 0 |
AddMessage(int number, FieldType type,
const Descriptor* message_type,
MessageFactory* factory) {
Extension* extension;
if (MaybeNewExtension(number, &extension)) {
extension->type = type;
GOOGLE_DCHECK_EQ(cpp_type(extension->type),... | false | false | false | true | false | 1 |
testSwap()
{
File f1("abc.txt");
File f2("def.txt");
f1.swap(f2);
assert (f1.path() == "def.txt");
assert (f2.path() == "abc.txt");
} | false | false | false | false | false | 0 |
isl_union_set_identity_union_pw_multi_aff(
__isl_take isl_union_set *uset)
{
isl_union_pw_multi_aff *res;
res = isl_union_pw_multi_aff_empty(isl_union_set_get_space(uset));
if (isl_union_set_foreach_set(uset, &identity_upma, &res) < 0)
res = isl_union_pw_multi_aff_free(res);
isl_union_set_free(uset);
return r... | false | false | false | false | false | 0 |
exec_on_server(parmp)
mparm_T *parmp;
{
if (parmp->serverName_arg == NULL || *parmp->serverName_arg != NUL)
{
# ifdef WIN32
/* Initialise the client/server messaging infrastructure. */
serverInitMessaging();
# endif
/*
* When a command server argument was found, execute it. This may
* exit Vim when... | false | false | false | false | false | 0 |
coerce_format_text (NODE_T * p)
{
for (; p != NO_NODE; FORWARD (p)) {
coerce_format_text (SUB (p));
if (IS (p, FORMAT_PATTERN)) {
SOID_T x;
make_soid (&x, STRONG, MODE (FORMAT), 0);
coerce_enclosed (SUB (NEXT_SUB (p)), &x);
} else if (IS (p, GENERAL_PATTERN) && NEXT_SUB (p) != NO_NODE) {... | false | false | false | false | false | 0 |
getItemAt(FXint,FXint y) const {
register FXint index;
y-=pos_y;
for(index=0; index<items.no(); index++){
if(items[index]->y<=y && y<items[index]->y+items[index]->getHeight(this)){
return index;
}
}
return -1;
} | false | false | false | false | false | 0 |
xmlXPathCompParserContext(xmlXPathCompExprPtr comp, xmlXPathContextPtr ctxt) {
xmlXPathParserContextPtr ret;
ret = (xmlXPathParserContextPtr) xmlMalloc(sizeof(xmlXPathParserContext));
if (ret == NULL) {
xmlXPathErrMemory(ctxt, "creating evaluation context\n");
return(NULL);
}
memset... | false | false | false | false | false | 0 |
fimc_subdev_enum_mbus_code(struct v4l2_subdev *sd,
struct v4l2_subdev_pad_config *cfg,
struct v4l2_subdev_mbus_code_enum *code)
{
struct fimc_fmt *fmt;
fmt = fimc_find_format(NULL, NULL, FMT_FLAGS_CAM, code->index);
if (!fmt)
return -EINVAL;
code->code = fmt->mbus_code;
return 0;
} | false | false | false | false | false | 0 |
retranslate()
{
setTitle(tr("Proxy definition"));
setSubTitle(tr("%1 has detected a network proxy on your computer. \n"
"Please check and validate the proxy settings.")
.arg(qApp->applicationName()));
} | false | false | false | false | false | 0 |
plAxisAnimModifier()
: fNotify(NULL), fAllOrNothing(false) { } | false | false | false | false | false | 0 |
OnInstall(cb_unused wxCommandEvent& event)
{
wxFileDialog fd(this,
_("Select plugin to install"),
wxEmptyString, wxEmptyString,
_T("Code::Blocks Plugins (*.cbplugin)|*.cbplugin"),
wxFD_OPEN | wxFD_FILE_MUST_EXIST | wxFD_... | false | false | false | false | false | 0 |
ensFeaturepairCalculateMemsize(const EnsPFeaturepair fp)
{
size_t size = 0;
if (!fp)
return 0;
size += sizeof (EnsOFeaturepair);
size += ensFeatureCalculateMemsize(fp->SourceFeature);
size += ensFeatureCalculateMemsize(fp->TargetFeature);
if (fp->Extradata)
{
size += size... | false | false | false | false | false | 0 |
compute_pause_limit (hardware_parameters_t * hw_parms, int bytes_per_line)
{
int coef_size;
const int coef_mapping[] = { 16, 32 };
int pause_limit;
coef_size = coef_mapping[hw_parms->sensor_resolution & 0x01];
pause_limit = hw_parms->SRAM_size - coef_size - (bytes_per_line / 1024) - 1;
if (pause_limit > 2... | false | false | false | false | false | 0 |
output_escaped_str(char *str)
{
int i,
len = strlen(str);
/* output this char by char as we have to filter " and \n */
for (i = 0; i < len; i++)
{
if (str[i] == '"')
fputs("\\\"", yyout);
else if (str[i] == '\n')
fputs("\\\n", yyout);
else if (str[i] == '\r' && str[i + 1] == '\n')
{
fputs("\... | false | false | false | false | false | 0 |
encrypt_init(const char *name, int server)
{
Encryptions *ep = encryptions;
Name = name;
Server = server;
i_support_encrypt = i_support_decrypt = 0;
remote_supports_encrypt = remote_supports_decrypt = 0;
encrypt_mode = 0;
decrypt_mode = 0;
encrypt_output = 0;
decrypt_input = 0;
#ifd... | false | false | false | false | false | 0 |
cfq_bio_sync(struct bio *bio)
{
return bio_data_dir(bio) == READ || (bio->bi_rw & REQ_SYNC);
} | false | false | false | false | false | 0 |
posix_acl_create (call_frame_t *frame, xlator_t *this, loc_t *loc, int flags,
mode_t mode, mode_t umask, fd_t *fd, dict_t *xdata)
{
mode_t newmode = 0;
newmode = mode;
if (acl_permits (frame, loc->parent, POSIX_ACL_WRITE|POSIX_ACL_EXECUTE))
goto green;
... | false | false | false | false | true | 1 |
quit ()
{
if (!pause_thread)
stop();
end_thread = true;
run_thread.Signal();
thread_ended.Wait();
} | false | false | false | false | false | 0 |
nc_get_var_long(int ncid, int varid, long *value)
{
NC* ncp;
int stat = NC_check_id(ncid, &ncp);
if(stat != NC_NOERR) return stat;
return NC_get_var(ncid,varid,(void*)value, longtype);
} | false | false | false | false | false | 0 |
verity_submit_prefetch(struct dm_verity *v, struct dm_verity_io *io)
{
struct dm_verity_prefetch_work *pw;
pw = kmalloc(sizeof(struct dm_verity_prefetch_work),
GFP_NOIO | __GFP_NORETRY | __GFP_NOMEMALLOC | __GFP_NOWARN);
if (!pw)
return;
INIT_WORK(&pw->work, verity_prefetch_io);
pw->v = v;
pw->block = io->... | false | false | false | false | false | 0 |
filter_colocation_constraint(resource_t * rsc_lh, resource_t * rsc_rh,
rsc_colocation_t * constraint)
{
if (constraint->score == 0) {
return influence_nothing;
}
/* rh side must be allocated before we can process constraint */
if (is_set(rsc_rh->flags, pe_rsc_provis... | false | false | false | false | false | 0 |
radeon_irq_kms_sw_irq_get(struct radeon_device *rdev, int ring)
{
unsigned long irqflags;
if (!rdev->ddev->irq_enabled)
return;
if (atomic_inc_return(&rdev->irq.ring_int[ring]) == 1) {
spin_lock_irqsave(&rdev->irq.lock, irqflags);
radeon_irq_set(rdev);
spin_unlock_irqrestore(&rdev->irq.lock, irqflags);
}
... | false | false | false | false | false | 0 |
set_relative_weights(const ESL_GETOPTS *go, const struct cfg_s *cfg, char *errbuf, ESL_MSA *msa)
{
ESL_STOPWATCH *w = NULL;
if (cfg->be_verbose) {
w = esl_stopwatch_Create();
esl_stopwatch_Start(w);
fprintf(cfg->ofp, "%-40s ... ", "Relative sequence weighting");
fflush(cfg->ofp);
}
... | false | false | false | false | false | 0 |
divide(ptr,tflag)
truc *ptr;
int tflag; /* one of DIVFLAG, MODFLAG, DDIVFLAG */
{
truc res, vec;
truc *vptr;
word2 *y, *hilf;
int len, rlen, n1, n2, sign1, sign2;
n1 = bigretr(ptr,AriScratch,&sign1);
n2 = bigref(ptr+1,&y,&sign2);
hilf = AriScratch + aribufSize;
len = divbig(AriScratch,... | false | false | false | false | false | 0 |
cro_gensumline(FILE *outf, Outchoices *od, int namecode,
unsigned long x, unsigned long x7, logical isaverage) {
char *compsep = od->compsep;
char *name = od->lngstr[namecode];
if (isaverage)
return; /* CRO doesn't display averages */
fprintf(outf, "x%s%c%c%s%lu", compsep, name[0], name[1], compse... | false | false | false | false | false | 0 |
wnck_window_unmaximize (WnckWindow *window)
{
g_return_if_fail (WNCK_IS_WINDOW (window));
_wnck_change_state (WNCK_SCREEN_XSCREEN (window->priv->screen),
window->priv->xwindow,
FALSE,
_wnck_atom_get ("_NET_WM_STATE_MAXIMIZED_VERT"),
... | false | false | false | false | false | 0 |
calcBoundBox()
{
RangeVector range;
BoundBox* bbox = new BoundBox();
for (int n = 1; n < data.nofPoints; n++) {
// A pair of consequtive points as a line
GcPoint* start = data.points[n - 1];
GcPoint* end = data.points[n];
range[0] = start->Pos(X);
range[1] = end->Pos(X);
range[2] = start... | false | false | false | false | false | 0 |
fill_field_row(const Gtk::TreeModel::iterator& iter, const sharedptr<const Field>& field)
{
m_AddDel.set_value_key(iter, field->get_name());
m_AddDel.set_value(iter, m_colName, field->get_name());
const Glib::ustring title = item_get_title(field);
m_AddDel.set_value(iter, m_colTitle, title);
//Type:
//Fi... | false | false | false | false | false | 0 |
lut_set_format(struct v4l2_subdev *subdev, struct v4l2_subdev_pad_config *cfg,
struct v4l2_subdev_format *fmt)
{
struct vsp1_lut *lut = to_lut(subdev);
struct v4l2_mbus_framefmt *format;
/* Default to YUV if the requested format is not supported. */
if (fmt->format.code != MEDIA_BUS_FMT_ARGB8888_1X32 &&
... | false | false | false | false | false | 0 |
one(const String &xname, int ti, const String &datatype_name)
{
String current_test = experiment_test_table(xname);
if (current_test != last_test) {
last_test = current_test;
if (normalizetype == normtype_pertest)
normalization = -1;
if (nextdelta == treetypedelta)
... | false | false | false | false | false | 0 |
anjuta_gtkpod_app_warning(GtkPodApp *gtkpod_app, gchar *message, ...) {
g_return_if_fail(GTK_IS_WINDOW(gtkpod_app));
gchar* msg;
va_list args;
va_start (args, message);
msg = g_strdup_vprintf(message, args);
va_end (args);
anjuta_util_dialog_warning(GTK_WINDOW(gtkpod_app), "%s", msg);
g... | false | false | false | false | false | 0 |
list_slab_objects(struct kmem_cache *s, struct page *page,
const char *text)
{
#ifdef CONFIG_SLUB_DEBUG
void *addr = page_address(page);
void *p;
unsigned long *map = kzalloc(BITS_TO_LONGS(page->objects) *
sizeof(long), GFP_ATOMIC);
if (!map)
return;
slab_err(s, page, text, s->name);
slab_lock(p... | false | false | false | false | false | 0 |
M_MoveFrame (edict_t * self)
{
mmove_t *move;
int index;
move = self->monsterinfo.currentmove;
self->nextthink = level.time + FRAMETIME;
if ((self->monsterinfo.nextframe)
&& (self->monsterinfo.nextframe >= move->firstframe)
&& (self->monsterinfo.nextframe <= move->lastframe))
{
self->s... | false | false | false | false | false | 0 |
static_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec)
{
TpStaticHandleRepo *self = TP_STATIC_HANDLE_REPO (object);
switch (property_id)
{
case PROP_HANDLE_TYPE:
g_value_set_uint (value, self->handle_type);
break;
case PROP_HANDLE_NAMES:
... | false | false | false | false | false | 0 |
vt8251_scr_write(struct ata_link *link, unsigned int scr, u32 val)
{
struct pci_dev *pdev = to_pci_dev(link->ap->host->dev);
int slot = 2 * link->ap->port_no + link->pmp;
u32 v = 0;
switch (scr) {
case SCR_ERROR:
/* devices other than 5287 uses 0xA8 as base */
WARN_ON(pdev->device != 0x5287);
pci_write_conf... | false | false | false | false | false | 0 |
fork_macb(volume* vol, hfsp_fork_raw *fork, UInt8 forktype,
UInt32 cnid, int ofile)
{
UInt64 total = fork->total_size;
UInt32 blksize = vol -> blksize;
size_t size, bytes;
blockiter iter;
char buf[blksize]; /* this is a gcc feature */
blockiter_init(&iter, vol, fork, forktype, c... | false | false | false | false | false | 0 |
acllas__dn_parent( char *dn, int level)
{
char *s, *dnstr;
int inquote;
int curLevel;
int lastLoop = 0;
if ( dn == NULL || *dn == '\0' ) {
return( NULL );
}
/* An X.500-style name, which looks like foo=bar,sha=baz,... */
/* Do we have any dn seprator or not */
if ((strchr(dn,',') == NULL) && (strchr(dn,';... | false | false | false | false | false | 0 |
error(const char *str)
{
if (noiselevel < ERRORS)
return;
if (!gc)
x_error(gettext("Error: %s"), str);
uih_error(gc, str);
} | false | false | false | false | false | 0 |
XmtRegisterSymbol(XmtSymbol s)
#else
void XmtRegisterSymbol(s)
XmtSymbol s;
#endif
{
XrmName name;
if (symbol_table == NULL)
symbol_table = XmtHashTableCreate(3);
if (s->addr == 0) { /* symbol is an immediate value */
/*
* if size > sizeof(XtPointer), an immediate value won't
* actually fit, so iss... | false | false | false | false | false | 0 |
krb5_check_password(const char *principal, const char *password)
{
krb5_error_code code;
krb5_context ctx;
krb5_creds creds;
krb5_principal princ = NULL;
krb5_get_init_creds_opt opts;
bool creds_valid = false;
int result = 0;
code = krb5_init_context(&ctx);
if (code != 0) {
... | false | false | false | false | false | 0 |
stack_flip_card(Stack *src, Stack *dest)
{
if (src->num_cards < 1)
return;
stack_note_undo(src, src->num_cards-1, dest);
doing_undo = 1;
if (src != dest)
{
src->cards[src->num_cards-1] &= ~FACEDOWN;
stack_move_cards(src, src->num_cards-1, dest);
}
else
stack_change_card(dest, dest->num_car... | false | false | false | false | false | 0 |
pc_get_partner(struct map_session_data *sd)
{
nullpo_retr(NULL, sd);
if(!pc_ismarried(sd))
return NULL;
return map_charid2sd(sd->status.partner_id);
} | false | false | false | false | false | 0 |
evthread_enable_lock_debugging(void)
{
struct evthread_lock_callbacks cbs = {
EVTHREAD_LOCK_API_VERSION,
EVTHREAD_LOCKTYPE_RECURSIVE,
debug_lock_alloc,
debug_lock_free,
debug_lock_lock,
debug_lock_unlock
};
if (evthread_lock_debugging_enabled_)
return;
memcpy(&original_lock_fns_, &evthread_lock_fns_,
... | false | true | false | false | false | 1 |
gvfs_udisks2_volume_removed (GVfsUDisks2Volume *volume)
{
if (volume->mount_pending_op != NULL)
mount_cancel_pending_op (volume->mount_pending_op);
if (volume->mount != NULL)
{
gvfs_udisks2_mount_unset_volume (volume->mount, volume);
volume->mount = NULL;
}
if (volume->drive != NULL)
... | false | false | false | false | false | 0 |
getQuickPrintEmbedManager(const char * szEmbedType)
{
// Look in the current collection first.
GR_EmbedManager * pEmbed = NULL;
std::map<std::string, GR_EmbedManager *>::iterator i;
if ((i = m_mapQuickPrintEmbedManager.find(szEmbedType)) != m_mapQuickPrintEmbedManager.end())
return (*i).second;
pEmbed = ... | false | false | false | false | false | 0 |
speex_decorrelate_new(int rate, int channels, int frame_size)
{
int i, ch;
SpeexDecorrState *st = speex_alloc(sizeof(SpeexDecorrState));
st->rate = rate;
st->channels = channels;
st->frame_size = frame_size;
#ifdef VORBIS_PSYCHO
st->psy = vorbis_psy_init(rate, 2*frame_size);
spx_drft_init(&st->look... | false | false | false | false | false | 0 |
get_from_key(CSUBCOLLECTION *_object, const char *key, int len)
{
void *data;
char *tkey;
if (!key || !*key)
return NULL;
if (len <= 0)
len = strlen(key);
//fprintf(stderr, "get_from_key: %.*s\n", len, key);
data = HASH_TABLE_lookup(THIS->hash_table, key, len);
if (!data)
{
tkey = STRING_new... | false | false | false | false | false | 0 |
main(void)
{
List *list;
char id[UUID_STR_LEN + 1];
int i;
gwlib_init();
debug("",0,"List performance test.");
list = gwlist_create();
/* generate UUIDs and populate the list */
debug("", 0, "Creating %d UUIDs for the list.", HUGE_SIZE);
for (i = 0; i < HUGE_SIZE; i++... | true | true | false | false | false | 1 |
stopRendering()
{
if(m_realTextureObj) {
glDeleteTextures(1, &m_realTextureObj);
m_realTextureObj = 0;
m_dataSize[0] = m_dataSize[1] = m_dataSize[2] = -1;
}
if(m_pbo) {
glDeleteBuffersARB(m_numPbo, m_pbo);
delete[]m_pbo;
m_pbo=NULL;
}
} | false | false | false | false | false | 0 |
BackendXidGetPid(TransactionId xid)
{
int result = 0;
ProcArrayStruct *arrayP = procArray;
int index;
if (xid == InvalidTransactionId) /* never match invalid xid */
return 0;
LWLockAcquire(ProcArrayLock, LW_SHARED);
for (index = 0; index < arrayP->numProcs; index++)
{
volatile PGPROC *proc = arrayP->p... | false | false | false | false | true | 1 |
rsi_compare(const void *a, const void *b)
{
u16 _a = *(const u16 *)(a);
u16 _b = *(const u16 *)(b);
if (_a > _b)
return -1;
if (_a < _b)
return 1;
return 0;
} | false | false | false | false | false | 0 |
amitk_volume_volume_intersection_corners(const AmitkVolume * volume1,
const AmitkVolume * volume2,
AmitkCorners return_corners) {
gint i;
g_return_val_if_fail(AMITK_IS_VOLUME(volume1), FALSE);
g_return_val_if_fail(AMITK_IS_VOLUME(volume2), FALSE);
g_return_val_if_fail(AMITK_VOLUME_VALI... | false | false | false | false | false | 0 |
gtk_source_completion_words_buffer_new (GtkSourceCompletionWordsLibrary *library,
GtkTextBuffer *buffer)
{
GtkSourceCompletionWordsBuffer *ret;
g_return_val_if_fail (GTK_SOURCE_IS_COMPLETION_WORDS_LIBRARY (library), NULL);
g_return_val_if_fail (GTK_IS_TEXT_B... | false | false | false | false | false | 0 |
DSDPDataMatFactor(DSDPDataMat A, SDPConeVec W, double*dworknn, int nn0,
double *dwork3n, int nd, int* iwork, int ni){
int info,n;
double *dvecwork;
DSDPFunctionBegin;
if (A.dsdpops->matfactor1){
info=(A.dsdpops->matfactor1)(A.matdata); DSDPChkDataError(A,info);
} else if (A.dsdpops->matfactor2){
... | 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.