coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 1/2] echo: pacify Oracle Studio 12.6


From: Paul Eggert
Subject: [PATCH 1/2] echo: pacify Oracle Studio 12.6
Date: Sun, 31 May 2020 23:33:09 -0700

* src/echo.c (main): Don’t assign pointer to bool.
This is well-defined in C99, but is arguably bad style
and Oracle Studio 12.6 complains.
---
 src/echo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/echo.c b/src/echo.c
index b5a6e966c..e7f3447ee 100644
--- a/src/echo.c
+++ b/src/echo.c
@@ -108,7 +108,7 @@ int
 main (int argc, char **argv)
 {
   bool display_return = true;
-  bool posixly_correct = getenv ("POSIXLY_CORRECT");
+  bool posixly_correct = !!getenv ("POSIXLY_CORRECT");
   bool allow_options =
     (! posixly_correct
      || (! DEFAULT_ECHO_TO_XPG && 1 < argc && STREQ (argv[1], "-n")));
-- 
2.17.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]