about summary refs log tree commit diff
path: root/posix/tst-execv2.c
diff options
context:
space:
mode:
Diffstat (limited to 'posix/tst-execv2.c')
-rw-r--r--posix/tst-execv2.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/posix/tst-execv2.c b/posix/tst-execv2.c
index a5168a269c..5fd6c46c1f 100644
--- a/posix/tst-execv2.c
+++ b/posix/tst-execv2.c
@@ -18,12 +18,8 @@ prepare (int argc, char *argv[])
 {
   char *buf;
   int off;
-  asprintf (&buf, "cp %s %n%s-copy", argv[0], &off, argv[0]);
-  if (buf == NULL)
-    {
-      puts ("asprintf  failed");
-      exit (1);
-    }
+
+  buf = xasprintf ("cp %s %n%s-copy", argv[0], &off, argv[0]);
   if (system (buf) != 0)
     {
       puts ("system  failed");