Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/cddl/osnet/dist/uts/common/dtrace better fix for gc...
details: https://anonhg.NetBSD.org/src/rev/6b4a96e57ccc
branches: trunk
changeset: 767416:6b4a96e57ccc
user: christos <christos%NetBSD.org@localhost>
date: Mon Jul 18 02:47:52 2011 +0000
description:
better fix for gcc uninitialized.
diffstat:
external/cddl/osnet/dist/uts/common/dtrace/dtrace.c | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
diffs (38 lines):
diff -r f502778a4b0a -r 6b4a96e57ccc external/cddl/osnet/dist/uts/common/dtrace/dtrace.c
--- a/external/cddl/osnet/dist/uts/common/dtrace/dtrace.c Mon Jul 18 02:35:11 2011 +0000
+++ b/external/cddl/osnet/dist/uts/common/dtrace/dtrace.c Mon Jul 18 02:47:52 2011 +0000
@@ -6939,8 +6939,12 @@
#if defined(sun)
if (cr == NULL || PRIV_POLICY_ONLY(cr, PRIV_ALL, B_FALSE)) {
/*
- * For DTRACE_PRIV_ALL, the uid and zoneid don't matter.
- */
+ * For DTRACE_PRIV_ALL, the uid and zoneid don't matter,
+ * but for GCC they do.
+ */
+ *uidp = 0;
+ *zoneidp = 0;
+
priv = DTRACE_PRIV_ALL;
} else {
*uidp = crgetuid(cr);
@@ -6960,6 +6964,8 @@
}
#else
priv = DTRACE_PRIV_ALL;
+ *uidp = 0;
+ *zoneidp = 0;
#endif
*privp = priv;
@@ -8092,8 +8098,8 @@
{
dtrace_probekey_t pkey;
uint32_t priv;
- uid_t uid = 0; /* XXX: gcc */
- zoneid_t zoneid = 0; /* XXX: gcc */
+ uid_t uid;
+ zoneid_t zoneid;
ASSERT(MUTEX_HELD(&dtrace_lock));
dtrace_ecb_create_cache = NULL;
Home |
Main Index |
Thread Index |
Old Index