projects
/
strace
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
65dea4b
)
tests/dup3.c: print syscall() result using %ld format
author
Dmitry V. Levin
<ldv@altlinux.org>
Thu, 21 Apr 2016 20:34:56 +0000
(20:34 +0000)
committer
Dmitry V. Levin
<ldv@altlinux.org>
Thu, 21 Apr 2016 20:52:41 +0000
(20:52 +0000)
tests/dup3.c
patch
|
blob
|
history
diff --git
a/tests/dup3.c
b/tests/dup3.c
index f2c6a31e07e215eb69807979575ae248c2db043c..c979fcf34b1afe9930ddc666c9a987d552a7df75 100644
(file)
--- 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;