From eb0e8fa0b1960cff4bd65ebefc798f70273b0bc9 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Sun, 17 Apr 2011 16:32:15 -0400 Subject: debloat: use __syscall instead of syscall where possible don't waste time (and significant code size due to function call overhead!) setting errno when the result of a syscall does not matter or when it can't fail. --- src/stdio/__fdopen.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/stdio/__fdopen.c') diff --git a/src/stdio/__fdopen.c b/src/stdio/__fdopen.c index a0102674..b13318e5 100644 --- a/src/stdio/__fdopen.c +++ b/src/stdio/__fdopen.c @@ -20,8 +20,8 @@ FILE *__fdopen(int fd, const char *mode) /* Set append mode on fd if opened for append */ if (*mode == 'a') { - int flags = syscall(SYS_fcntl, fd, F_GETFL, 0); - syscall(SYS_fcntl, fd, F_SETFL, flags | O_APPEND); + int flags = __syscall(SYS_fcntl, fd, F_GETFL); + __syscall(SYS_fcntl, fd, F_SETFL, flags | O_APPEND); } f->fd = fd; -- cgit v1.2.1