From 62689ef0cf3c805b100ff5260485368e1c9b683c Mon Sep 17 00:00:00 2001 From: David Carlier Date: Sun, 19 Nov 2017 16:23:42 +0000 Subject: Fix undefined behavior constant defined. --- src/lzfP.h | 6 +++++- src/setproctitle.c | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/lzfP.h b/src/lzfP.h index c6d2e096c..93c27b42d 100644 --- a/src/lzfP.h +++ b/src/lzfP.h @@ -79,7 +79,11 @@ * Unconditionally aligning does not cost very much, so do it if unsure */ #ifndef STRICT_ALIGN -# define STRICT_ALIGN !(defined(__i386) || defined (__amd64)) +# if !(defined(__i386) || defined (__amd64)) +# define STRICT_ALIGN 1 +# else +# define STRICT_ALIGN 0 +# endif #endif /* diff --git a/src/setproctitle.c b/src/setproctitle.c index f44253e16..6563242de 100644 --- a/src/setproctitle.c +++ b/src/setproctitle.c @@ -39,7 +39,11 @@ #include /* errno program_invocation_name program_invocation_short_name */ #if !defined(HAVE_SETPROCTITLE) -#define HAVE_SETPROCTITLE (defined __NetBSD__ || defined __FreeBSD__ || defined __OpenBSD__) +#if (defined __NetBSD__ || defined __FreeBSD__ || defined __OpenBSD__) +#define HAVE_SETPROCTITLE 1 +#else +#define HAVE_SETPROCTITLE 0 +#endif #endif -- cgit v1.2.1