tests: Remove NULL check for an array
Commit Message
The NULL check for an array on stack is pointless since it will always
be false, so drop it.
---
This is fairly obvious, so I'll commit it in a day if nobody objects.
Siddhesh
stdio-common/scanf14.c | 2 --
stdio-common/scanf15.c | 2 --
stdio-common/scanf16.c | 2 --
stdio-common/scanf17.c | 2 --
4 files changed, 8 deletions(-)
Comments
On 11/11/20 10:59 PM, Siddhesh Poyarekar via Libc-alpha wrote:
> The NULL check for an array on stack is pointless since it will always
> be false, so drop it.
> ---
>
> This is fairly obvious, so I'll commit it in a day if nobody objects.
Committed now.
Siddhesh
@@ -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);
@@ -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);
@@ -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);
@@ -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);