Fix Coverity ID 884: DEADCODE
authorVolker Lendecke <vl@samba.org>
Thu, 23 Apr 2009 08:42:43 +0000 (10:42 +0200)
committerKarolin Seeger <kseeger@samba.org>
Tue, 28 Apr 2009 07:11:15 +0000 (09:11 +0200)
(cherry picked from commit cb8c7f2291897cc6d9bffdb48f4baca80161c2f8)

source3/lib/fault.c

index efd1dddfd40aaee3f9f048c7345fcf6a906807b0..51fc53bb0d17d90c2fe69b1d7e55135ec11e676f 100644 (file)
@@ -194,17 +194,18 @@ static char *get_freebsd_corepath(void)
  */
 static char *get_corepath(const char *logbase, const char *progname)
 {
-       char *tmp_corepath = NULL;
+#if (defined(FREEBSD) && defined(HAVE_SYSCTLBYNAME))
 
        /* @todo: Add support for the linux corepath. */
-#if (defined(FREEBSD) && defined(HAVE_SYSCTLBYNAME))
+
+       char *tmp_corepath = NULL;
        tmp_corepath = get_freebsd_corepath();
-#endif
 
        /* If this has been set correctly, we're done. */
        if (tmp_corepath) {
                return tmp_corepath;
        }
+#endif
 
        /* Fall back to the default. */
        return get_default_corepath(logbase, progname);