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 |
|---|---|---|---|---|---|---|
initAvailableMetaZoneIDs () {
UBool initialized;
UMTX_CHECK(&gZoneMetaLock, gMetaZoneIDsInitialized, initialized);
if (!initialized) {
umtx_lock(&gZoneMetaLock);
{
if (!gMetaZoneIDsInitialized) {
UErrorCode status = U_ZERO_ERROR;
UHashtable *metaZo... | false | false | false | false | false | 0 |
H5FS_sinfo_lock(H5F_t *f, hid_t dxpl_id, H5FS_t *fspace, H5AC_protect_t accmode)
{
H5FS_sinfo_cache_ud_t cache_udata; /* User-data for cache callback */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
#ifdef H5FS_SINFO_DEBUG
HDfprintf(stderr, "%s: Called, fspace->addr = %a, fspace... | false | false | false | false | false | 0 |
cl_fget (std::istream& stream, char delim)
{
var cl_spushstring buffer;
// Handling of eofp is tricky: EOF is reached when (!stream.good()) || (stream.eof()).
while (stream.good()) {
var int c = stream.get();
if (stream.eof())
break;
if (c==delim) {
stream.unget();
break;
}
buffer.push(c);
}
ret... | false | false | false | false | false | 0 |
scan (function, crflag)
#ifdef __STDC__
void (*function) (struct member_desc member, FILE *istream);
#else
void (*function) ();
#endif
int crflag;
{
FILE *arcstream = fopen (archive, "r");
if (arcstream == 0 && crflag)
/* Creation-warning, if desired, will happen later. */
return;
if (ar... | false | false | false | false | true | 1 |
Java_com_sun_grid_jgdi_jni_JGDIBaseImpl_nativeUnsuspendJobsWithAnswer(JNIEnv *env, jobject jgdi, jobjectArray obj_array, jboolean force, jobject answers)
{
u_long32 transition = QI_DO_UNSUSPEND | JOB_DO_ACTION;
u_long32 option = force;
DENTER(TOP_LAYER, "Java_com_sun_grid_jgdi_jni_JGDIBaseImpl_nativeUnsuspend... | false | false | false | false | false | 0 |
bryan2_drawscanline(
struct mame_bitmap *bitmap,int x,int y,int length,
const UINT16 *src,int transparent,UINT32 orient,int pri)
{
ADJUST_FOR_ORIENTATION(UINT16, Machine->orientation ^ orient, bitmap, priority_bitmap, x, y);
if (transparent) {
while (length--) {
UINT32 spixel = *src++;
if (spixel<... | false | false | false | false | false | 0 |
bonobo_a11y_get_derived_type_for (GType widget_type,
const char *gail_parent_class,
BonoboA11YClassInitFn class_init)
{
GType type;
GType parent_atk_type;
GTypeInfo tinfo = { 0 };
GTypeQuery query;
char *type_name;
parent_atk_type = g_type_from_name (
gail_parent_class ?... | false | false | false | false | false | 0 |
sdhci_f_sdh30_probe(struct platform_device *pdev)
{
struct sdhci_host *host;
struct device *dev = &pdev->dev;
struct resource *res;
int irq, ctrl = 0, ret = 0;
struct f_sdhost_priv *priv;
u32 reg = 0;
irq = platform_get_irq(pdev, 0);
if (irq < 0) {
dev_err(dev, "%s: no irq specified\n", __func__);
return i... | false | false | false | false | false | 0 |
allocate_array (matches_and_old_values_array *array, unsigned long max_bytes)
{
/* Make enough space for the array header and a null first swath. */
unsigned long bytes_to_allocate = sizeof(matches_and_old_values_array) + sizeof(matches_and_old_values_swath);
if (!(array = realloc(array, bytes_to_alloc... | false | false | false | false | false | 0 |
_ipmi_kcs_clear_obf (ipmi_kcs_ctx_t ctx)
{
assert (ctx);
assert (ctx->magic == IPMI_KCS_CTX_MAGIC);
if (_ipmi_kcs_get_status (ctx) & IPMI_KCS_STATUS_REG_OBF)
_ipmi_kcs_read_byte (ctx);
} | false | false | false | false | false | 0 |
Dump(BasicSearchTree* tree, nSearchTreeNode node_id, const wxString& prefix, wxString& result)
{
wxString suffix(_T(""));
suffix << _T("- \"") << SerializeString(GetLabel(tree)) << _T("\" (") << U2S(node_id) << _T(")");
if (prefix.length() && prefix[prefix.length()-1]=='|')
result << prefix.substr(0... | false | false | false | false | false | 0 |
RemoveDeadArgumentsFromCallers(Function &Fn)
{
// We cannot change the arguments if this TU does not define the function or
// if the linker may choose a function body from another TU, even if the
// nominal linkage indicates that other copies of the function have the same
// semantics. In the below example, th... | false | false | false | false | false | 0 |
sci_remote_node_table_set_group(
struct sci_remote_node_table *remote_node_table,
u32 group_index)
{
u32 dword_location;
u32 dword_remainder;
u32 dword_value;
BUG_ON(
(remote_node_table->available_nodes_array_size * SCIC_SDS_REMOTE_NODE_SETS_PER_DWORD)
<= (group_index / SCU_STP_REMOTE_NODE_COUNT)
);
dwor... | false | false | false | false | false | 0 |
ping_metadata_service (GError **error)
{
GDBusMessage *message;
GDBusMessage *response;
if (g_dbus_connection_is_closed (dbus_connection))
return FALSE;
message = g_dbus_message_new_method_call (RB_METADATA_DBUS_NAME,
RB_METADATA_DBUS_OBJECT_PATH,
RB_METADATA_DBUS_INTERFACE,
"ping");
re... | false | false | false | false | false | 0 |
set_authorization(SERVICE service, char *realm)
{
char buf[64];
struct LOGIN *li = (service==WWW)?my.auth.head:my.proxy.head;
pthread_mutex_t lock = (service==WWW)?my.auth.lock:my.proxy.lock;
while(li != NULL){
if(!strncasecmp(li->realm, realm, strlen(realm))){
pthread_mutex_lock(&(lock));
... | true | true | false | false | false | 1 |
CreateTestCostList()
{
for(TestMap::iterator i = this->Tests.begin();
i != this->Tests.end(); ++i)
{
SortedTests.push_back(i->first);
//If the test failed last time, it should be run first, so max the cost.
//Only do this for parallel runs; in non-parallel runs, avoid clobbering
//the test'... | false | false | false | false | false | 0 |
ath_init_btcoex_timer(struct ath_softc *sc)
{
struct ath_btcoex *btcoex = &sc->btcoex;
btcoex->btcoex_period = ATH_BTCOEX_DEF_BT_PERIOD;
btcoex->btcoex_no_stomp = (100 - ATH_BTCOEX_DEF_DUTY_CYCLE) *
btcoex->btcoex_period / 100;
btcoex->btscan_no_stomp = (100 - ATH_BTCOEX_BTSCAN_DUTY_CYCLE) *
btcoex->btcoe... | false | false | false | false | false | 0 |
db_getinfo (lua_State *L) {
lua_Debug ar;
int arg;
lua_State *L1 = getthread(L, &arg);
const char *options = luaL_optstring(L, arg+2, "flnStu");
if (lua_isfunction(L, arg + 1)) { /* info about a function? */
options = lua_pushfstring(L, ">%s", options); /* add '>' to 'options' */
lua_pushvalue(L, ar... | false | false | false | false | false | 0 |
do_io_or_sleep(double x) {
int n;
struct timeval tv;
set_now();
double end_time = now + x;
//int loops = 0;
while (1) {
bool action = do_async_file_ops();
curl_fds.zero();
gui_rpc_fds.zero();
http_ops->get_fdset(curl_fds);
all_fds = curl_fds;
gui... | false | false | false | false | false | 0 |
check_conflict (LexState *ls, struct LHS_assign *lh, expdesc *v) {
FuncState *fs = ls->fs;
int extra = fs->freereg; /* eventual position to save local variable */
int conflict = 0;
for (; lh; lh = lh->prev) { /* check all previous assignments */
if (lh->v.k == VINDEXED) { /* assigning to a table? */
... | false | false | false | false | false | 0 |
ipmi_macinfo_drac_idrac_mac(struct ipmi_intf* intf,uint8_t NicNum)
{
struct ipmi_rs * rsp;
struct ipmi_rq req;
uint8_t msg_data[30];
uint8_t input_length=0;
uint8_t iDRAC6MacAddressByte[MACADDRESSLENGH];
uint8_t j;
ipmi_macinfo_drac_idrac_virtual_mac(intf,NicNum);
if ((NicNum != 0xff && NicNum != IDRAC_NIC_NUMB... | false | true | false | false | false | 1 |
gwy_sgettext(const gchar *msgid)
{
char *msgstr, *p;
msgstr = gettext(msgid);
if (msgstr == msgid) {
p = strrchr(msgstr, '|');
return p ? p+1 : msgstr;
}
return msgstr;
} | false | true | false | false | false | 1 |
__brcms_dbg(struct device *dev, u32 level, const char *func,
const char *fmt, ...)
{
struct va_format vaf = {
.fmt = fmt,
};
va_list args;
va_start(args, fmt);
vaf.va = &args;
#ifdef CONFIG_BRCMDBG
if ((brcm_msg_level & level) && net_ratelimit())
dev_err(dev, "%s %pV", func, &vaf);
#endif
trace_brcms_dbg... | false | false | false | false | false | 0 |
unregister_sysORTable_by_session(netsnmp_session * ss)
{
DEBUGMSGTL(("agent/sysORTable",
"sysORTable unregistering session %p\n", ss));
if(table) {
data_node run = table;
do {
data_node tmp = run;
run = run->next;
if (((ss->flags & SNMP_FLAGS_S... | false | false | false | false | false | 0 |
smb2_reconnect_server(struct work_struct *work)
{
struct TCP_Server_Info *server = container_of(work,
struct TCP_Server_Info, reconnect.work);
struct cifs_ses *ses;
struct cifs_tcon *tcon, *tcon2;
struct list_head tmp_list;
int tcon_exist = false;
/* Prevent simultaneous reconnects that can corrupt tcon->rl... | false | false | false | false | false | 0 |
find_modpath(ivl_nexus_t nex)
{
unsigned idx;
for (idx = 0 ; idx < ivl_nexus_ptrs(nex) ; idx += 1) {
ivl_nexus_ptr_t ptr = ivl_nexus_ptr(nex,idx);
ivl_signal_t sig = ivl_nexus_ptr_sig(ptr);
if (sig == 0)
continue;
if (ivl_signal_npath(sig) == 0)
continue;
return sig;
... | false | false | false | false | false | 0 |
new_filename(pb_file *pbf, ub4 len) {
char *filename;
if(!(filename = (char *) malloc(len + 1))) {
fprintf(stderr, "Malloc failed of filename\n");
fprintf(stderr, "Error: %s\n", strerror(errno));
}
pb_read(pbf, filename, len);
filename[len] = '\0';
#ifdef DEBUG
printf("filename is %s\n", filena... | false | false | false | true | false | 1 |
source_is_available (GSource *source)
{
GCutStringSource *string_source = (GCutStringSource *)source;
GIOChannel *channel;
GCutStringIOChannel *string_channel;
GIOCondition available_buffer_condition;
GIOCondition all_input_condition, all_error_condition;
channel = string_source->channel;
s... | false | false | false | false | false | 0 |
luaL_requiref (lua_State *L, const char *modname,
lua_CFunction openf, int glb) {
lua_pushcfunction(L, openf);
lua_pushstring(L, modname); /* argument to open function */
lua_call(L, 1, 1); /* open module */
luaL_getsubtable(L, LUA_REGISTRYINDEX, "_LOADED");
lua_pushvalue(L, -... | false | false | false | false | false | 0 |
_gst_boolean_accumulator (GSignalInvocationHint * ihint,
GValue * return_accu, const GValue * handler_return, gpointer dummy)
{
gboolean myboolean;
myboolean = g_value_get_boolean (handler_return);
if (!(ihint->run_type & G_SIGNAL_RUN_CLEANUP))
g_value_set_boolean (return_accu, myboolean);
GST_DEBUG (... | false | false | false | false | false | 0 |
Radius(float radius)
{
for(int i=0;i<m_NDims;i++)
{
m_Radius[i] = radius;
}
} | false | false | false | false | false | 0 |
transform_file_ready_cb (GError *error,
gpointer user_data)
{
GthTransformTask *self = user_data;
GFile *parent;
GList *file_list;
if (error != NULL) {
if (g_error_matches (error, JPEG_ERROR, JPEG_ERROR_MCU)) {
GtkWidget *dialog;
g_clear_error (&error);
dialog = ask_whethe... | false | false | false | false | false | 0 |
load_resultmap(void)
{
char buf[MAXPGPATH];
FILE *f;
/* scan the file ... */
snprintf(buf, sizeof(buf), "%s/resultmap", inputdir);
f = fopen(buf, "r");
if (!f)
{
/* OK if it doesn't exist, else complain */
if (errno == ENOENT)
return;
fprintf(stderr, _("%s: could not open file \"%s\" for reading: %... | false | false | false | false | true | 1 |
Assert(const char *c, const char *file, int line)
{
#ifdef TRACE
char buffer[2000];
sprintf(buffer, "Assertion [%s] failed at %s %d", c, file, line);
if (assertionPopUps) {
/*int idButton = */
/* C::B begin */
wxSafeShowMessage(wxT("wxScintilla"),sci2wx(buffer));
/* C::B end */
} else {
... | false | false | false | false | false | 0 |
createTypeWithFlags(LLVMContext &Context, DIType *Ty,
unsigned FlagsToSet) {
auto NewTy = Ty->clone();
NewTy->setFlags(NewTy->getFlags() | FlagsToSet);
return MDNode::replaceWithUniqued(std::move(NewTy));
} | false | false | false | false | false | 0 |
name(char *return_str,int len)
{
if(!initialized)
runtime_initialize();
snprintf(return_str,len,"%s\t%d,0x%x",
gpsimObject::name().c_str(),
fsr,
k);
return(return_str);
} | false | false | false | false | false | 0 |
querySet_get_index(struct querySet *qs, unsigned int hash, const char *name) {
size_t p;
if(qs->pair == NULL) {
return qs->mask + 1;
}
for(p = 0; p <= qs->mask; ++p) {
size_t index = ((hash + p) & qs->mask);
struct querySet_pair *pair = qs->pair + index;
if(pair->hash == ... | false | false | false | false | false | 0 |
parse_value(snd_config_t **_n, snd_config_t *parent, input_t *input, char **id, int skip)
{
snd_config_t *n = *_n;
char *s;
int err;
err = get_string(&s, 0, input);
if (err < 0)
return err;
if (skip) {
free(s);
return 0;
}
if (err == 0 && ((s[0] >= '0' && s[0] <= '9') || s[0] == '-')) {
long long i;
... | false | false | false | false | false | 0 |
xsltRegisterTmpRVT(xsltTransformContextPtr ctxt, xmlDocPtr RVT)
{
if ((ctxt == NULL) || (RVT == NULL))
return(-1);
/*
* We'll restrict the lifetime of user-created fragments
* insinde an xsl:variable and xsl:param to the lifetime of the
* var/param itself.
*/
if (ctxt->contextVariable != N... | false | false | false | false | false | 0 |
__ecereConstructor_ImportFolderFSI(struct __ecereNameSpace__ecere__com__Instance * this)
{
struct ImportFolderFSI * __ecerePointer_ImportFolderFSI = (struct ImportFolderFSI *)(this ? (((char *)this) + __ecereClass_ImportFolderFSI->offset) : 0);
__ecerePointer_ImportFolderFSI->stack = __ecereNameSpace__ecere__com__eIns... | false | false | false | true | false | 1 |
Problem_3_test(){
Chapter2 chapter2;
//case 1
LinkedList *input1 = NULL;
LinkedList *middle = NULL;
chapter2.Problem_3(middle);
if(input1!=NULL)
return false;
//case 2
int b[]={1,2};
LinkedList *input2 = LinkedList::createList(b, b+2);
chapter2.Problem_3(input2);
if(input2->... | false | false | false | false | false | 0 |
sqlite_db_enable_load_extension(pTHX_ SV *dbh, int onoff)
{
D_imp_dbh(dbh);
int rc;
if (!DBIc_ACTIVE(imp_dbh)) {
sqlite_error(dbh, -2, "attempt to enable load extension on inactive database handle");
return FALSE;
}
croak_if_db_is_null();
/* COMPAT: sqlite3_enable_load_extensi... | false | false | false | false | false | 0 |
__update_ntt(struct lacpdu *lacpdu, struct port *port)
{
/* validate lacpdu and port */
if (lacpdu && port) {
/* check if any parameter is different then
* update the port->ntt.
*/
if ((ntohs(lacpdu->partner_port) != port->actor_port_number) ||
(ntohs(lacpdu->partner_port_priority) != port->actor_port... | false | false | false | false | false | 0 |
exporthtml_sort_attrib( const GList *list ) {
const GList *node;
GList *sorted = NULL;
sorted = NULL;
node = list;
while( node ) {
sorted = g_list_insert_sorted(
sorted, node->data, exporthtml_compare_attrib );
node = g_list_next( node );
}
return sorted;
} | false | false | false | false | false | 0 |
ixgbe_update_tx_dca(struct ixgbe_adapter *adapter,
struct ixgbe_ring *tx_ring,
int cpu)
{
struct ixgbe_hw *hw = &adapter->hw;
u32 txctrl = 0;
u16 reg_offset;
if (adapter->flags & IXGBE_FLAG_DCA_ENABLED)
txctrl = dca3_get_tag(tx_ring->dev, cpu);
switch (hw->mac.type) {
case ixgbe_mac_82598EB:
reg_off... | false | false | false | false | false | 0 |
read_int32 (std::istream& is, bool swap_bytes, int32& val)
{
is.read (X_CAST (char *, &val), sizeof (int32));
if (swap_bytes) {
swap_4_bytes ((char *) &val);
}
} | false | false | false | false | false | 0 |
mnote_olympus_tag_get_title (MnoteOlympusTag t)
{
unsigned int i;
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
for (i = 0; i < sizeof (table) / sizeof (table[0]); i++)
if (table[i].tag == t) return (_(table[i].title));
return NULL;
} | false | false | false | false | false | 0 |
start_io(void)
{
if (triggered_rep != true) {
if (io_mode() == io_read)
fork_mikmod();
triggered_rep = true;
}
} | false | false | false | false | false | 0 |
invert(void)
{
float length = this->quat.length();
#if COIN_DEBUG
if (length==0.0f)
SoDebugError::postWarning("SbRotation::invert",
"Quarternion has zero length => "
"undefined rotation.");
#endif // COIN_DEBUG
// Optimize by doing 1 div and 4 muls ... | false | false | false | false | false | 0 |
sceptre_get_status (Sceptre_Scanner * dev, size_t * data_left)
{
size_t size;
CDB cdb;
SANE_Status status;
DBG (DBG_proc, "sceptre_get_status: enter\n");
/* Get status. */
size = 0x10;
MKSCSI_GET_DATA_BUFFER_STATUS (cdb, 1, size);
status = sanei_scsi_cmd2 (dev->sfd, cdb.data, cdb.len,
NULL, 0, ... | false | false | false | false | false | 0 |
ParseArrayValue(struct __ecereNameSpace__ecere__com__Instance * array, char * equal)
{
char * start, * comma;
char * string;
string = __ecereFunction___ecereNameSpace__ecere__sys__CopyString(equal);
start = string;
while(start)
{
comma = strstr(start, ",");
if(comma)
comma[0] = '\0';
((struct __ecereNameSpace__ecere__... | false | false | false | false | false | 0 |
ddf_MatrixSortedUniqueCopy(ddf_MatrixPtr M,ddf_rowindex *newpos) /* 094 */
{
/* Same as ddf_MatrixNormalizedSortedUniqueCopy except that it returns a unnormalized origial data
with original ordering.
*/
ddf_MatrixPtr M1=NULL,M2=NULL;
ddf_rowrange m,i,k,ii;
ddf_colrange d;
ddf_rowindex newpos1=NULL,ne... | false | false | false | false | false | 0 |
dummy_init_one(void)
{
struct net_device *dev_dummy;
int err;
dev_dummy = alloc_netdev(0, "dummy%d", NET_NAME_UNKNOWN, dummy_setup);
if (!dev_dummy)
return -ENOMEM;
dev_dummy->rtnl_link_ops = &dummy_link_ops;
err = register_netdevice(dev_dummy);
if (err < 0)
goto err;
return 0;
err:
free_netdev(dev_dumm... | false | false | false | false | false | 0 |
gems_server(int input_fd, t_options *options)
{
t_server_data data;
fd_set rfds; /* Temporary fd list for select() */
struct t_clsock *client = NULL; /* List iterator */
struct t_clsock *next_client = NULL; /* List iterator */
status_t status = CONTINUE; /* Program status and return value. */
fbool_t r;
/***... | false | false | false | false | false | 0 |
shutdown()
{
// Unregister SM factory
Root::getSingleton().removeSceneManagerFactory(mBspFactory);
// delete resource manager, will unregister itself
OGRE_DELETE mBspResourceManager;
mBspResourceManager = 0;
} | false | false | false | false | false | 0 |
calc_dfields(struct dfields *f, const time_t *t)
{
/* 2 billion days is enough for 5 Mio years (and even on 16 bit we get 89) */
int tdays, year;
unsigned rem, utdays, i;
/*
* We are dealing with timestamps.
* Of computer systems, running nodes, on the
* internet.
* Anybody claming he is somewhere before
... | false | false | false | false | false | 0 |
MSLExternalSubset(void *context,const xmlChar *name,
const xmlChar *external_id,const xmlChar *system_id)
{
MSLInfo
*msl_info;
xmlParserCtxt
parser_context;
xmlParserCtxtPtr
parser;
xmlParserInputPtr
input;
/*
Does this document has an external subset?
*/
(void) LogMagickEvent(Co... | false | false | false | false | false | 0 |
os_scsi_tape_close(struct inode * inode, struct file * filp)
{
int result = 0;
struct osst_tape * STp = filp->private_data;
if (STp->door_locked == ST_LOCKED_AUTO)
do_door_lock(STp, 0);
if (STp->raw)
STp->header_ok = 0;
normalize_buffer(STp->buffer);
write_lock(&os_scsi_tapes_lock);
STp->in_... | false | false | false | false | false | 0 |
socfpga_dwmac_setup(struct socfpga_dwmac *dwmac)
{
struct regmap *sys_mgr_base_addr = dwmac->sys_mgr_base_addr;
int phymode = dwmac->interface;
u32 reg_offset = dwmac->reg_offset;
u32 reg_shift = dwmac->reg_shift;
u32 ctrl, val;
switch (phymode) {
case PHY_INTERFACE_MODE_RGMII:
case PHY_INTERFACE_MODE_RGMII_ID... | false | false | false | false | false | 0 |
smpp_emu_handle_pdu(struct smpp_emu_arg *p, SMPP_PDU *pdu)
{
SMPP_PDU *resp;
Octstr *os;
resp = NULL;
switch (pdu->type) {
case bind_transmitter:
resp = smpp_pdu_create(bind_transmitter_resp,
pdu->u.bind_transmitter.sequence_number);
break;
case bind_receiver:
resp ... | false | false | false | false | false | 0 |
_update_logging(bool startup)
{
/* Preserve execute line arguments (if any) */
if (debug_level) {
slurmdbd_conf->debug_level = MIN(
(LOG_LEVEL_INFO + debug_level),
(LOG_LEVEL_END - 1));
}
log_opts.stderr_level = slurmdbd_conf->debug_level;
log_opts.logfile_level = slurmdbd_conf->debug_level;
log_opts.sy... | false | false | false | false | false | 0 |
qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = QObject::qt_metacall(_c, _id, _a);
if (_id < 0)
return _id;
if (_c == QMetaObject::InvokeMetaMethod) {
if (_id < 8)
qt_static_metacall(this, _c, _id, _a);
_id -= 8;
}
#ifndef QT_NO_PROPERTIES
else if ... | false | false | false | false | false | 0 |
GDALRegister_HDF5Image( )
{
GDALDriver *poDriver;
if (! GDAL_CHECK_VERSION("HDF5Image driver"))
return;
if( GDALGetDriverByName( "HDF5Image" ) == NULL )
{
poDriver = new GDALDriver( );
poDriver->SetDescription( "HDF5Image" );
poDriver->SetMetadataItem( GDAL_DMD_LONG... | false | false | false | false | false | 0 |
sequence_uses_addressof (rtx seq)
{
rtx insn;
for (insn = seq; insn; insn = NEXT_INSN (insn))
if (INSN_P (insn))
{
/* If this is a CALL_PLACEHOLDER, then recursively call ourselves
with each nonempty sequence attached to the CALL_PLACEHOLDER. */
if (GET_CODE (insn) == CALL_INSN
&& GET_CODE (P... | false | false | false | false | false | 0 |
vermiculate_init (Display *d, Window w)
{
struct state *st = (struct state *) calloc (1, sizeof(*st));
st->dpy = d;
st->window = w;
st->reset_p = 1;
st->instring = get_string_resource (st->dpy, "instring", "Instring");
if (st->instring && !*st->instring)
st->instring = 0;
st->max_ticks = get_integer_... | false | false | false | false | false | 0 |
rtnl_route_set_gateway (struct rtnl_route * route, struct nl_addr * gw_addr)
{
struct rtnl_nexthop * nh;
nh = nm_netlink_get_nh(route);
g_return_val_if_fail(nh, -NLE_OBJ_NOTFOUND);
rtnl_route_nh_set_gateway(nh, gw_addr);
return 0;
} | false | false | false | false | false | 0 |
UpdateLabelPosition()
{
if (!this->Point1Representation ||
!this->Point2Representation)
{
return;
}
// get the end points
double p1[3], p2[3];
this->Point1Representation->GetWorldPosition(p1);
this->Point2Representation->GetWorldPosition(p2);
double pos[3];
pos[0] = p1[0] + (p2[0] - ... | false | false | false | false | false | 0 |
amdlibCopySelection(amdlibSELECTION *srcSelection,
amdlibSELECTION *dstSelection,
amdlibERROR_MSG errMsg)
{
int band, base;
/* Copy fixed size fields */
dstSelection->nbFrames = srcSelection->nbFrames;
dstSelection->nbBases ... | false | false | false | false | true | 1 |
photos_embed_active_changed (PhotosBaseManager *manager, GObject *object, gpointer user_data)
{
PhotosEmbed *self = PHOTOS_EMBED (user_data);
PhotosEmbedPrivate *priv = self->priv;
if (object == NULL)
return;
photos_embed_clear_load_timer (self);
if (photos_base_item_is_collection (PHOTOS_BASE_ITEM (ob... | false | false | false | false | false | 0 |
SelectInlineAsmMemoryOperand(const SDValue &Op, char ConstraintCode,
std::vector<SDValue> &OutOps) {
SDValue Op0, Op1, Op2, Op3, Op4;
switch (ConstraintCode) {
case 'o': // offsetable ??
case 'v': // not offsetable ??
default: return true;
case 'm': // memory
... | false | false | false | false | false | 0 |
message_load_wave(int index, const char *filename)
{
if (index == -1) {
Int3();
return;
}
if ( Message_waves[index].num >= 0) {
return;
}
if ( !Sound_enabled ) {
Message_waves[index].num = -1;
return;
}
game_snd tmp_gs;
strcpy_s( tmp_gs.filename, filename );
Message_waves[index].num = snd_load( &t... | false | false | false | false | false | 0 |
ledInit()
{
int i;
if(isInit)
return;
GPIO_InitTypeDef GPIO_InitStructure;
// Enable GPIO
RCC_AHB1PeriphClockCmd(LED_GPIO_PERIF, ENABLE);
for (i = 0; i < LED_NUM; i++)
{
//Initialize the LED pins as an output
GPIO_InitStructure.GPIO_Pin = led_pin[i];
GPIO_InitStructure.... | false | false | false | false | false | 0 |
extract_quote(gchar *str, gchar quote_chr)
{
register gchar *p;
if ((str = strchr(str, quote_chr))) {
p = str;
while ((p = strchr(p + 1, quote_chr)) && (p[-1] == '\\')) {
memmove(p - 1, p, strlen(p) + 1);
p--;
}
if(p) {
*p = '\0';
memmove(str, str + 1, p - str);
}
}
} | false | false | false | false | true | 1 |
_detailed_output_bmc_message_channel_info_record (ipmi_sensors_state_data_t *state_data,
const void *sdr_record,
unsigned int sdr_record_len,
uint8_t record_type,
... | false | false | false | false | false | 0 |
mmap_string_insert_len (MMAPString *string,
size_t pos,
const char *val,
size_t len)
{
if (mmap_string_maybe_expand (string, len) == NULL)
return NULL;
if (pos < string->len)
memmove (string->str + pos + len, string->str + pos, string->len - pos);
/* insert the new s... | false | false | false | false | false | 0 |
set_cookies(List *headers, WSPMachine *sm)
{
Cookie *value = NULL;
Octstr *cookie = NULL;
long pos = 0;
if (headers == NULL || sm == NULL) {
error (0, "set_cookies: Null argument(s) - no headers, WSPMachine or both");
return -1;
}
/* Expire cookies that have timed out */
expire_cookies(sm->cookies);
/* W... | false | false | false | false | true | 1 |
global_event_filter(GdkXEvent *xev,
GdkEvent *event UNUSED,
gpointer data UNUSED)
{
XEvent *xevent = (XEvent *)xev;
if (xevent != NULL
&& xevent->type == ClientMessage
&& xevent->xclient.message_type == GET_X_ATOM(wm_protocols_atom)
&& (long_u)xevent->xclient.data.l[0]
== GE... | false | false | false | false | false | 0 |
qla4xxx_build_ddb_list(struct scsi_qla_host *ha, int is_reset)
{
uint16_t tmo = 0;
struct list_head list_st, list_nt;
struct qla_ddb_index *st_ddb_idx, *st_ddb_idx_tmp;
unsigned long wtime;
if (!test_bit(AF_LINK_UP, &ha->flags)) {
set_bit(AF_BUILD_DDB_LIST, &ha->flags);
ha->is_reset = is_reset;
return;
}
... | false | false | false | false | false | 0 |
checkReturnValue(
const int result,
const int expected) const
{
if (result != expected) {
DdManager *mgr = p->manager;
Cudd_ErrorType errType = Cudd_ReadErrorCode(mgr);
switch (errType) {
case CUDD_MEMORY_OUT:
p->errorHandler("Out of memory.");
break;
case CUDD_TOO_MANY_NODES:
break;
case C... | false | false | false | false | false | 0 |
m_burn(GtkWidget *, cchar *)
{
int ii, cc, err;
char **filelist, *imagefile, *bcommand;
if (is_syncbusy()) return; // must wait for file sync v.11.11
if (mod_keep()) return; // unsaved edits
if (... | false | false | false | false | false | 0 |
pg_mule_dsplen(const unsigned char *s)
{
int len;
if (IS_LC1(*s))
len = 1;
else if (IS_LCPRV1(*s))
len = 1;
else if (IS_LC2(*s))
len = 2;
else if (IS_LCPRV2(*s))
len = 2;
else
len = 1; /* assume ASCII */
return len;
} | false | false | false | false | false | 0 |
snd_emu10k1_init_stereo_control(struct snd_emu10k1_fx8010_control_gpr *ctl,
const char *name, int gpr, int defval)
{
ctl->id.iface = SNDRV_CTL_ELEM_IFACE_MIXER;
strcpy(ctl->id.name, name);
ctl->vcount = ctl->count = 2;
ctl->gpr[0] = gpr + 0; ctl->value[0] = defval;
ctl->gpr[1] = gpr + 1; ctl->value[1] = defval... | false | false | false | false | false | 0 |
deblock_h_luma_mbaff_c( pixel *pix, int stride, int alpha, int beta, int8_t *tc0 )
{
for( int d = 0; d < 8; d++, pix += stride )
deblock_edge_luma_c( pix, 1, alpha, beta, tc0[d>>1] );
} | false | false | false | false | false | 0 |
gnm_insert_meta_date (GODoc *doc, char const *name)
{
GValue *value = g_new0 (GValue, 1);
GTimeVal tm;
GsfTimestamp *ts = gsf_timestamp_new ();
g_get_current_time (&tm);
tm.tv_usec = 0L;
gsf_timestamp_set_time (ts, tm.tv_sec);
g_value_init (value, GSF_TIMESTAMP_TYPE);
gsf_timestamp_to_value (ts, value);
gsf_... | false | false | false | false | false | 0 |
cache_chid(aChannel *chptr)
{
/*
** caching should be limited to the minimum,
** for memory reasons, but most importantly for
** user friendly-ness.
** Is the logic here right, tho?
*/
if (chptr->history == 0 ||
(timeofday - chptr->history) >LDELAYCHASETIMELIMIT+DELAYCHASETIMELIMIT)
{
... | false | false | false | false | false | 0 |
verify_levels(cmdrec_t *c)
/*
* Function: Verify that user has appropriate levels
* Returns: 1 if levels were OK, proceed with command
* 0 if not OK, return now
*
*/
{
/* Command requires +r only and user is not registered */
if(c->levels == USER_REGD && !cmdinfo.user->registered)
{
if(cmdinfo.d)
... | false | false | false | false | false | 0 |
alloc_fw_event_work(int len)
{
struct fw_event_work *fw_event;
fw_event = kzalloc(sizeof(*fw_event) + len, GFP_ATOMIC);
if (!fw_event)
return NULL;
kref_init(&fw_event->refcount);
return fw_event;
} | false | false | false | false | false | 0 |
git_stash_pane_init (GitStashPane *self)
{
gchar *objects[] = {"stash_pane",
"stash_model",
NULL};
GError *error = NULL;
GtkTreeView *stash_view;
GtkTreeViewColumn *stash_number_column;
GtkCellRenderer *stash_number_renderer;
GtkTreeViewColumn *stash_message_column;
GtkCellRenderer *stash_message_ren... | false | false | false | false | false | 0 |
operator==(const CoinIndexedVector & rhs) const
{
const int cs = rhs.nElements_;
const int * cind = rhs.indices_;
const double * celem = rhs.elements_;
if (nElements_!=cs)
return false;
bool okay=true;
CoinRelFltEq eq(1.0e-8);
if (!packedMode_&&!rhs.packedMode_) {
for (int i=0;i<cs;i++) {
... | false | false | false | false | false | 0 |
ipoib_add_one(struct ib_device *device)
{
struct list_head *dev_list;
struct net_device *dev;
struct ipoib_dev_priv *priv;
int p;
int count = 0;
dev_list = kmalloc(sizeof *dev_list, GFP_KERNEL);
if (!dev_list)
return;
INIT_LIST_HEAD(dev_list);
for (p = rdma_start_port(device); p <= rdma_end_port(device); ... | false | false | false | false | false | 0 |
AddWorkspace( Workspace *w )
{
int level = w->GetLevel();
levels_.insert( WSEntryType(level,w) );
if( level > highestLevel_ )highestLevel_ = level;
} | false | false | false | false | false | 0 |
js_GetReservedSlot(JSContext *cx, JSObject *obj, uint32 index, jsval *vp)
{
if (!OBJ_IS_NATIVE(obj)) {
*vp = JSVAL_VOID;
return true;
}
JSClass *clasp = obj->getClass();
uint32 limit = JSCLASS_RESERVED_SLOTS(clasp);
JS_LOCK_OBJ(cx, obj);
if (index >= limit && !ReservedSlotIndex... | false | false | false | false | false | 0 |
ario_playlist_manager_get_instance (void)
{
ARIO_LOG_FUNCTION_START;
static ArioPlaylistManager *playlist_manager = NULL;
if (!playlist_manager) {
ArioPlaylistMode *playlist_mode;
playlist_manager = g_object_new (TYPE_ARIO_PLAYLIST_MANAGER,
... | false | false | false | false | false | 0 |
ath6kl_change_station(struct wiphy *wiphy, struct net_device *dev,
const u8 *mac,
struct station_parameters *params)
{
struct ath6kl *ar = ath6kl_priv(dev);
struct ath6kl_vif *vif = netdev_priv(dev);
int err;
if (vif->nw_type != AP_NETWORK)
return -EOPNOTSUPP;
err = cfg80211_check_station_change(wiph... | false | false | false | false | false | 0 |
httpHeaderGetAuth(const HttpHeader * hdr, http_hdr_type id, const char *auth_scheme)
{
const char *field;
int l;
assert(hdr && auth_scheme);
field = httpHeaderGetStr(hdr, id);
if (!field) /* no authorization field */
return NULL;
l = strlen(auth_scheme);
if (!l || strncasecmp(field, auth_... | false | false | false | false | false | 0 |
print_structs(void)
{
const struct lgfs2_metadata *mlist[lgfs2_metadata_size];
int i;
for (i = 0; i < lgfs2_metadata_size; i++)
mlist[i] = &lgfs2_metadata[i];
qsort(mlist, lgfs2_metadata_size, sizeof(struct lgfs2_metadata *), metastrcmp);
for (i = 0; i < lgfs2_metadata_size; i++)
if (mlist[i]->mh_type != GFS2... | false | false | false | false | false | 0 |
test_index_reuc__remove(void)
{
git_oid oid;
const git_index_reuc_entry *reuc;
cl_assert_equal_i(2, git_index_reuc_entrycount(repo_index));
cl_git_pass(git_index_reuc_remove(repo_index, 0));
cl_git_fail(git_index_reuc_remove(repo_index, 1));
cl_assert_equal_i(1, git_index_reuc_entrycount(repo_index));
cl_ass... | false | false | false | true | false | 1 |
fill_executables (GList *possible_executables,
GList *existing_items,
char prefix)
{
GList *list;
GList *l;
list = NULL;
for (l = possible_executables; l; l = l->next) {
const char *filename;
char *basename;
filename = l->data;
basename = g_path_get_basename (filename);
if (ba... | false | false | false | false | false | 0 |
initProc() {
// Allow to pick only gamma* or Z0 part of full gamma*/Z0 expression.
gmZmode = settingsPtr->mode("WeakZ0:gmZmode");
// Store Z0 mass and width for propagator.
mRes = particleDataPtr->m0(23);
GammaRes = particleDataPtr->mWidth(23);
m2Res = mRes*mRes;
GamMRat = Gamma... | false | false | false | false | false | 0 |
bi_terminate(BI_CTX *ctx)
{
bigint *p, *pn;
bi_depermanent(ctx->bi_radix);
bi_free(ctx, ctx->bi_radix);
if (ctx->active_count != 0)
{
#ifdef CONFIG_SSL_FULL_MODE
printf("bi_terminate: there were %d un-freed bigints\n",
ctx->active_count);
#endif
abort();
... | 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.