about summary refs log tree commit diff
path: root/stdio-common/tst-fseek.c
diff options
context:
space:
mode:
Diffstat (limited to 'stdio-common/tst-fseek.c')
-rw-r--r--stdio-common/tst-fseek.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/stdio-common/tst-fseek.c b/stdio-common/tst-fseek.c
index c4ac17cdf4..386dd1dd51 100644
--- a/stdio-common/tst-fseek.c
+++ b/stdio-common/tst-fseek.c
@@ -25,6 +25,7 @@
 #include <time.h>
 #include <sys/stat.h>
 
+#include <support/support.h>
 
 static int
 do_test (void)
@@ -44,9 +45,7 @@ do_test (void)
   if (tmpdir == NULL || tmpdir[0] == '\0')
     tmpdir = "/tmp";
 
-  asprintf (&fname, "%s/tst-fseek.XXXXXX", tmpdir);
-  if (fname == NULL)
-    error (EXIT_FAILURE, errno, "cannot generate name for temporary file");
+  fname = xasprintf ("%s/tst-fseek.XXXXXX", tmpdir);
 
   /* Create a temporary file.   */
   fd = mkstemp (fname);