diff options
author | Guillem Jover <guillem@debian.org> | 2014-04-29 06:36:44 +0200 |
---|---|---|
committer | Guillem Jover <guillem@debian.org> | 2014-04-30 06:47:33 +0200 |
commit | 99e299736daf81e9ffcf9d40cdc5085748c6dfbe (patch) | |
tree | 9748c944edf5aa6652502f8e4ea9b9bb569ab4dc /lib/compat | |
parent | 6f2a7a736c0c2873c3415c1cd1eb8b5c7c42c4b5 (diff) | |
download | dpkg-99e299736daf81e9ffcf9d40cdc5085748c6dfbe.tar.gz |
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.
Diffstat (limited to 'lib/compat')
-rw-r--r-- | lib/compat/compat.h | 4 |
1 files changed, 4 insertions, 0 deletions
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. |