diff options
author | Stephen Gallagher <sgallagh@redhat.com> | 2011-11-08 13:34:18 -0500 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2011-11-10 11:59:50 -0500 |
commit | 4a0d06b61ec336a250d22f28b203bd47b6c096fe (patch) | |
tree | ebf807de1d1b60e20e6634d1688f80e7e4536064 /src/sbus | |
parent | f0a34aeb49f3efd4c94b5afcb22671aac3098ddb (diff) | |
download | sssd-4a0d06b61ec336a250d22f28b203bd47b6c096fe.tar.gz sssd-4a0d06b61ec336a250d22f28b203bd47b6c096fe.tar.bz2 sssd-4a0d06b61ec336a250d22f28b203bd47b6c096fe.zip |
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).
Diffstat (limited to 'src/sbus')
-rw-r--r-- | src/sbus/sssd_dbus_common.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/sbus/sssd_dbus_common.c b/src/sbus/sssd_dbus_common.c index 311da677..d762005e 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")); } /* |