diff options
author | Dmitry V. Levin <ldv@altlinux.org> | 2018-06-01 01:46:06 +0000 |
---|---|---|
committer | Dmitry V. Levin <ldv@altlinux.org> | 2018-06-01 01:46:06 +0000 |
commit | b6542c5068979f8152bf75101f8394f8d4770e9c (patch) | |
tree | ba644d841628cc0f2020625cc6631838bb5f0612 /tests/fcntl.c | |
parent | 419da8e231070555cadaef03c85f09c3f10b1a15 (diff) | |
download | strace-b6542c5068979f8152bf75101f8394f8d4770e9c.tar.gz |
tests/fcntl-common.c: define and initialize errstr
Initialize errstr inside invoke_test_syscall so that its users
won't have to go into trouble of caring about clobbering errno.
* tests/fcntl-common.c (errstr): New variable.
(invoke_test_syscall): Initialize it.
(test_flock_einval, test_flock64_einval, test_flock,
test_f_owner_ex_type_pid): Use it.
* tests/fcntl.c (test_flock64_undecoded): Likewise.
* tests/fcntl64.c (test_flock64_lk64): Likewise.
Diffstat (limited to 'tests/fcntl.c')
-rw-r--r-- | tests/fcntl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/fcntl.c b/tests/fcntl.c index fc494d5ef..3f763b637 100644 --- a/tests/fcntl.c +++ b/tests/fcntl.c @@ -43,9 +43,9 @@ test_flock64_undecoded(const int cmd, const char *name) .l_start = 0xdefaced1facefeedULL, .l_len = 0xdefaced2cafef00dULL }; - long rc = invoke_test_syscall(0, cmd, &fl); + invoke_test_syscall(0, cmd, &fl); printf("%s(0, %s, %p) = %s\n", - TEST_SYSCALL_STR, name, &fl, sprintrc(rc)); + TEST_SYSCALL_STR, name, &fl, errstr); } #define TEST_FLOCK64_UNDECODED(cmd) test_flock64_undecoded(cmd, #cmd) |