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 |
|---|---|---|---|---|---|---|
get_variable(Octstr *text, int start)
{
Octstr *var = NULL;
long end;
int ch;
gw_assert(text != NULL);
gw_assert(start >= 0 && start <= (int) octstr_len(text));
ch = octstr_get_char(text, start);
if (ch == '$') {
var = octstr_create("$");
} else if (ch == '(') {
start ++;
end = oct... | false | false | false | false | false | 0 |
get_folder_offline (CamelStore *store,
const gchar *folder_name,
CamelStoreGetFolderFlags flags,
GError **error)
{
CamelIMAPXStore *imapx_store = CAMEL_IMAPX_STORE (store);
CamelFolder *new_folder = NULL;
CamelStoreInfo *si;
CamelService *service;
CamelSt... | false | false | false | false | false | 0 |
g4x_aux_ctl_reg(struct drm_i915_private *dev_priv,
enum port port)
{
switch (port) {
case PORT_B:
case PORT_C:
case PORT_D:
return DP_AUX_CH_CTL(port);
default:
MISSING_CASE(port);
return DP_AUX_CH_CTL(PORT_B);
}
} | false | false | false | false | false | 0 |
vlog_info(const char *prefix, const char *pattern, va_list ap)
{
fprintf(stdout, "%-*s", INDENT_LEVEL," " );
if(prefix) {
fputs(prefix, stdout);
}
vfprintf(stdout, pattern, ap);
fflush(stdout);
va_end(ap);
} | false | false | false | false | false | 0 |
link_element_to_mixer_with_volume (GstBin * bin, GstElement * element,
GstElement * mixer)
{
GstElement *volume = gst_element_factory_make ("volume", NULL);
GstElement *resample = gst_element_factory_make ("audioresample", NULL);
gst_bin_add (bin, volume);
gst_bin_add (bin, resample);
if (!fast_element_... | false | false | false | false | false | 0 |
onMouseButtonDown(MouseEventArgs& e)
{
// default processing
ItemEntry::onMouseButtonDown(e);
if (e.button == LeftButton)
{
d_popupWasClosed = false;
if (captureInput())
{
d_pushed = true;
updateInternalState(e.position);
d_popupWasClosed = !... | false | false | false | false | false | 0 |
nfs4_callback_getattr(struct cb_getattrargs *args,
struct cb_getattrres *res,
struct cb_process_state *cps)
{
struct nfs_delegation *delegation;
struct nfs_inode *nfsi;
struct inode *inode;
res->status = htonl(NFS4ERR_OP_NOT_IN_SESSION);
if (!cps->clp) /* Always set for v4.0. Set in cb_sequence fo... | false | false | false | false | false | 0 |
fastQueryByFeature(const CWeightingFunctionPointerList& inQuery,
int inNumberOfInterestingImages,
double inThreshold){
#ifndef NOSCREENOUTPUT
cout << "query." << flush << endl;
stampTime();
#endif
//A score for each document,
//each score is initialized with zero
CScoreBoard lS... | false | false | false | false | false | 0 |
gedit_panel_constructed (GObject *object)
{
GeditPanel *panel = GEDIT_PANEL (object);
GtkStyleContext *context;
/* Build the panel, now that we know the orientation
(_init has been called previously) */
context = gtk_widget_get_style_context (GTK_WIDGET (panel));
build_notebook_for_panel (panel);
if (pan... | false | false | false | false | false | 0 |
initialize()
{
for(int i=0; i<DSM_COUNT; ++i)
mInstance[i]=0;
createResources();
mActive = false;
mSSAO = false;
mCurrentMode = DSM_SHOWLIT;
setActive(true);
} | false | false | false | false | false | 0 |
malloc_bytes(size_t size)
{
int i,j;
u_int u;
struct pginfo *bp;
int k;
u_int *lp;
/* Don't bother with anything less than this */
if (size < malloc_minsize)
size = malloc_minsize;
/* Find the right bucket */
j = 1;
i = size-1;
while (i >>= 1)
j++;
/* If it's empty,... | false | false | false | false | true | 1 |
Cudd_bddNewVar(
DdManager * dd)
{
DdNode *res;
if ((unsigned int) dd->size >= CUDD_MAXINDEX - 1) return(NULL);
res = cuddUniqueInter(dd,dd->size,dd->one,Cudd_Not(dd->one));
return(res);
} | false | false | false | false | false | 0 |
smp_fetch_sc_stkctr(struct session *l4, const struct arg *args, const char *kw)
{
static struct stkctr stkctr;
struct stksess *stksess;
unsigned int num = kw[2] - '0';
int arg = 0;
if (num == '_' - '0') {
/* sc_* variant, args[0] = ctr# (mandatory) */
num = args[arg++].data.uint;
if (num >= MAX_SESS_STKCTR)... | false | false | false | false | false | 0 |
clear_storage_via_libcall (object, size)
rtx object, size;
{
tree call_expr, arg_list, fn, object_tree, size_tree;
enum machine_mode size_mode;
rtx retval;
/* OBJECT or SIZE may have been passed through protect_from_queue.
It is unsafe to save the value generated by protect_from_queue
and reuse... | false | false | false | false | false | 0 |
instantiate_scev_r (basic_block instantiate_below,
struct loop *evolution_loop, tree chrec,
bool fold_conversions, htab_t cache, int size_expr)
{
/* Give up if the expression is larger than the MAX that we allow. */
if (size_expr++ > PARAM_VALUE (PARAM_SCEV_MAX_EXPR_SIZE))
return chrec_dont_know;
... | false | false | false | false | true | 1 |
dm_stat_round(struct dm_stat *s, struct dm_stat_shared *shared,
struct dm_stat_percpu *p)
{
/*
* This is racy, but so is part_round_stats_single.
*/
unsigned long long now, difference;
unsigned in_flight_read, in_flight_write;
if (likely(!(s->stat_flags & STAT_PRECISE_TIMESTAMPS)))
now = jiffies;
else
... | false | false | false | false | false | 0 |
UFOOutputMetaInfo(char *basedir,SplineFont *sf) {
FILE *plist = PListCreate( basedir, "metainfo.plist" );
if ( plist==NULL )
return( false );
PListOutputString(plist,"creator","net.SourceForge.FontForge");
#ifdef Version_1
PListOutputInteger(plist,"formatVersion",1);
#else
PListOutputInteger(plist,... | false | false | false | false | false | 0 |
hts221_spi_read(struct device *dev, u8 addr, int len, u8 *data)
{
int err;
struct spi_device *spi = to_spi_device(dev);
struct iio_dev *iio_dev = spi_get_drvdata(spi);
struct hts221_hw *hw = iio_priv(iio_dev);
struct spi_transfer xfers[] = {
{
.tx_buf = hw->tb.tx_buf,
.bits_per_word = 8,
.len = 1,
},... | false | false | false | false | false | 0 |
lcrt_window_on_state_event(GtkWidget *widget, GdkEvent *event, gpointer user_data)
{
debug_where();
struct lcrt_window *lwindow = (struct lcrt_window *)user_data;
if (gdk_window_get_state(GDK_WINDOW(widget->window)) == GDK_WINDOW_STATE_ICONIFIED
&& lwindow->hide == FALSE) {
#if 0
gtk_widge... | false | false | false | false | false | 0 |
_netopen6 (host, serv, typ)
char *host, *serv;
int typ;
{
int s, e;
struct addrinfo hints, *res, *res0;
int gerr;
memset ((char *)&hints, 0, sizeof (hints));
/* XXX -- if problems with IPv6, set to PF_INET for IPv4 only */
#ifdef DEBUG /* PF_INET is the one that works for me */
hints.ai_family = ... | false | false | false | false | true | 1 |
fs_ascii_strcasecmp(const char *s1, const char *s2) {
int c1, c2;
if (s1 == NULL) {
return 0;
}
if (s2 == NULL) {
return 0;
}
while (*s1 && *s2) {
c1 = (int) (unsigned char) TOLOWER (*s1);
c2 = (int) (unsigned char) TOLOWER (*s2);
if (c1 != c2) return (c... | false | false | false | false | false | 0 |
add_ovfetim(word64 etim, i_tev_ndx tevpi, struct tev_t *tevp)
{
struct bt_t *btp, *splthdr, *new_splthdr;
struct telhdr_t *telpp;
__num_ovflqevents++;
/* ---
if (__debug_flg && __ev_tracing)
{
word64 tmp, t;
char s1[RECLEN];
tmp = (word64) __twhsize;
t = __whetime - tmp + 1;
__tr_msg(
".. ad... | false | false | false | false | false | 0 |
command_default(struct iptables_command_state *cs)
{
struct xtables_rule_match *matchp;
struct xtables_match *m;
if (cs->target != NULL &&
(cs->target->parse != NULL || cs->target->x6_parse != NULL) &&
cs->c >= cs->target->option_offset &&
cs->c < cs->target->option_offset + XT_OPTION_OFFSET_SCALE) {... | false | false | false | false | false | 0 |
hpet_fasync(int fd, struct file *file, int on)
{
struct hpet_dev *devp;
devp = file->private_data;
if (fasync_helper(fd, file, on, &devp->hd_async_queue) >= 0)
return 0;
else
return -EIO;
} | false | false | false | false | false | 0 |
showClassInheritance(int c) {
char str[80];
if (classes[c].parent != 0) {
output(", Isa");
printClassName(classes[c].parent);
sprintf(str, "[%d]", classes[c].parent);
output(str);
}
} | false | false | false | false | false | 0 |
isl_schedule_node_has_next_sibling(__isl_keep isl_schedule_node *node)
{
int n, n_child;
int has_parent;
isl_schedule_tree *tree;
if (!node)
return -1;
has_parent = isl_schedule_node_has_parent(node);
if (has_parent < 0 || !has_parent)
return has_parent;
n = isl_schedule_tree_list_n_schedule_tree(node->anc... | false | false | false | false | false | 0 |
gpk_animated_icon_set_frame_delay (GpkAnimatedIcon *icon, guint delay_ms)
{
g_return_val_if_fail (GPK_IS_ANIMATED_ICON (icon), FALSE);
g_debug ("frame delay set to %ims", delay_ms);
icon->frame_delay = delay_ms;
/* do we have to change a running icon? */
if (icon->animation_id != 0) {
g_source_remove (icon->an... | false | false | false | false | false | 0 |
get_ahw(void)
{
/* Calculate the age */
p_ptr->age = rp_ptr->b_age + randint1(rp_ptr->m_age);
/* Calculate the height/weight for males */
if (p_ptr->psex == SEX_MALE)
{
p_ptr->ht = p_ptr->ht_birth = Rand_normal(rp_ptr->m_b_ht, rp_ptr->m_m_ht);
p_ptr->wt = p_ptr->wt_birth = Rand_normal(rp_ptr->m_b_wt, rp_ptr->... | false | false | false | false | false | 0 |
ktest_empty_ad_signedpath(krb5_ad_signedpath *p)
{
int i;
free(p->checksum.contents);
if (p->delegated != NULL) {
for (i = 0; p->delegated[i] != NULL; i++) {
krb5_principal princ = p->delegated[i];
ktest_destroy_principal(&princ);
}
free(p->delegated);
}
... | false | false | false | false | false | 0 |
process(string_ty *dir, const char *nondir, rptidx_where_list_ty *result)
{
string_ty *fn;
int err;
rptidx_ty *data;
trace(("process((dir = \"%s\", nondir = \"%s\"))\n{\n", dir->str_text,
nondir));
fn = str_format("%s/%s", dir->str_text, nondir);
os_become_orig();
e... | false | false | false | false | false | 0 |
CreateWSRP(SOAPEnvelope& soap) {
NS ns;
ns["wsa"]="http://www.w3.org/2005/08/addressing";
ns["wsrf-r"]="http://docs.oasis-open.org/wsrf/r-2";
ns["wsrf-rw"]="http://docs.oasis-open.org/wsrf/rw-2";
ns["wsrf-bf"]="http://docs.oasis-open.org/wsrf/bf-2";
ns["wsrf-rp"]="http://docs.oasis-open.org/wsrf/rp-2";
ns... | false | false | false | false | false | 0 |
set_reference_vars_info (struct cgraph_node *node,
ipa_reference_vars_info_t info)
{
if (!ipa_reference_vars_vector.exists ()
|| ipa_reference_vars_vector.length () <= (unsigned int) node->uid)
ipa_reference_vars_vector.safe_grow_cleared (node->uid + 1);
ipa_reference_vars_vector[node->uid] = info;
} | false | false | false | false | false | 0 |
clearItems(FXbool notify){
register FXTableItem *item;
register FXint r,c;
FXTableRange tablerange;
// End editing
if(0<=input.fm.row && 0<=input.fm.col){
cancelInput();
}
// Notify item will be deleted
if(notify && target){
tablerange.fm.row=0; tablerange.to.row=nrows-1;
tablerange.fm.c... | false | false | false | false | false | 0 |
addbuf( PMPSTR mp, unsigned char *ibuf,int size)
{
struct buf *nbuf;
nbuf = (struct buf*) malloc( sizeof(struct buf) );
if(!nbuf) {
fprintf(stderr,"Out of memory!\n");
return NULL;
}
nbuf->pnt = (unsigned char*) malloc((size_t)size);
if(!nbuf->pnt) {
free(nbuf);
return NULL;
}
nbuf->size = size;
memcp... | false | false | false | false | false | 0 |
convolution_filter_load_args(GwyContainer *settings,
ConvolutionArgs *args)
{
GwyInventory *presets;
const guchar *name;
memset(args, 0, sizeof(ConvolutionArgs));
presets = gwy_convolution_filter_presets();
if (gwy_container_gis_string_by_name(settings, preset_key, &nam... | false | false | false | false | false | 0 |
gst_valve_event (GstPad * pad, GstObject * parent, GstEvent * event)
{
GstValve *valve;
gboolean is_sticky = GST_EVENT_IS_STICKY (event);
gboolean ret = TRUE;
valve = GST_VALVE (parent);
if (g_atomic_int_get (&valve->drop)) {
valve->need_repush_sticky |= is_sticky;
gst_event_unref (event);
} else ... | false | false | false | false | false | 0 |
Oct6100ApiBridgeSetDominantSpeaker(
IN OUT tPOCT6100_INSTANCE_API f_pApiInstance,
IN UINT16 f_usChannelIndex,
IN UINT16 f_usDominantSpeakerIndex )
{
UINT32 ulBaseAddress;
UINT32 ulFeatureBytesOffset;
UINT32 ulFeatureBitOffset;
UINT32 ulFeatureFieldLength;
UINT32 ulResult;
UINT32 ulTemp... | false | false | false | false | false | 0 |
collect_argument_value(Blob *pExtra, const char *zArg){
const char *zValue = find_option(zArg, 0, 1);
if( zValue ){
blob_appendf(pExtra, " --%s %s", zArg, zValue);
}
} | false | false | false | false | false | 0 |
set_send_length(struct hfi1_pportdata *ppd)
{
struct hfi1_devdata *dd = ppd->dd;
u32 max_hb = lrh_max_header_bytes(dd), maxvlmtu = 0, dcmtu;
u64 len1 = 0, len2 = (((dd->vld[15].mtu + max_hb) >> 2)
& SEND_LEN_CHECK1_LEN_VL15_MASK) <<
SEND_LEN_CHECK1_LEN_VL15_SHIFT;
int i;
for (i = 0; i < ppd->vls_suppor... | false | false | false | false | false | 0 |
NullAppender(const log4cplus::helpers::Properties& properties)
: Appender(properties)
{
} | false | false | false | false | false | 0 |
bufport_closer(ScmPort* p){{
#line 247 "libio.scm"
if ((SCM_PORT_DIR(p))==(SCM_PORT_OUTPUT)){{
{ScmObj scmflusher=SCM_OBJ(((p)->src).buf.data);int siz=
((int )((((p)->src).buf.current)-(
((p)->src).buf.buffer)));
if ((siz)>(0)){{
Scm_ApplyRec1(scmflusher,
Scm_MakeString(((p)->src).buf.buffer,siz,siz,
(SCM_STRING_INCOMP... | false | false | false | false | false | 0 |
d(double x, PDFType type,
vector<double const *> const &par, bool give_log) const
{
if (type == PDF_LIKELIHOOD) {
//Avoid expensive normalizing constant
double lambda = LAMBDA(par);
if (x < 0 || (lambda == 0 && x != 0) || R_D_nonint(x) ||
!jags_finite(lambda))
{
return give_log ? JAGS_NEGINF : 0;... | false | false | false | false | false | 0 |
queryCodecPixelTypes( const std::string & filetype ) const
{
std::map< std::string, CodecFactory * >::const_iterator result
= factoryMap.find( filetype );
std::string message("queryCodecPixelTypes(): codec '");
message += filetype + "' does not exist";
vigra_precondition(... | false | false | false | false | false | 0 |
slapd_wait4child(int sig)
{
WAITSTATUSTYPE status;
/* don't log anything from a signal handler:
* you could be holding a lock when the signal was trapped. more
* specifically, you could be holding the logfile lock (and deadlock
* yourself).
*/
#if 0
LDAPDebug( LDAP_DEBUG_AR... | false | false | false | false | false | 0 |
e_util_strcmp(const char *s1, const char *s2)
{
if ((s1) && (s2))
{
if (s1 == s2) return 0;
return strcmp(s1, s2);
}
return 0x7fffffff;
} | false | false | false | false | false | 0 |
Initialize (DBObjData *data, bool flat)
{
DBObjTableField *rowNumFLD;
DBObjTableField *colNumFLD;
DBObjTableField *cellWidthFLD;
DBObjTableField *cellHeightFLD;
DBObjTableField *valueTypeFLD;
DBObjTableField *valueSizeFLD;
DBObjRecord *layerRec;
DataPTR = data;
ItemTable = data->Table (DBrNItems);
switch (d... | false | false | false | false | false | 0 |
good_enc(const int enc)
{
size_t i;
for(i=0; i<sizeof(good_encodings)/sizeof(int); ++i)
if(enc == good_encodings[i]) return TRUE;
return FALSE;
} | false | false | false | false | false | 0 |
visit_decref(PyObject *op, void *data)
{
assert(op != NULL);
if (PyObject_IS_GC(op)) {
PyGC_Head *gc = AS_GC(op);
/* We're only interested in gc_refs for objects in the
* generation being collected, which can be recognized
* because only they have positive gc_refs.
*/
... | false | false | false | false | false | 0 |
dhcp_failover_listener_signal (omapi_object_t *o,
const char *name, va_list ap)
{
isc_result_t status;
omapi_connection_object_t *c;
dhcp_failover_link_t *obj;
dhcp_failover_listener_t *p;
dhcp_failover_state_t *s, *state = (dhcp_failover_state_t *)0;
if (!o || o -> type != dhcp_type_failover_listener)
... | false | false | false | false | false | 0 |
out(Socket * sock) throw(std::exception)
{
if (dontsendbody) {
#ifdef DGDEBUG
std::cout << "dontsendbody true; not sending" << std::endl;
#endif
return;
}
(*sock).readyForOutput(timeout); // exceptions on timeout or error
if (tempfilefd > -1) {
// must have been too big for ram so stream from disk in blocks... | false | false | false | false | false | 0 |
write_dev_cntr(struct hfi1_devdata *dd, int index, int vl, u64 data)
{
struct cntr_entry *entry;
u64 *sval;
entry = &dev_cntrs[index];
sval = dd->scntrs + entry->offset;
if (vl != CNTR_INVALID_VL)
sval += vl;
return write_dev_port_cntr(dd, entry, sval, dd, vl, data);
} | false | false | false | false | false | 0 |
cafebabe_attribute_array_get(const struct cafebabe_attribute_array *array,
const char *name, const struct cafebabe_class *c, unsigned int *r)
{
for (uint16_t i = *r; i < array->count; ++i) {
const struct cafebabe_constant_info_utf8 *attribute_name;
if (cafebabe_class_constant_get_utf8(c,
array->array[i].attrib... | false | false | false | false | false | 0 |
onScaleUpdated()
{
if ( gui_active )
{
gui_active = false;
gtk_spin_button_set_value( GTK_SPIN_BUTTON( brightnessSpinner ), gtk_range_get_value( GTK_RANGE( brightnessScale ) ) );
gtk_spin_button_set_value( GTK_SPIN_BUTTON( contrastSpinner ), gtk_range_get_value( GTK_RANGE( contrastScale ) ) );
g... | false | false | false | false | false | 0 |
round(unsigned int prec) const
{
amount_t temp = *this;
if (! quantity || quantity->prec <= prec) {
if (quantity && quantity->flags & BIGINT_KEEP_PREC) {
temp._dup();
temp.quantity->flags &= ~BIGINT_KEEP_PREC;
}
return temp;
}
temp._dup();
mpz_round(MPZ(temp.quantity), MPZ(temp.quan... | false | false | false | false | false | 0 |
check_ip_mask(const char* text_addr, int bits, struct ip_range* range)
{
if (ip_is_valid_ipv4(text_addr) || ip_is_valid_ipv6(text_addr))
{
struct ip_addr_encap addr;
struct ip_addr_encap mask1;
struct ip_addr_encap mask2;
int af = ip_convert_to_binary(text_addr, &addr); /* 192.168.1.2 */
int maxbits = (af ... | false | false | false | false | false | 0 |
check (void)
{
unsigned char buf[20];
unsigned char *ret;
gcry_error_t err;
gcry_sexp_t sexp;
unsigned int i;
int repn;
for (i = 0; i < (sizeof (key_grips) / sizeof (*key_grips)); i++)
{
if (gcry_pk_test_algo (key_grips[i].algo))
{
if (verbose)
fprintf (stderr, "al... | false | false | false | false | false | 0 |
motorsInit(const MotorPerifDef** motorMapSelect)
{
int i;
//Init structures
GPIO_InitTypeDef GPIO_InitStructure;
TIM_TimeBaseInitTypeDef TIM_TimeBaseStructure;
TIM_OCInitTypeDef TIM_OCInitStructure;
if (isInit)
{
motorsDeInit(motorMap);
}
motorMap = motorMapSelect;
for (i = 0; i < NBR_OF_MO... | false | false | false | false | false | 0 |
SetupWindow( const INT32 *pWindow, int which )
{
if( which!=mPrevWindow )
{ /* only recompute if we're dealing with a new window */
double vw,vh;
mPrevWindow = which;
pWindow += which*0x80/4;
vw = pWindow[0x3c/4];
vh = pWindow[0x40/4];
mCamera.cx = 320+pWindow[0x54/4];
mCamera.cy = 240-p... | false | false | false | false | false | 0 |
mwifiex_pcie_probe(struct pci_dev *pdev,
const struct pci_device_id *ent)
{
struct pcie_service_card *card;
struct mwifiex_private *priv;
struct pci_dev *pdev_host;
pr_debug("info: vendor=0x%4.04X device=0x%4.04X rev=%d\n",
pdev->vendor, pdev->device, pdev->revision);
card = kzalloc(sizeof(struct pcie_se... | false | false | false | false | false | 0 |
GetTagInfo ( LFA_FileRef fileRef, XMP_Uns64 tagPos, TagInfo * info )
{
XMP_Uns8 buffer [11];
LFA_Seek ( fileRef, tagPos, SEEK_SET );
LFA_Read ( fileRef, buffer, 11, kLFA_RequireAll );
info->type = buffer[0];
info->time = GetUns24BE ( &buffer[4] ) || (buffer[7] << 24);
info->dataSize = GetUns24BE ( &buffer[1] ... | false | false | false | false | false | 0 |
soup_session_init (SoupSession *session)
{
SoupSessionPrivate *priv = SOUP_SESSION_GET_PRIVATE (session);
SoupAuthManager *auth_manager;
priv->session = session;
priv->queue = soup_message_queue_new (session);
g_mutex_init (&priv->conn_lock);
g_cond_init (&priv->conn_cond);
priv->http_hosts = g_hash_table_new... | false | false | false | false | false | 0 |
joydev_handle_JSIOCSBTNMAP(struct joydev *joydev,
void __user *argp, size_t len)
{
__u16 *keypam;
int i;
int retval = 0;
len = min(len, sizeof(joydev->keypam));
/* Validate the map. */
keypam = memdup_user(argp, len);
if (IS_ERR(keypam))
return PTR_ERR(keypam);
for (i = 0; i < joydev->nkey; i++) ... | false | false | false | false | false | 0 |
HandleMmapStatsCommand(char* /*args*/)
{
PSendSysMessage("mmap stats:");
PSendSysMessage(" global mmap pathfinding is %sabled", sWorld.getConfig(CONFIG_BOOL_MMAP_ENABLED) ? "en" : "dis");
MMAP::MMapManager* manager = MMAP::MMapFactory::createOrGetMMapManager();
PSendSysMessage(" %u maps loaded with %u... | false | false | false | false | false | 0 |
glfs_h_lookupat (struct glfs *fs, struct glfs_object *parent,
const char *path, struct stat *stat)
{
int ret = 0;
xlator_t *subvol = NULL;
inode_t *inode = NULL;
struct iatt iatt = {0, };
struct glfs_object *object = NULL;
loc_t ... | false | false | false | false | false | 0 |
ibus_registry_serialize (IBusRegistry *registry,
GVariantBuilder *builder)
{
gboolean retval;
retval = IBUS_SERIALIZABLE_CLASS (ibus_registry_parent_class)->
serialize ((IBusSerializable *)registry, builder);
g_return_val_if_fail (retval, FALSE);
GList *p;
GVari... | false | false | false | false | false | 0 |
mooncrst_modify_spritecode(data8_t *spriteram,int *code,int *flipx,int *flipy,int offs)
{
if (gfxbank[2] && ((*code & 0x30) == 0x20))
{
*code = (*code & 0x0f) | (gfxbank[0] << 4) | (gfxbank[1] << 5) | 0x40;
}
} | false | false | false | false | false | 0 |
cr_statement_at_import_rule_set_url (CRStatement * a_this,
CRString * a_url)
{
g_return_val_if_fail (a_this
&& a_this->type == AT_IMPORT_RULE_STMT
&& a_this->kind.import_rule,
CR_BAD_P... | false | false | false | false | false | 0 |
PushParamStack(int tag_type)
{//=============================================
int ix;
PARAM_STACK *sp;
sp = ¶m_stack[n_param_stack];
if(n_param_stack < (N_PARAM_STACK-1))
n_param_stack++;
sp->type = tag_type;
for(ix=0; ix<N_SPEECH_PARAM; ix++)
{
sp->parameter[ix] = -1;
}
return(sp);
} | false | false | false | false | false | 0 |
dlist_filter_i(dlist *head, void* aux, lMapFunc func, BOOLEAN free_data){
if(!func || !head) return head;
dlist *run = head;
do{
if(!func(run->data, aux, run)){
if(run == head){
BOOLEAN first = TRUE;
while(head && run == head && (first || !func(run->data, aux, run))){
head = run = dlist_popfront(ru... | false | false | false | false | false | 0 |
sconf_eval_set_job_category_filtering(lList *param_list, lList **answer_list, const char* param){
bool ret = true;
lListElem *elem = NULL;
DENTER(TOP_LAYER, "sconf_eval_set_job_category_filtering");
is_category_job_filtering= false;
if (!strncasecmp(param, "JC_FILTER=1", sizeof("JC_FILTER=1")-1) ||... | false | false | false | false | true | 1 |
gru_handle_user_call_os(unsigned long cb)
{
struct gru_tlb_fault_handle *tfh;
struct gru_thread_state *gts;
void *cbk;
int ucbnum, cbrnum, ret = -EINVAL;
STAT(call_os);
/* sanity check the cb pointer */
ucbnum = get_cb_number((void *)cb);
if ((cb & (GRU_HANDLE_STRIDE - 1)) || ucbnum >= GRU_NUM_CB)
return -E... | false | false | false | false | false | 0 |
gst_dfbvideosink_update_colorbalance (GstDfbVideoSink * dfbvideosink)
{
g_return_if_fail (GST_IS_DFBVIDEOSINK (dfbvideosink));
if (dfbvideosink->layer) {
DFBColorAdjustment cb_adjust;
cb_adjust.flags = DCAF_NONE;
if (dfbvideosink->brightness >= 0) {
cb_adjust.flags |= DCAF_BRIGHTNESS;
}
... | false | false | false | false | false | 0 |
page_cur_delete_rec(
/*================*/
page_cur_t* cursor, /*!< in/out: a page cursor */
dict_index_t* index, /*!< in: record descriptor */
const ulint* offsets,/*!< in: rec_get_offsets(cursor->rec, index) */
mtr_t* mtr) /*!< in: mini-transaction handle */
{
page_dir_slot_t* cur_dir_slot;
page_dir_slot_t* pre... | false | false | false | false | false | 0 |
getargs(args *a, int argc, char **argv) {
int c;
a->out_file = "-";
a->hit_num = n_def;
a->two_strands = 0;
a->delete_pseudo = D_def;
a->no_delete_pseudo = E_def;
a->insert_pseudo = I_def;
a->no_insert_pseudo = J_def;
a->dirichlet_file = NULL;
/* non-ANSI: */
while ((c = getopt(argc, argv, "ho:n... | false | false | false | false | false | 0 |
dequeue(void)
{
struct worker *q;
WITH_QUEUE_LOCK({
q = worker_queue;
if (q)
worker_queue = q->cdr;
});
if (!q) {
/* no worker is available. Create one */
q = make_worker();
os_create_thread(worker, q);
}
return q;
} | false | false | false | false | false | 0 |
ITR_indexOPR(CTX ctx, tkitr_t *itr, int offset)
{
int i, oppri = 98, idx = -1;
kterm_t tt_found = TT_EOT;
kTerm **ts = itr->ts;
int isTEXTPARAM = 0;
for(i = itr->c + offset; i < itr->e; i++) {
if(TT_(ts[i]) == TT_NAME || TT_(ts[i]) == TT_UNAME) {
isTEXTPARAM = 1;
continue;
}
if(isTEXTPARAM == 1 && TT_i... | false | false | false | false | false | 0 |
getSubElementTag(int index)
{
if ( modelData == NULL || modelData->nofSubElements == 0 )
return NO_INDEX;
if ( index < 0 || index >= modelData->nofSubElements )
return NO_INDEX;
return model->getModelObjectTagById((*modelData->subElementIds)[index]);
} | false | false | false | false | false | 0 |
dmalloc_tag_pnt(const DMALLOC_PNT pnt,char *file,int line)
{
DMALLOC_PNT p=(DMALLOC_PNT)pnt;
if (! dmalloc_in(DMALLOC_DEFAULT_FILE, DMALLOC_DEFAULT_LINE, 1)) {
return;
}
_dmalloc_chunk_tag_pnt(p,file,line);
dmalloc_out();
} | false | false | false | false | false | 0 |
_ZmodF_mul_fft_convolve_modB(unsigned long* out, unsigned long* in1,
unsigned long* in2, unsigned long len)
{
unsigned long i, j;
for (i = 0; i < len; i++)
out[i] = in1[0] * in2[i];
for (i = 1; i < len; i++)
{
for (j = 0; j < len - i; j++)
out[i+j]... | false | false | false | false | false | 0 |
test_setting_gsm_without_number (void)
{
NMSettingGsm *s_gsm;
GError *error = NULL;
gboolean success;
s_gsm = (NMSettingGsm *) nm_setting_gsm_new ();
g_assert (s_gsm);
g_object_set (s_gsm, NM_SETTING_GSM_NUMBER, NULL, NULL);
success = nm_setting_verify (NM_SETTING (s_gsm), NULL, &error);
g_assert_no_error (er... | false | false | false | false | false | 0 |
matchingTracks( const Meta::TrackList& playlist,
int contextCount, int finalCount,
Dynamic::TrackCollectionPtr universe ) const
{
DEBUG_BLOCK;
debug() << "universe:" << universe.data();
m_tracks = Dynamic::TrackSet( universe, true );
m_out... | false | false | false | false | false | 0 |
ws_list_append(WsCompiler *compiler, WsList *list, void *value)
{
WsListItem *item;
if (list == NULL)
/* A recovery code for previous memory allocation problems. */
return;
item = ws_f_calloc(compiler->pool_stree, 1, sizeof(*item));
if (item == NULL) {
ws_error_memory(compiler)... | false | false | false | false | false | 0 |
FocusOutThis(GtkWidget *widget) {
try {
SetFocusState(false);
if (PWidget(wPreedit) != NULL)
gtk_widget_hide(PWidget(wPreedit));
if (im_context != NULL)
gtk_im_context_focus_out(im_context);
} catch (...) {
errorStatus = SC_STATUS_FAILURE;
}
return FALSE;
} | false | false | false | false | false | 0 |
checkSuspiciousSemicolon()
{
if (!_settings->inconclusive || !_settings->isEnabled("warning"))
return;
const SymbolDatabase* const symbolDatabase = _tokenizer->getSymbolDatabase();
// Look for "if(); {}", "for(); {}" or "while(); {}"
for (std::list<Scope>::const_iterator i = symbolDatabase->sc... | false | false | false | false | false | 0 |
charset_url_encode( const std::string& str, const std::string& charset )
{
if( charset.empty() || charset == "UTF-8" ) return MISC::url_encode( str.c_str(), str.length() );
const std::string str_enc = MISC::Iconv( str, "UTF-8", charset );
return MISC::url_encode( str_enc.c_str(), str_enc.length() );
} | false | false | false | false | false | 0 |
filtprog_startget(void *data, void **resp)
{
int res;
struct filtprog *fp = (struct filtprog *) data;
struct filtconn *fc;
res = filtprog_start(fp, fp->filtdat->prog, &fc);
if(res < 0)
return res;
*resp = fc;
return 0;
} | false | false | false | false | false | 0 |
FuncLOAD_STAT (
Obj self,
Obj filename,
Obj crc )
{
StructInitInfo * info = 0;
Obj crc1;
Int k;
Int res;
/* check the argument */
while... | false | false | false | false | false | 0 |
reset_sedra( int hebYr ) /* the hebrew year */
{
date_t tempDt;
int long_c, short_k, rosh_hashana_day, type;
long int rosh_hashana;
long_c = long_cheshvan (hebYr);
short_k = short_kislev (hebYr);
if (long_c && !short_k)
type = COMPLETE;
else if (!long_c && short_k)
... | false | false | false | false | false | 0 |
shiftAlignment(AW_window *aws, long int direction){
AW_root *aw_root = aws->get_root();
AW_selection_list *temp_list = aws->create_selection_list(AWAR_CON_DUMMY,0,"",0,0);
char *selected_alignment = aw_root->awar(AWAR_CON_CONCAT_ALIGNS)->read_string();
if (!selected_alignment || !selected_alignment[0] ... | false | false | false | false | false | 0 |
skb_fillup(struct sk_buff *skb, struct bio *bio, struct bvec_iter iter)
{
int frag = 0;
struct bio_vec bv;
__bio_for_each_segment(bv, bio, iter, iter)
skb_fill_page_desc(skb, frag++, bv.bv_page,
bv.bv_offset, bv.bv_len);
} | false | false | false | false | false | 0 |
mhConfigResponse(mhResponse_t *resp, ...)
{
va_list argp;
/* This is only needed for values that are only known when the request
is received, e.g. WithRequestBody. */
va_start(argp, resp);
while (1) {
mhResponseBldr_t *rb;
rb = va_arg(argp, mhResponseBldr_t *);
if (rb == N... | false | false | false | false | false | 0 |
nm_setting_bond_get_valid_options (NMSettingBond *setting)
{
static const char *array[G_N_ELEMENTS (defaults) + 1] = { NULL };
int i;
/* initialize the array once */
if (G_UNLIKELY (array[0] == NULL)) {
for (i = 0; i < G_N_ELEMENTS (defaults); i++)
array[i] = defaults[i].opt;
array[i] = NULL;
}
return ar... | false | false | false | false | false | 0 |
local_server_create(struct local_server *server, struct local_conf *conf)
{
int fd;
socklen_t len;
struct sockaddr_un local;
if ((fd = socket(AF_UNIX, SOCK_STREAM, 0)) == -1)
return -1;
if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &conf->reuseaddr,
sizeof(conf->reuseaddr)) == -1) {
close(fd);
unlink(c... | false | true | false | false | false | 1 |
_dxf_ExDictionaryPurge (EXDictionary d)
{
int i;
EXDictHead h;
EXDictElement e, ne;
int result;
#ifdef DICT_TIMING
DXMarkTimeLocal("D purge");
#endif
if (! d)
return (FALSE);
if(!_dxd_exRemoteSlave)
_dxf_ExDistributeMsg(DM_FLUSHDICT, (Pointer)d, 0, TOSLAVES);
DICT_LOCK... | false | false | false | false | false | 0 |
init_try( long int ntry )
/*
FUNCTION: initilialize variables appropriately when starting a trial
INPUT: trial number
OUTPUT: none
COMMENTS: none
*/
{
TRACE ( printf("INITIALIZE TRIAL\n"); );
start_timers();
time_used = elapsed_time( VIRTUAL );
time_passed = time_us... | false | false | false | false | false | 0 |
vm_msg_snapshot_alloc(void)
{
struct ast_vm_msg_snapshot *msg_snapshot;
if (!(msg_snapshot = ast_calloc(1, sizeof(*msg_snapshot)))) {
return NULL;
}
if (ast_string_field_init(msg_snapshot, 512)) {
ast_free(msg_snapshot);
return NULL;
}
return msg_snapshot;
} | false | false | false | false | false | 0 |
cid_system_info_param(gs_cid_system_info_t *pcidsi, const ref *prcidsi)
{
ref *pregistry;
ref *pordering;
int code;
if (!r_has_type(prcidsi, t_dictionary))
return_error(e_typecheck);
if (dict_find_string(prcidsi, "Registry", &pregistry) <= 0 ||
dict_find_string(prcidsi, "Ordering", ... | false | false | false | false | false | 0 |
readBurst(void)
{
ipcWarn(wrnlvl(),"%t pA_Connection::readBurst\n");
MSBuffer bbuff;
A d,z=(A)0;
I slen=readFileLength(),slen1,n,s,count;
if(-1==slen)R(A)0;
if(0==slen)
{
static char fmt[]="\343 IPC warning: pA::ReadBurst: read event with no data [%d]\n";
Warn(fmt, handle());
}
/* create buff... | false | false | false | false | true | 1 |
New_Read_Buffer(HITS_DB *db)
{ char *read;
read = (char *) Malloc(db->maxlen+4,"Allocating New Read Buffer");
if (read == NULL)
exit (1);
return (read+1);
} | false | false | false | false | false | 0 |
mqtt3_db_message_timeout_check(struct mosquitto_db *db, unsigned int timeout)
{
int i;
time_t threshold;
enum mosquitto_msg_state new_state = mosq_ms_invalid;
struct mosquitto *context;
struct mosquitto_client_msg *msg;
threshold = mosquitto_time() - timeout;
for(i=0; i<db->context_count; i++){
context = db... | 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.