From 22f9fa7fd992f152c7a0e66f69192d4a356a61b6 Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Thu, 21 Apr 2016 20:34:56 +0000 Subject: [PATCH] tests/dup3.c: print syscall() result using %ld format --- tests/dup3.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/dup3.c b/tests/dup3.c index f2c6a31e..c979fcf3 100644 --- a/tests/dup3.c +++ b/tests/dup3.c @@ -13,10 +13,10 @@ main(void) { const long int fd_old = (long int) 0xdeadbeefffffffff; const long int fd_new = (long int) 0xdeadbeeffffffffe; - int rc = syscall(__NR_dup3, fd_old, fd_new, O_CLOEXEC); - printf("dup3(%d, %d, O_CLOEXEC) = %d %s (%m)\n", - (int) fd_old, (int) fd_new, rc, - errno2name()); + + long rc = syscall(__NR_dup3, fd_old, fd_new, O_CLOEXEC); + printf("dup3(%d, %d, O_CLOEXEC) = %ld %s (%m)\n", + (int) fd_old, (int) fd_new, rc, errno2name()); puts("+++ exited with 0 +++"); return 0; -- 2.40.0