From 99e299736daf81e9ffcf9d40cdc5085748c6dfbe Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Tue, 29 Apr 2014 06:36:44 +0200 Subject: libcompat: Make sure P_tmpdir is always defined This will guarantee the macro constant is always defined, which allows us to remove an equivalent code branch, which in normal conditions is dead code. As a side effect this unconfuses static code analyzers like cppcheck or coverity. --- lib/compat/compat.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/compat') diff --git a/lib/compat/compat.h b/lib/compat/compat.h index 9cc89b121..d445a451e 100644 --- a/lib/compat/compat.h +++ b/lib/compat/compat.h @@ -38,6 +38,10 @@ extern "C" { #define O_NOFOLLOW 0 #endif +#ifndef HAVE_P_TMPDIR +#define P_tmpdir "/tmp" +#endif + /* * Define WCOREDUMP if we don't have it already, coredumps won't be * detected, though. -- cgit v1.2.3