about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSiddhesh Poyarekar <siddhesh@sourceware.org>2020-11-11 22:53:50 +0530
committerSiddhesh Poyarekar <siddhesh@sourceware.org>2020-11-12 13:29:59 +0530
commitee9946ce3c176092fb5fbabc7406a39479565a1b (patch)
tree9c6f76b397704070142b97bf14a3bea516c728db
parent85741f7eba716db09f586bc94aaa9a6b5dc2347f (diff)
downloadglibc-ee9946ce3c176092fb5fbabc7406a39479565a1b.tar.gz
glibc-ee9946ce3c176092fb5fbabc7406a39479565a1b.tar.xz
glibc-ee9946ce3c176092fb5fbabc7406a39479565a1b.zip
tests: Remove NULL check for an array
The NULL check for an array on stack is pointless since it will always
be false, so drop it.
-rw-r--r--stdio-common/scanf14.c2
-rw-r--r--stdio-common/scanf15.c2
-rw-r--r--stdio-common/scanf16.c2
-rw-r--r--stdio-common/scanf17.c2
4 files changed, 0 insertions, 8 deletions
diff --git a/stdio-common/scanf14.c b/stdio-common/scanf14.c
index f92838edd2..4c2feea7ba 100644
--- a/stdio-common/scanf14.c
+++ b/stdio-common/scanf14.c
@@ -86,8 +86,6 @@ main (void)
 
   char fname[strlen (tmpdir) + sizeof "/tst-scanf14.XXXXXX"];
   sprintf (fname, "%s/tst-scanf14.XXXXXX", tmpdir);
-  if (fname == NULL)
-    FAIL ();
 
   /* Create a temporary file.   */
   int fd = mkstemp (fname);
diff --git a/stdio-common/scanf15.c b/stdio-common/scanf15.c
index a937815b14..6e4980c2e1 100644
--- a/stdio-common/scanf15.c
+++ b/stdio-common/scanf15.c
@@ -69,8 +69,6 @@ main (void)
 
   char fname[strlen (tmpdir) + sizeof "/tst-scanf15.XXXXXX"];
   sprintf (fname, "%s/tst-scanf15.XXXXXX", tmpdir);
-  if (fname == NULL)
-    FAIL ();
 
   /* Create a temporary file.   */
   int fd = mkstemp (fname);
diff --git a/stdio-common/scanf16.c b/stdio-common/scanf16.c
index b4ba3e6fe3..073a77efbe 100644
--- a/stdio-common/scanf16.c
+++ b/stdio-common/scanf16.c
@@ -117,8 +117,6 @@ main (void)
 
   char fname[strlen (tmpdir) + sizeof "/tst-scanf16.XXXXXX"];
   sprintf (fname, "%s/tst-scanf16.XXXXXX", tmpdir);
-  if (fname == NULL)
-    FAIL ();
 
   /* Create a temporary file.   */
   int fd = mkstemp (fname);
diff --git a/stdio-common/scanf17.c b/stdio-common/scanf17.c
index 428f22e45c..3224573733 100644
--- a/stdio-common/scanf17.c
+++ b/stdio-common/scanf17.c
@@ -100,8 +100,6 @@ main (void)
 
   char fname[strlen (tmpdir) + sizeof "/tst-scanf17.XXXXXX"];
   sprintf (fname, "%s/tst-scanf17.XXXXXX", tmpdir);
-  if (fname == NULL)
-    FAIL ();
 
   /* Create a temporary file.   */
   int fd = mkstemp (fname);