From: Dmitry V. Levin Date: Thu, 21 Apr 2016 20:39:58 +0000 (+0000) Subject: tests/fchmodat.c: use errno2name X-Git-Tag: v4.12~354 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bf563a9ea3ae74304e91462c599d55d5f5996e7d;p=strace tests/fchmodat.c: use errno2name --- diff --git a/tests/fchmodat.c b/tests/fchmodat.c index 6281fcf6..11883600 100644 --- a/tests/fchmodat.c +++ b/tests/fchmodat.c @@ -41,7 +41,6 @@ int main(void) { static const char sample[] = "fchmodat_sample"; - const char *err; if (open(sample, O_RDONLY | O_CREAT, 0400) == -1) perror_msg_and_fail("open"); @@ -54,16 +53,10 @@ main(void) if (syscall(__NR_fchmodat, -100, sample, 0600) != -1) perror_msg_and_fail("fchmodat"); - - err = "ENOENT"; - } else { - if (errno != ENOSYS) - perror_msg_and_fail("fchmodat"); - err = "ENOSYS"; } printf("fchmodat(AT_FDCWD, \"%s\", 0600) = -1 %s (%m)\n", - sample, err); + sample, errno2name()); puts("+++ exited with 0 +++"); return 0;