From: Dmitry V. Levin Date: Sun, 4 Sep 2016 22:16:46 +0000 (+0000) Subject: tests: use sprintrc in epoll_create1.test X-Git-Tag: v4.14~118 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1b36107cc24acb366beca098769440f57fe41964;p=strace tests: use sprintrc in epoll_create1.test * tests/epoll_create1.c (main): Use sprintrc. --- diff --git a/tests/epoll_create1.c b/tests/epoll_create1.c index 1c196eac..cd905ecb 100644 --- a/tests/epoll_create1.c +++ b/tests/epoll_create1.c @@ -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;