]> granicus.if.org Git - strace/commitdiff
tests/unlinkat.c: print syscall() result using %ld format
authorDmitry V. Levin <ldv@altlinux.org>
Thu, 21 Apr 2016 21:32:28 +0000 (21:32 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Thu, 21 Apr 2016 22:05:56 +0000 (22:05 +0000)
tests/unlinkat.c

index 8f3cd64c1a1492ef3299e3dc89a0c51781315763..81d690b3507bd92b08fc989cde4180e33cecb6b2 100644 (file)
@@ -13,13 +13,12 @@ main(void)
        static const char sample[] = "unlinkat_sample";
        const long fd = (long) 0xdeadbeefffffffff;
 
-       int rc = syscall(__NR_unlinkat, fd, sample, 0);
-       printf("unlinkat(%d, \"%s\", 0) = %d %s (%m)\n",
-              (int) fd, sample, rc,
-              errno2name());
+       long rc = syscall(__NR_unlinkat, fd, sample, 0);
+       printf("unlinkat(%d, \"%s\", 0) = %ld %s (%m)\n",
+              (int) fd, sample, rc, errno2name());
 
        rc = syscall(__NR_unlinkat, -100, sample, -1L);
-       printf("unlinkat(%s, \"%s\", %s) = %d %s (%m)\n",
+       printf("unlinkat(%s, \"%s\", %s) = %ld %s (%m)\n",
               "AT_FDCWD", sample,
               "AT_SYMLINK_NOFOLLOW|AT_REMOVEDIR|AT_SYMLINK_FOLLOW"
               "|AT_NO_AUTOMOUNT|AT_EMPTY_PATH|0xffffe0ff",