]> Savannah Git Hosting - gnulib.git/commitdiff
isnan: Avoid dangerous shell coding pattern.
authorBruno Haible <bruno@clisp.org>
Sat, 7 Oct 2023 09:42:00 +0000 (11:42 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 7 Oct 2023 09:42:00 +0000 (11:42 +0200)
* m4/isnand.m4 (gl_FUNC_ISNAND): Use 'test -n "$arg"', not
'test "$arg"'.
* m4/isnanf.m4 (gl_FUNC_ISNANF): Likewise.
* m4/isnanl.m4 (gl_FUNC_ISNANL): Likewise.

ChangeLog
m4/isnand.m4
m4/isnanf.m4
m4/isnanl.m4

index 1a0dcd159701192532446ec086d4db5e7aeb1bd4..df6f68ff1eec6daf11a6373f2245c9be4b899957 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2023-10-07  Bruno Haible  <bruno@clisp.org>
+
+       isnan: Avoid dangerous shell coding pattern.
+       * m4/isnand.m4 (gl_FUNC_ISNAND): Use 'test -n "$arg"', not
+       'test "$arg"'.
+       * m4/isnanf.m4 (gl_FUNC_ISNANF): Likewise.
+       * m4/isnanl.m4 (gl_FUNC_ISNANL): Likewise.
+
 2023-10-05  Bruno Haible  <bruno@clisp.org>
 
        doc: Mention xstrerror.
index b106a5dce4399c390217eb024babdf79075528b8..8e4f81346bb96df5a66cdb3777a4415e298ce7d5 100644 (file)
@@ -18,7 +18,7 @@ AC_DEFUN([gl_FUNC_ISNAND],
     fi
   fi
   dnl The variable gl_func_isnand set here is used by isnan.m4.
-  if test $gl_cv_func_isnand_no_libm = yes || test "$ISNAND_LIBM"; then
+  if test $gl_cv_func_isnand_no_libm = yes || test -n "$ISNAND_LIBM"; then
     gl_func_isnand=yes
   else
     gl_func_isnand=no
index f30893c629a6ba13daba3210f1b27c18535e80c8..4871227ea89548fcd0ca46b003fd9383e53668f4 100644 (file)
@@ -18,7 +18,7 @@ AC_DEFUN([gl_FUNC_ISNANF],
     fi
   fi
   dnl The variable gl_func_isnanf set here is used by isnan.m4.
-  if test $gl_cv_func_isnanf_no_libm = yes || test "$ISNANF_LIBM"; then
+  if test $gl_cv_func_isnanf_no_libm = yes || test -n "$ISNANF_LIBM"; then
     save_LIBS="$LIBS"
     LIBS="$LIBS $ISNANF_LIBM"
     gl_ISNANF_WORKS
index 203ab325f5bd51d6de48d56947727f996bdf1ea8..326d5fe11f5685fcee28d1a24790b34f3f3407d7 100644 (file)
@@ -16,7 +16,7 @@ AC_DEFUN([gl_FUNC_ISNANL],
     fi
   fi
   dnl The variable gl_func_isnanl set here is used by isnan.m4.
-  if test $gl_cv_func_isnanl_no_libm = yes || test "$ISNANL_LIBM"; then
+  if test $gl_cv_func_isnanl_no_libm = yes || test -n "$ISNANL_LIBM"; then
     save_LIBS="$LIBS"
     LIBS="$LIBS $ISNANL_LIBM"
     gl_FUNC_ISNANL_WORKS