tests/dup3.c: print syscall() result using %ld format
authorDmitry V. Levin <ldv@altlinux.org>
Thu, 21 Apr 2016 20:34:56 +0000 (20:34 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Thu, 21 Apr 2016 20:52:41 +0000 (20:52 +0000)
tests/dup3.c

index f2c6a31e07e215eb69807979575ae248c2db043c..c979fcf34b1afe9930ddc666c9a987d552a7df75 100644 (file)
@@ -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;