From 4a0d06b61ec336a250d22f28b203bd47b6c096fe Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Tue, 8 Nov 2011 13:34:18 -0500 Subject: SBUS: Fix DEBUG log matching This log message should only be displayed at the most verbose of log levels. Since it didn't match, it was resulting in a Coverity error warning of the printing of an uninitialized value (fd). --- src/sbus/sssd_dbus_common.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'src/sbus') diff --git a/src/sbus/sssd_dbus_common.c b/src/sbus/sssd_dbus_common.c index 311da677b..d762005ea 100644 --- a/src/sbus/sssd_dbus_common.c +++ b/src/sbus/sssd_dbus_common.c @@ -197,7 +197,7 @@ void sbus_toggle_watch(DBusWatch *dbus_watch, void *data) unsigned int flags; dbus_bool_t enabled; void *watch_data; - int fd; + int fd = -1; enabled = dbus_watch_get_enabled(dbus_watch); flags = dbus_watch_get_flags(dbus_watch); @@ -226,18 +226,19 @@ void sbus_toggle_watch(DBusWatch *dbus_watch, void *data) } } - if (DEBUG_IS_SET(SSSDBG_TRACE_INTERNAL)) { + if (DEBUG_IS_SET(SSSDBG_TRACE_ALL)) { #ifdef HAVE_DBUS_WATCH_GET_UNIX_FD fd = dbus_watch_get_unix_fd(dbus_watch); #else fd = dbus_watch_get_fd(dbus_watch); #endif } - DEBUG(8, ("%p/%p (%d), %s/%s (%s)\n", - watch, dbus_watch, fd, - ((flags & DBUS_WATCH_READABLE)?"R":"-"), - ((flags & DBUS_WATCH_WRITABLE)?"W":"-"), - enabled?"enabled":"disabled")); + DEBUG(SSSDBG_TRACE_ALL, + ("%p/%p (%d), %s/%s (%s)\n", + watch, dbus_watch, fd, + ((flags & DBUS_WATCH_READABLE)?"R":"-"), + ((flags & DBUS_WATCH_WRITABLE)?"W":"-"), + enabled?"enabled":"disabled")); } /* -- cgit