]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
tests: Remove NULL check for an array
authorSiddhesh Poyarekar <siddhesh@sourceware.org>
Wed, 11 Nov 2020 17:23:50 +0000 (22:53 +0530)
committerSiddhesh Poyarekar <siddhesh@sourceware.org>
Thu, 12 Nov 2020 07:59:59 +0000 (13:29 +0530)
The NULL check for an array on stack is pointless since it will always
be false, so drop it.

stdio-common/scanf14.c
stdio-common/scanf15.c
stdio-common/scanf16.c
stdio-common/scanf17.c

index f92838edd2ffff25a45237703ecef40014b90279..4c2feea7ba309e80471298dcc14739393b8e8068 100644 (file)
@@ -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);
index a937815b140b41542eb54468ebc7627baf6bdeec..6e4980c2e14b33f6ffa96ee132acb6a967654fd4 100644 (file)
@@ -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);
index b4ba3e6fe3dc8f5d381dbb0183f81a9a2fa65c33..073a77efbe1cbad7f2b13324e1e3cd23e5f5841d 100644 (file)
@@ -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);
index 428f22e45c8a73eed2edb611fc3737dd190f5ad4..3224573733ed18404e31678d1a48bdc4d67352f5 100644 (file)
@@ -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);