com php-src: fix constant defined undefined behavior warning: sapi/phpdbg/phpdbg_cmd.c
| From: | Nikita Popov | Date: | Fri, 24 Nov 2017 18:01:46 +0000 |
| Subject: | com php-src: fix constant defined undefined behavior warning: sapi/phpdbg/phpdbg_cmd.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-100364@lists.php.net to get a copy of this message | ||
Commit: 287a2b018402d814fb8b3ee7dd6192491c3adb22
Author: dcarlier <devnexen@gmail.com> Fri, 24 Nov 2017 14:52:53 +0000
Committer: Nikita Popov <nikita.ppv@gmail.com> Fri, 24 Nov 2017 19:01:46 +0100
Parents: a84c7050fd7ee9e737c7cfe5b2405f939d32a291
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=287a2b018402d814fb8b3ee7dd6192491c3adb22
Log:
fix constant defined undefined behavior warning
Changed paths:
M sapi/phpdbg/phpdbg_cmd.c
Diff:
diff --git a/sapi/phpdbg/phpdbg_cmd.c b/sapi/phpdbg/phpdbg_cmd.c
index 8841cc8..6bd6faf 100644
--- a/sapi/phpdbg/phpdbg_cmd.c
+++ b/sapi/phpdbg/phpdbg_cmd.c
@@ -751,7 +751,11 @@ PHPDBG_API char *phpdbg_read_input(char *buffered) /* {{{ */
}
if (buffered == NULL) {
-#define USE_LIB_STAR (defined(HAVE_LIBREADLINE) || defined(HAVE_LIBEDIT))
+#if defined(HAVE_LIBREADLINE) || defined(HAVE_LIBEDIT)
+#define USE_LIB_STAR 1
+#else
+#define USE_LIB_STAR 0
+#endif
/* note: EOF makes readline write prompt again in local console mode - and ignored if compiled
without readline */
#if USE_LIB_STAR
if ((PHPDBG_G(flags) & PHPDBG_IS_REMOTE) || !isatty(PHPDBG_G(io)[PHPDBG_STDIN].fd))