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.
This commit is contained in:
Rich Felker committed 2011-04-17 16:32:15 -04:00
1 parent 09dae2b7b6
commit eb0e8fa0b1
7 files changed
+8 -8

No files matched your search

+2 -2
View File
@@ -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;