]> granicus.if.org Git - strace/commitdiff
tests: use sprintrc in epoll_create1.test
authorDmitry V. Levin <ldv@altlinux.org>
Sun, 4 Sep 2016 22:16:46 +0000 (22:16 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Mon, 5 Sep 2016 15:58:35 +0000 (15:58 +0000)
* tests/epoll_create1.c (main): Use sprintrc.

tests/epoll_create1.c

index 1c196eac83f224e230a803b5d6f1fed6cefaf7b3..cd905ecb15196bf147bb34f4c191127c8f056d77 100644 (file)
@@ -38,16 +38,11 @@ int
 main(void)
 {
        long rc = syscall(__NR_epoll_create1, O_CLOEXEC);
-       if (rc == -1) {
-               printf("epoll_create1(EPOLL_CLOEXEC) = -1 %s (%m)\n",
-                      errno2name());
-       } else {
-               printf("epoll_create1(EPOLL_CLOEXEC) = %ld\n", rc);
-       }
+       printf("epoll_create1(EPOLL_CLOEXEC) = %s\n", sprintrc(rc));
 
        rc = syscall(__NR_epoll_create1, O_CLOEXEC | O_NONBLOCK);
-       printf("epoll_create1(EPOLL_CLOEXEC|%#x) = %ld %s (%m)\n",
-              O_NONBLOCK, rc, errno2name());
+       printf("epoll_create1(EPOLL_CLOEXEC|%#x) = %s\n",
+              O_NONBLOCK, sprintrc(rc));
 
        puts("+++ exited with 0 +++");
        return 0;