summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-04-23 10:42:43 +0200
committerKarolin Seeger <kseeger@samba.org>2009-04-28 09:11:15 +0200
commit76b850f3be7ef66cd911f65e91cfa565828ddb9b (patch)
treede3786f061a05ce273f21a4a200f6581585022da
parent84dbdb56a5e90bef55a9b30722da5f13e2ceb534 (diff)
downloadsamba-76b850f3be7ef66cd911f65e91cfa565828ddb9b.tar.gz
Fix Coverity ID 884: DEADCODE
(cherry picked from commit cb8c7f2291897cc6d9bffdb48f4baca80161c2f8)
-rw-r--r--source3/lib/fault.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source3/lib/fault.c b/source3/lib/fault.c
index efd1dddfd40..51fc53bb0d1 100644
--- a/source3/lib/fault.c
+++ b/source3/lib/fault.c
@@ -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);