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 |
|---|---|---|---|---|---|---|
dbDelete(redisDb *db, robj *key) {
/* If VM is enabled make sure to awake waiting clients for this key:
* deleting the key will kill the I/O thread bringing the key from swap
* to memory, so the client will never be notified and unblocked if we
* don't do it now. */
if (server.vm_enabled) handleC... | false | false | false | false | false | 0 |
gap_query_iterators_ALT()
{
guint l_idx;
for(l_idx = 0; l_idx < MAX_ITER_ALT; l_idx++)
{
p_install_proc_iter_ALT (g_iter_ALT_tab[l_idx].proc_name);
}
} | false | false | false | false | false | 0 |
GetBufferInternal(char *buffer, bool &lossyflag) const
{
bool success = false;
if( !success ) success = TryRAWCodec(buffer, lossyflag);
if( !success ) success = TryJPEGCodec(buffer, lossyflag);
if( !success ) success = TryPVRGCodec(buffer, lossyflag); // AFTER IJG trial !
//if( !success ) success = TryKAKADUC... | false | false | false | false | false | 0 |
build_client_config (xlator_t *this, clnt_conf_t *conf)
{
int ret = -1;
if (!conf)
goto out;
GF_OPTION_INIT ("frame-timeout", conf->rpc_conf.rpc_timeout,
int32, out);
GF_OPTION_INIT ("remote-port", conf->rpc_conf.remote_port,... | false | false | false | false | false | 0 |
predicate_refuted_by_simple_clause(Expr *predicate, Node *clause)
{
/* Allow interrupting long proof attempts */
CHECK_FOR_INTERRUPTS();
/* A simple clause can't refute itself */
/* Worth checking because of relation_excluded_by_constraints() */
if ((Node *) predicate == clause)
return false;
/* Try the predi... | false | false | false | false | false | 0 |
__to_dispst_str(char *s, word32 st)
{
switch ((byte) st) {
case ST_HIGHZ: strcpy(s, "Hi"); break;
case ST_SMALL: strcpy(s, "Sm"); break;
case ST_MEDIUM: strcpy(s, "Me"); break;
case ST_WEAK: strcpy(s, "We"); break;
case ST_LARGE: strcpy(s, "La"); break;
case ST_PULL: strcpy(s, "Pu"); break;
case ST_STRON... | false | false | false | false | false | 0 |
markup_entry_new (MarkupDir *dir,
const char *name)
{
MarkupEntry *entry;
entry = g_new0 (MarkupEntry, 1);
entry->name = g_strdup (name);
entry->dir = dir;
dir->entries = g_slist_prepend (dir->entries, entry);
return entry;
} | false | false | false | false | false | 0 |
glade_image_item_editor_finalize (GObject * object)
{
GladeImageItemEditor *item_editor = GLADE_IMAGE_ITEM_EDITOR (object);
if (item_editor->properties)
g_list_free (item_editor->properties);
item_editor->properties = NULL;
item_editor->embed_image = NULL;
item_editor->embed = NULL;
glade_editable_loa... | false | false | false | false | false | 0 |
Create()
{
m_MatchFinder.Create(kHistorySize, kNumOpts + kNumGoodBacks, m_NumFastBytes,
kMatchMaxLen - m_NumFastBytes);
m_MatchLengthEdge = m_NumFastBytes + 1;
if (m_NumPasses > 1)
{
m_OnePosMatchesMemory = new UINT16[kNumGoodBacks * (m_NumFastBytes + 1)];
try
{
m_OnePosMatchesArray = n... | false | false | false | false | false | 0 |
EnvDeleteActivation(
void *theEnv,
void *theActivation)
{
if (theActivation == NULL) RemoveAllActivations(theEnv);
else RemoveActivation(theEnv,(struct activation *) theActivation,TRUE,TRUE);
return(TRUE);
} | false | false | false | false | false | 0 |
_ibar_cb_icon_reset(void *data)
{
IBar_Icon *ic = data;
if (ic->focused)
{
_ibar_icon_signal_emit(ic, "e,state,focused", "e");
if (ic->ibar->inst->ci->show_label)
_ibar_icon_signal_emit(ic, "e,action,show,label", "e");
}
ic->reset_timer = NULL;
return EINA_FALSE;
} | false | false | false | false | false | 0 |
get_model_Buffer ()
{
long index;
index = ERROR_INDEX;
switch (LV_Function) {
case DPGEN_INV:
case DPGEN_BUFF:
case DPGEN_NAND2:
case DPGEN_NAND3:
case DPGEN_NAND4:
case DPGEN_AND2:
case DPGEN_AND3:
case DPGEN_AND4:
case DPGEN_NOR2:
case DPGEN_NOR3:
case DPGEN_NOR4:... | false | false | false | false | false | 0 |
port_match(int port, unsigned int *db_ports)
{
int start, end;
int pass;
int i;
if (!db_ports[0])
return 1;
pass = 0;
for (i = 0; db_ports[i]; i++) {
if (PORT_INTERVAL(db_ports[i])) {
start = ntohs(PORT_VAL(db_ports[i]));
end = ntohs(db_ports[++i]);
if (start <= ntohs(port) && ntohs(port) <= end) {... | false | false | false | false | false | 0 |
x86_rdrand_setup(char *s)
{
setup_clear_cpu_cap(X86_FEATURE_RDRAND);
setup_clear_cpu_cap(X86_FEATURE_RDSEED);
return 1;
} | false | false | false | false | false | 0 |
memset16(void *dest, short val, size_t n)
{
short* dest16 = (short*)dest;
short* end = dest16 + n;
for( ; dest16 < end; dest16++ )
*dest16 = val;
} | false | false | false | false | false | 0 |
H5FD_query(const H5FD_t *f, unsigned long *flags/*out*/)
{
int ret_value = 0; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(f);
HDassert(flags);
/* Check for query driver and call it */
if(f->cls->query)
ret_value = (f->cls->query)(f, flags);
else
*fla... | false | false | false | false | false | 0 |
neg_pos_depth_difference(Plist sos)
{
Plist p;
int neg = 0;
int pos = 0;
for (p = sos; p; p = p->next) {
Topform c = p->v;
if (mixed_clause(c->literals)) {
Literals lit;
int max_pos = 0;
int max_neg = 0;
for (lit = c->literals; lit; lit = lit->next) {
int depth = term_depth(lit-... | false | false | false | false | false | 0 |
set_selected_relationship(const Glib::ustring& relationship_name, const Glib::ustring& related_relationship_name)
{
//Look for the row with this text, and activate it:
Glib::RefPtr<Gtk::TreeModel> model = get_model();
if(model)
{
for(Gtk::TreeModel::iterator iter = model->children().begin(); iter != model->... | false | false | false | false | false | 0 |
addRect(const Rect &rhs)
{
if (isEmpty()) {
iMin = rhs.iMin; iMax = rhs.iMax;
} else if (!rhs.isEmpty()) {
if (rhs.iMax.x > iMax.x)
iMax.x = rhs.iMax.x;
if (rhs.iMin.x < iMin.x)
iMin.x = rhs.iMin.x;
if (rhs.iMax.y > iMax.y)
iMax.y = rhs.iMax.y;
if (rhs.iMin.y < iMin.y)
iM... | false | false | false | false | false | 0 |
hidpp_match_error(struct hidpp_report *question,
struct hidpp_report *answer)
{
return ((answer->rap.sub_id == HIDPP_ERROR) ||
(answer->fap.feature_index == HIDPP20_ERROR)) &&
(answer->fap.funcindex_clientid == question->fap.feature_index) &&
(answer->fap.params[0] == question->fap.funcindex_clientid)... | false | false | false | false | false | 0 |
AnatomicalOrientation(int _dim, char _ao)
{
int j;
for(j=0; j<MET_NUM_ORIENTATION_TYPES; j++)
{
if(_ao == MET_OrientationTypeName[j][0])
{
m_AnatomicalOrientation[_dim] = (MET_OrientationEnumType)j;
return;
}
}
m_AnatomicalOrientation[_dim] = MET_ORIENTATION_UNKNOWN;
} | false | false | false | false | false | 0 |
objbind_new(enum editor_object_type objtype,
gpointer object)
{
struct objbind *ob;
int id;
if (object == NULL) {
return NULL;
}
id = objtype_get_id_from_object(objtype, object);
if (id < 0) {
return NULL;
}
ob = fc_calloc(1, sizeof(*ob));
ob->object_id = ... | false | false | false | false | false | 0 |
markWithoutMove(n) /* Garbage collect cell at n, as if*/
Cell n; { /* it was a cell ref, but don't */
/* move cell (i.e. retain INDIRECT */
/* at top level) so we don't have */
/* to modify the stored value of n */
if (isGenPair(n)) {
recordStackRoot... | false | false | false | false | false | 0 |
ocfs2_locking_ast(struct ocfs2_dlm_lksb *lksb)
{
struct ocfs2_lock_res *lockres = ocfs2_lksb_to_lock_res(lksb);
struct ocfs2_super *osb = ocfs2_get_lockres_osb(lockres);
unsigned long flags;
int status;
spin_lock_irqsave(&lockres->l_lock, flags);
status = ocfs2_dlm_lock_status(&lockres->l_lksb);
if (status ==... | false | false | false | false | false | 0 |
cgroup_get_value_bool(struct cgroup_controller *controller,
const char *name, bool *value)
{
int i;
if (!controller)
return ECGINVAL;
for (i = 0; i < controller->index; i++) {
struct control_value *val = controller->values[i];
if (!strcmp(val->name, name)) {
int cgc_val;
if (sscanf(val->value, ... | false | false | false | false | false | 0 |
GetMetadataItem( const char *pszName,
const char *pszDomain )
{
if (pszDomain != NULL &&EQUAL(pszDomain,"OVERVIEWS") )
{
if (nResolutions > 1 || CSLCount(papszSubDatasets) > 2)
return NULL;
else
{
osOvrFile... | false | false | false | false | false | 0 |
FCEUNET_SendFile(uint8 cmd, char *fn)
{
uint32 len;
uLongf clen;
char *buf, *cbuf;
FILE *fp;
struct stat sb;
if(!(fp=FCEUD_UTF8fopen(fn,"rb"))) return(0);
fstat(fileno(fp),&sb);
len = sb.st_size;
buf = malloc(len);
fread(buf, 1, len, fp);
fclose(fp);
cbuf = malloc(4 + len + len / 1000 + 12);
FCEU_en32ls... | false | false | false | false | true | 1 |
gsb_file_load_category ( const gchar **attribute_names,
const gchar **attribute_values )
{
gint i=0;
if ( buffer_new_div_sous_div )
g_free ( buffer_new_div_sous_div );
buffer_new_div_sous_div = g_malloc0 ( sizeof ( struct new_div_sous_div_struct ) );
if ( !attribute_nam... | false | false | false | false | false | 0 |
vline (const GS &gs, int x, int y, int h)
{
for (int i=h; i; --i)
set_pixel (gs, x, y++);
} | false | false | false | false | false | 0 |
macb_init_hw(struct macb *bp)
{
struct macb_queue *queue;
unsigned int q;
u32 config;
macb_reset_hw(bp);
macb_set_hwaddr(bp);
config = macb_mdc_clk_div(bp);
if (bp->phy_interface == PHY_INTERFACE_MODE_SGMII)
config |= GEM_BIT(SGMIIEN) | GEM_BIT(PCSSEL);
config |= MACB_BF(RBOF, NET_IP_ALIGN); /* Make eth da... | false | false | false | false | false | 0 |
generate (void)
{
automata_num = split_argument;
if (description->units_num < automata_num)
automata_num = description->units_num;
initiate_states ();
initiate_arcs ();
initiate_automata_lists ();
initiate_pass_states ();
initiate_excl_sets ();
initiate_presence_absence_pattern_sets ();
automaton_... | false | false | false | false | false | 0 |
GetTransitivePropertyLinkLibraries(
const char* config,
cmTarget *headTarget,
std::vector<std::string> &libs)
{
cmTarget::LinkInterface const* iface = this->GetLinkInterface(config,
... | false | false | false | false | false | 0 |
main(void)
{
hid_t file, fapl;
hid_t estack_id;
char filename[1024];
const char *FUNC_main = "main";
HDfprintf(stderr, " This program tests the Error API. There're supposed to be some error messages\n");
/* Initialize errors */
if(init_error() < 0)
TEST_... | true | true | false | false | false | 1 |
export_directory_end() const {
if (!ExportDirectory)
return export_directory_iterator(ExportDirectoryEntryRef(nullptr, 0, this));
ExportDirectoryEntryRef Ref(ExportDirectory,
ExportDirectory->AddressTableEntries, this);
return export_directory_iterator(Ref);
} | false | false | false | false | false | 0 |
outverticesMess(GLint vertices) {
m_geoOutVertices=vertices;
if(m_program && glProgramParameteriEXT) {
int temp=m_geoOutVertices;
if(temp<0)
glGetIntegerv(GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT,&temp);
glProgramParameteriEXT(m_program,GL_GEOMETRY_VERTICES_OUT_EXT,temp);
}
} | false | false | false | false | false | 0 |
demarshal_state_reason (NMObject *object, GParamSpec *pspec, GValue *value, gpointer field)
{
NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (object);
if (!G_VALUE_HOLDS (value, DBUS_G_TYPE_UINT_STRUCT))
return FALSE;
dbus_g_type_struct_get (value,
0, &priv->state,
... | false | false | false | false | false | 0 |
create_bootstrap_file(JCR *jcr, char *jobids)
{
RESTORE_CTX rx;
UAContext *ua;
memset(&rx, 0, sizeof(rx));
rx.bsr = new_bsr();
ua = new_ua_context(jcr);
rx.JobIds = jobids;
#define new_get_file_list
#ifdef new_get_file_list
if (!db_open_batch_connexion(jcr, jcr->db)) {
Jmsg0(jcr, M_FATAL, 0... | false | false | false | false | false | 0 |
getAllViews(UT_GenericVector<AV_View *> * vecViews) const
{
PL_ListenerId lid;
PL_ListenerId lidCount = m_vecListeners.getItemCount();
// for each listener in our vector, we send a notification.
// we step over null listners (for listeners which have been
// removed (views that went away)).
for (lid=0; lid<lidC... | false | false | false | false | false | 0 |
dump_lval(ostream&o) const
{
if (sig_) {
o << sig_->name();
if (word_) {
o << "[word=" << *word_ << "]";
}
if (base_) {
o << "[" << *base_ << " +: " << lwid_ << "]";
}
} else {
o << "";
}
} | false | false | false | false | false | 0 |
string_cmp_ic(OnigEncoding enc, int case_fold_flag,
UChar* s1, UChar** ps2, int mblen, const UChar* text_end)
{
UChar buf1[ONIGENC_MBC_CASE_FOLD_MAXLEN];
UChar buf2[ONIGENC_MBC_CASE_FOLD_MAXLEN];
UChar *p1, *p2, *end1, *s2;
int len1, len2;
s2 = *ps2;
end1 = s1 + mblen;
while (s1 < end1) {
len1 ... | false | false | false | false | false | 0 |
CLASS_sizeof_ctype(CLASS *class, CTYPE ctype)
{
size_t size;
if (ctype.id == TC_ARRAY)
{
CLASS_ARRAY *array = class->load->array[ctype.value];
size = CARRAY_get_static_size(class, array);
return (size + 3) & ~3;
}
else if (ctype.id == TC_STRUCT)
{
return CSTRUCT_get_size(class->load->class_ref[ctype.val... | false | false | false | false | false | 0 |
dxf_vertex_init
(
DxfVertex *dxf_vertex
/*!< DXF vertex entity. */
)
{
#if DEBUG
DXF_DEBUG_BEGIN
#endif
/* Do some basic checks. */
if (dxf_vertex == NULL)
{
fprintf (stderr,
(_("WARNING in %s () a NULL pointer was passed.\n")),
... | false | false | false | false | false | 0 |
patternsMap() const
{
PatternsMap patMap;
// This is just to fill in KMimeType::patterns. This has no real effect
// on the actual mimetype matching.
QHash<QString, QStringList>::const_iterator it = m_fastPatterns.begin();
const QHash<QString, QStringList>::const_iterator end = m_fastPatterns.end(... | false | false | false | false | false | 0 |
JNU_Equals(JNIEnv *env, jobject object1, jobject object2)
{
static jmethodID mid = NULL;
if (mid == NULL) {
mid = (*env)->GetMethodID(env, JNU_ClassObject(env), "equals",
"(Ljava/lang/Object;)Z");
}
return (*env)->CallBooleanMethod(env, object1, mid, object2);
} | false | false | false | false | false | 0 |
totp_sync(char *otp_value, char *digest_name, unsigned char *key,
unsigned int keylen, unsigned int time_step, unsigned int ndigits,
unsigned int base, int *offset)
{
int rc, window;
char *hval;
time_t now;
time(&now);
/* Check for the expected value first. */
hval = auth_totp_value(digest_name, k... | false | false | false | false | false | 0 |
write_headers_date(const gchar *uid)
{
gchar subject[512];
gchar *t_subject;
gchar date[128];
time_t t;
struct tm lt;
struct tm buft;
memset(subject, 0, sizeof(subject));
memset(date, 0, sizeof(date));
if (!strcmp(uid, EVENT_PAST_ID)) {
t = 1;
t_subject = _("Past");
} else if (!strcmp(uid, EVENT_TODAY_... | false | false | false | false | false | 0 |
ario_songlist_songlists_selection_drag_foreach (GtkTreeModel *model,
GtkTreePath *path,
GtkTreeIter *iter,
gpointer userdata)
{
ARIO_LOG_FUNCTION_START;
GString... | false | false | false | false | false | 0 |
submodule_cache_alloc(
git_submodule_cache **out, git_repository *repo)
{
git_submodule_cache *cache = git__calloc(1, sizeof(git_submodule_cache));
GITERR_CHECK_ALLOC(cache);
if (git_mutex_init(&cache->lock) < 0) {
giterr_set(GITERR_OS, "Unable to initialize submodule cache lock");
git__free(cache);
return -... | false | false | false | false | false | 0 |
defer() const
{
if(!impl) return 0;
return !((ElementImpl *)impl)->getAttribute(ATTR_DEFER).isNull();
} | false | false | false | false | false | 0 |
jpeg_skip_block(unsigned char *d, size_t len) {
int l;
if (len < 2) return NULL;
l = jpegcount(d);
if (l > len) return NULL;
return d + l;
} | false | false | false | false | false | 0 |
begin_contour(int *pln, int *pcode, int *cp) throw(ParserError) {
string data_file;
vector<double> cval;
vector<string> clab;
// Create new contourinfo object
if (g_ContourInfo != NULL) {
delete g_ContourInfo;
g_ContourInfo = NULL;
}
g_ContourInfo = new GLEContourInfo();
// Start with pcode from the next li... | false | false | false | false | false | 0 |
__vpn_provider_delete(struct vpn_provider *provider)
{
DBG("Deleting VPN %s", provider->identifier);
connection_removed_signal(provider);
provider_unregister(provider);
__connman_storage_remove_provider(provider->identifier);
g_hash_table_remove(provider_hash, provider->identifier);
return 0;
} | false | false | false | false | false | 0 |
_validate_mirror_params(const struct cmd_context *cmd __attribute__((unused)),
const struct lvcreate_params *lp)
{
int pagesize = lvm_getpagesize();
if (lp->region_size & (lp->region_size - 1)) {
log_error("Region size (%" PRIu32 ") must be a power of 2",
lp->region_size);
return 0;
}
if (lp->regi... | false | false | false | false | false | 0 |
wm8988_set_bias_level(struct snd_soc_codec *codec,
enum snd_soc_bias_level level)
{
struct wm8988_priv *wm8988 = snd_soc_codec_get_drvdata(codec);
u16 pwr_reg = snd_soc_read(codec, WM8988_PWR1) & ~0x1c1;
switch (level) {
case SND_SOC_BIAS_ON:
break;
case SND_SOC_BIAS_PREPARE:
/* VREF, VMID=2x50k, digita... | false | false | false | false | false | 0 |
what()
{
std::ostringstream message;
message << "\nIn Vector "<< _name << ", vector index " << _index << " exceeds bounds 1-"
<< _max << "\n";
std::string outputMessage = message.str();
return outputMessage.c_str();
} | false | false | false | false | false | 0 |
flags3 FCN((not))
boolean not C1("")
{
prn_contents= BOOLEAN(PRN_CONTENTS^not);
prn_index= BOOLEAN(PRN_INDEX^not);
prn_modules= BOOLEAN(PRN_MODULES^not);
xref_unnamed= BOOLEAN(XREF_UNNAMED^not);
if(!(*pa))
{
*pa= '*';
*(pa+1)= '\0';
}
for(;*pa;pa++)
switch(*pa)
{
case '*':
case '/':
prn_contents= NOT(PRN_CONTENTS);
p... | false | false | false | false | false | 0 |
client_get_services_cb (SwClient *client,
const GList *services,
gpointer userdata)
{
BishoFrame *frame = BISHO_FRAME (userdata);
const GList *l;
for (l = services; l; l = l->next) {
construct_ui (frame, l->data);
}
} | false | false | false | false | false | 0 |
netprop_vpiget(struct h_t *hp, int32 prop)
{
int32 biti;
struct net_t *np;
struct hrec_t *hrp;
hrp = hp->hrec;
if (hrp->htyp == vpiNetBit)
{
if (hrp->bith_ndx) np = hrp->hu.hnp;
else np = hrp->hu.hxp->lu.x->lu.sy->el.enp;
}
else np = hrp->hu.hnp;
switch (prop) {
case vpiExpanded: return(TRUE);
c... | false | false | false | false | false | 0 |
canon_customfunctions_unk(FILE *inptr,unsigned short byteorder,char *tagprefix,
unsigned long offset,unsigned long dirlength,int indent)
{
unsigned long count;
unsigned long end_offset;
unsigned short length,value;
int i,cfn,cfv;
int chpr = 0;
length = read_ushort(inptr,... | false | false | false | false | false | 0 |
establish_ppp (int linkunit)
{
if (ioctl(lns[linkunit].fd, PPPIOCGUNIT, &lns[linkunit].ifunit) < 0) {
syslog(LOG_ERR, "ioctl(PPPIOCGUNIT): %m");
lns[linkunit].ifunit = -1;
return;
}
lns[linkunit].master = -1;
sprintf(lns[linkunit].ifname,"%s%d","ippp",lns[linkunit].ifunit);
if( ioctl(lns[linkunit].fd, PPPIO... | false | true | false | false | false | 1 |
primer_design_restore_config(AW_window *aww, const char *stored_string, AW_CL , AW_CL ) {
AWT_config_definition cdef(aww->get_root(), primer_design_config_mapping);
cdef.write(stored_string);
primer_design_event_update_memory(aww);
} | false | false | false | false | false | 0 |
newprocinit(void)
{
#if SOCKS_SERVER /* don't want to override original clients stuff. */
sockscf.state.pid = getpid();
if (sockscf.log.type & LOGTYPE_SYSLOG) {
closelog();
/*
* LOG_NDELAY so we don't end up in a situation where we
* have no free descriptors and haven't yet syslog-ed anything.
*/
op... | false | false | false | false | false | 0 |
gwy_data_view_size_request(GtkWidget *widget,
GtkRequisition *requisition)
{
GwyDataView *data_view;
const gchar *key;
gwy_debug(" ");
data_view = GWY_DATA_VIEW(widget);
requisition->width = requisition->height = 2;
if (!data_view->base_layer)
return;
key... | false | false | false | false | false | 0 |
numberOfMatches( const QString & tagpart, bool partial )
{
unsigned int n = 0;
if ( tagpart.isEmpty() ) return 0;
ctags::tagFileInfo info;
ctags::tagFile * file = ctags::tagsOpen( _tagsfile.toLocal8Bit(), &info );
ctags::tagEntry entry;
QByteArray tagpartBArray = tagpart.toLocal8Bit(); // for holding the char ... | false | false | false | false | false | 0 |
multipath_clean( void )
{
int i;
mentry *me, *tmp;
/*clean hash first*/
pthread_mutex_destroy( &hash_lock );
if( mhash )
{
for( i = 0 ; i < mhash_size ; i ++ )
{
if( ! mhash[ i ] ) continue;
me = mhash[ i ];
while( me )
{
tmp = me;
me = me->next;
free( tmp );
}
}
free( mhash )... | false | false | false | false | false | 0 |
gauche__threadsgauche_thread_type(ScmObj *SCM_FP, int SCM_ARGCNT, void *data_)
{
ScmObj SCM_SUBRARGS[0];
int SCM_i;
SCM_ENTER_SUBR("gauche-thread-type");
for (SCM_i=0; SCM_i<0; SCM_i++) {
SCM_SUBRARGS[SCM_i] = SCM_ARGREF(SCM_i);
}
{
{
ScmObj SCM_RESULT;
#line 77 "./threads.scm"
#if 0 /*dummy*/
#elif d... | false | false | false | false | false | 0 |
getPageNameInternal(char *s)
{
char *pagename = s + sizeof(PAGENAME) - 1;
char *quote = strchr(pagename, '"');
if (!quote) { /* TG: returns NULL, not \0 */
log(("getPageNameInternal(): Cannot find trailing quote in pagename: %s\n", pagename));
return NULL;
}
*quote = '\0';
log(("getPageName(): pagename = %s\... | false | false | false | false | false | 0 |
sfc_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs)
{
const struct efx_nic_reg *reg;
const struct efx_nic_reg_table *table;
unsigned revision = regs->version;
const void *buf = regs->data;
const void *end = regs->data + regs->len;
if (revision > REGISTER_REVISION_ED)
return -1;
for (reg = ... | false | false | false | false | false | 0 |
GMenuIsCommand(GEvent *event,char *shortcut) {
GMenuItem foo;
unichar_t keysym = event->u.chr.keysym;
if ( event->type!=et_char )
return( false );
if ( keysym<GK_Special && islower(keysym))
keysym = toupper(keysym);
memset(&foo,0,sizeof(foo));
GMenuItemParseShortCut(&foo,shortcut);
ret... | false | false | false | false | false | 0 |
upqm_exec(struct ast_channel *chan, const char *data)
{
char *parse;
AST_DECLARE_APP_ARGS(args,
AST_APP_ARG(queuename);
AST_APP_ARG(interface);
AST_APP_ARG(options);
AST_APP_ARG(reason);
);
if (ast_strlen_zero(data)) {
ast_log(LOG_WARNING, "UnpauseQueueMember requires an argument ([queuename],interface[,... | false | false | false | false | false | 0 |
visit_managers (boost::function1<bool, VideoInputManager &> visitor) const
{
PWaitAndSignal m(core_mutex);
bool go_on = true;
for (std::set<VideoInputManager *>::const_iterator iter = managers.begin ();
iter != managers.end () && go_on;
iter++)
go_on = visitor (*(*iter));
} | false | false | false | false | false | 0 |
guild_get_skilltree_max(int id)
{
int idx = id - GUILD_SKILLID;
if(idx < 0 || idx >= MAX_GUILDSKILL)
return 0;
return guild_skill_max[idx];
} | false | false | false | false | false | 0 |
Devices_H_MakeDirectory(void)
{
if (devbug)
Log_print("MKDIR Command");
CHECK_READ_ONLY;
if (Devices_GetHostPath(FALSE) == 0)
return;
if (Devices_MakeDirectory(host_path)) {
CPU_regY = 1;
CPU_ClrN;
}
else {
CPU_regY = 144; /* device done error */
CPU_SetN;
}
} | false | false | false | false | false | 0 |
open_archive_file(FILE **fp, char *file_name, struct header *header)
{
*fp = fopen(file_name, "rb");
if (!*fp)
{
return 1;
}
read_word();
header->check_code1 = read_word();
header->check_code2 = read_word();
header->total_size = read_word();
header->zero = read_word();
header->thirty_two = read_word();
he... | false | false | false | false | false | 0 |
k5_ad_module_count(krb5plugin_authdata_client_ftable_v0 *table)
{
int i;
if (table->ad_type_list == NULL)
return 0;
for (i = 0; table->ad_type_list[i]; i++)
;
return i;
} | false | false | false | false | false | 0 |
k12text_seek_read(wtap *wth, gint64 seek_off, struct wtap_pkthdr *phdr, Buffer *buf, int *err, char **err_info)
{
if ( file_seek(wth->random_fh, seek_off, SEEK_SET, err) == -1) {
return FALSE;
}
k12text_reset(wth->random_fh); /* init lexer buffer and vars set by lexer */
BEGIN(NEXT_FRAME);
K12Text_lex();
if ... | false | true | false | false | false | 1 |
assign_element_names()
{
for (int i = 0; i < _elements.size(); i++)
if (_elements[i]->name_unassigned())
assign_element_name(i);
} | false | false | false | false | false | 0 |
city_units_upkeep(const struct city *pcity)
{
int free[O_LAST], cost;
struct unit_type *ut;
struct player *plr;
bool update;
if (!pcity || !pcity->units_supported
|| unit_list_size(pcity->units_supported) < 1) {
return;
}
memset(free, 0, O_LAST * sizeof(*free));
output_type_iterate(o) {
... | false | false | false | false | false | 0 |
parse_struct_element(xmlDocPtr doc, xmlNodePtr node,
XMLRPCDocument *xrdoc, Dict *members)
{
Octstr *name;
size_t i;
XMLRPCMember *member;
/*
* check if the element is allowed at this level
*/
if (node->name == NULL) {
error(0, "XMLRPC: XML struct... | false | false | false | false | false | 0 |
joystick_update(double dcycs)
{
struct js_event js; /* the linux joystick event record */
int mask;
int val;
int num;
int type;
int ret;
int len;
int i;
/* suck up to 20 events, then give up */
len = sizeof(struct js_event);
for(i = 0; i < 20; i++) {
ret = read(g_joystick_native_fd, &js, len);
if(ret !=... | false | false | false | false | false | 0 |
setContext(UDisplayContext value, UErrorCode& status)
{
if (U_FAILURE(status))
return;
if ( (UDisplayContextType)((uint32_t)value >> 8) == UDISPCTX_TYPE_CAPITALIZATION ) {
fCapitalizationContext = value;
} else {
status = U_ILLEGAL_ARGUMENT_ERROR;
}
} | false | false | false | false | false | 0 |
sayPronoun(int instance) {
if (instances[instance].pronoun != 0)
output(wordWithCode(PRONOUN_BIT, instances[instance].pronoun));
else
sayInheritedPronoun(instances[instance].parent);
} | false | false | false | false | false | 0 |
dom_node_next_sibling_read(dom_object *obj, zval **retval TSRMLS_DC)
{
xmlNode *nodep, *nextsib;
int ret;
nodep = dom_object_get_node(obj);
if (nodep == NULL) {
php_dom_throw_error(INVALID_STATE_ERR, 0 TSRMLS_CC);
return FAILURE;
}
nextsib = nodep->next;
if (!nextsib) {
return FAILURE;
}
ALLOC_ZVAL(*... | false | false | false | false | false | 0 |
tg3_rx_ret_rcbs_init(struct tg3 *tp)
{
int i = 0;
u32 rxrcb = NIC_SRAM_RCV_RET_RCB;
if (tg3_flag(tp, ENABLE_RSS))
i++;
for (; i < tp->irq_max; i++, rxrcb += TG3_BDINFO_SIZE) {
struct tg3_napi *tnapi = &tp->napi[i];
if (!tnapi->rx_rcb)
continue;
tg3_set_bdinfo(tp, rxrcb, tnapi->rx_rcb_mapping,
... | false | false | false | false | false | 0 |
CreateTexture()
{
if (this->Context && !this->Handle)
{
GLuint tex=0;
glGenTextures(1, &tex);
vtkGraphicErrorMacro(this->Context,"__FILE__ __LINE__");
this->Handle=tex;
if (this->Target)
{
glBindTexture(this->Target, this->Handle);
vtkGraphicErrorMacro(this->Context,"__FILE_... | false | false | false | false | false | 0 |
CWINDOW_define_mask(CWINDOW *_object)
{
QPixmap background;
QColor c;
QPalette palette;
//qDebug("define_mask: (%s %p) picture = %p masked = %d", GB.GetClassName(THIS), THIS, THIS->picture, THIS->masked);
//if (THIS->embedded)
// return;
if (THIS->picture)
background = *(THIS->picture->pixmap);
if (bac... | false | false | false | true | false | 1 |
archive_write_mtree_close(struct archive_write *a)
{
struct mtree_writer *mtree= a->format_data;
int ret;
if (mtree->root != NULL) {
ret = write_mtree_entry_tree(a);
if (ret != ARCHIVE_OK)
return (ARCHIVE_FATAL);
}
archive_write_set_bytes_in_last_block(&a->archive, 1);
return __archive_write_output(a, m... | false | false | false | false | false | 0 |
gnumeric_sort (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
{
gnm_float *xs;
int i, j, n;
GnmValue *result = NULL;
xs = collect_floats_value (argv[0], ei->pos,
COLLECT_IGNORE_STRINGS |
COLLECT_IGNORE_BOOLS |
COLLECT_IGNORE_BLANKS |
COLLECT_SORT,
&n, &result);
if (result)
... | false | false | false | false | false | 0 |
SplineSetQuickTop(SplineSet *ss) {
real max = -1e10;
SplinePoint *sp;
for ( ; ss!=NULL; ss=ss->next ) {
for ( sp=ss->first; ; ) {
if ( sp->me.y > max ) max = sp->me.y;
if ( sp->next==NULL )
break;
sp = sp->next->to;
if ( sp==ss->first )
break;
}
}
if ( max<-65536 ) max = 0; ... | false | false | false | false | false | 0 |
_e_border_menu_cb_move(void *data, E_Menu *m __UNUSED__, E_Menu_Item *mi __UNUSED__)
{
E_Border *bd;
bd = data;
if (!bd->lock_user_location)
e_border_act_move_keyboard(bd);
} | false | false | false | false | false | 0 |
evas_object_table_homogeneous_set(Evas_Object *o, Evas_Object_Table_Homogeneous_Mode homogeneous)
{
EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN(o, priv);
if (priv->homogeneous == homogeneous)
return;
priv->homogeneous = homogeneous;
_evas_object_table_cache_invalidate(priv);
evas_object_smart_changed(o);
} | false | false | false | false | false | 0 |
ibv_cmd_destroy_qp(struct ibv_qp *qp)
{
struct ibv_destroy_qp cmd;
struct ibv_destroy_qp_resp resp;
IBV_INIT_CMD_RESP(&cmd, sizeof cmd, DESTROY_QP, &resp, sizeof resp);
cmd.qp_handle = qp->handle;
cmd.reserved = 0;
if (write(qp->context->cmd_fd, &cmd, sizeof cmd) != sizeof cmd)
return errno;
(void) VA... | false | false | false | false | false | 0 |
tsrm_strndup(const char *s, size_t length) /* {{{ */
{
char *p;
p = (char *) malloc(length+1);
if (!p) {
return (char *)NULL;
}
if (length) {
memcpy(p,s,length);
}
p[length]=0;
return p;
} | false | false | false | false | false | 0 |
startCapture(Listener *listener)
{
if(mCaptureCount == 0)
QMetaObject::invokeMethod(mTask, "start");
++mCaptureCount;
mListeners.insert(listener);
} | false | false | false | false | false | 0 |
_findProjection_GCSRS ( const char* p, double lat_ts )
{
int iProj;
GCProjectionInfo* proj;
for( iProj= 0, proj= &(gk_asProjList[0]);
GetInfoProjID_GCSRS(proj)!=-1;
iProj++, proj= &(gk_asProjList[iProj]) )
{
if( iProj==0 && p==NULL)
break;
if( iProj==1 &&
( EQUAL(p,SRS_PT_T... | false | false | false | false | false | 0 |
GEOSBufferWithParams_r(GEOSContextHandle_t extHandle, const Geometry *g1, const BufferParameters* bp, double width)
{
using geos::operation::buffer::BufferOp;
if ( 0 == extHandle ) return NULL;
GEOSContextHandleInternal_t *handle = 0;
handle = reinterpret_cast<GEOSContextHandleInternal_t*>(extHandle);... | false | false | false | false | false | 0 |
color(Fl_Color i) {
if (i & 0xffffff00) {
unsigned rgb = (unsigned)i;
fl_color((uchar)(rgb >> 24), (uchar)(rgb >> 16), (uchar)(rgb >> 8));
} else {
Fl_Graphics_Driver::color(i);
if(!fl_gc) return; // don't get a default gc if current window is not yet created/valid
XSetForeground(fl_display, fl_... | false | false | false | false | false | 0 |
mpol_misplaced(struct page *page, struct vm_area_struct *vma, unsigned long addr)
{
struct mempolicy *pol;
struct zone *zone;
int curnid = page_to_nid(page);
unsigned long pgoff;
int thiscpu = raw_smp_processor_id();
int thisnid = cpu_to_node(thiscpu);
int polnid = -1;
int ret = -1;
BUG_ON(!vma);
pol = get_... | false | false | false | false | false | 0 |
gretl_matrix_extract_matrix (gretl_matrix *targ,
const gretl_matrix *src,
int row, int col,
GretlMatrixMod mod)
{
int m = (mod == GRETL_MOD_TRANSPOSE)? targ->cols : targ->rows;
int n = (mod == GRETL_MOD_TRANSPOSE)? targ->rows : targ->cols;
double x;
int i, j, si, sj;
if (row < 0 || c... | false | false | false | false | false | 0 |
openPass(HttpQueue *q)
{
mprLog(5, "Open passHandler");
if (q->conn->rx->flags & (HTTP_OPTIONS | HTTP_TRACE)) {
httpHandleOptionsTrace(q->conn);
}
} | 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.