]> granicus.if.org Git - strace/commitdiff
tests/splice.c: stop using assert
authorDmitry V. Levin <ldv@altlinux.org>
Thu, 21 Apr 2016 21:24:01 +0000 (21:24 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Thu, 21 Apr 2016 22:05:56 +0000 (22:05 +0000)
tests/splice.c

index 81b5c9b904f54af6dd30078df164efdb39c546d4..b3f3f08095786f72db0e69e1df05be84181226ba 100644 (file)
@@ -49,12 +49,13 @@ main(void)
        const size_t len = (size_t) 0xdeadbef3facefed3ULL;
        const unsigned int flags = 15;
 
-       assert(syscall(__NR_splice, fd_in, off_in, fd_out, off_out,
-                      len, flags) == -1);
-       printf("splice(%d, [%lld], %d, [%lld], %zu, %s) = -1 %s (%m)\n",
+       long rc = syscall(__NR_splice,
+                         fd_in, off_in, fd_out, off_out, len, flags);
+       printf("splice(%d, [%lld], %d, [%lld], %zu, %s) = %ld %s (%m)\n",
               (int) fd_in, *off_in, (int) fd_out, *off_out, len,
               "SPLICE_F_MOVE|SPLICE_F_NONBLOCK|SPLICE_F_MORE|SPLICE_F_GIFT",
-              errno2name());
+              rc, errno2name());
+
        puts("+++ exited with 0 +++");
        return 0;
 }