Displaying 1 result from an estimated 1 matches for "5d2c3f0".
2014 Apr 09
0
[klibc:master] fwrite: use memrchr() to find the final ' \n' in _IOLBF mode
...haracter in the string.)
Use memrchr() instead of open-coding it.
Signed-off-by: H. Peter Anvin <hpa at linux.intel.com>
---
usr/klibc/stdio/fwrite.c | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)
diff --git a/usr/klibc/stdio/fwrite.c b/usr/klibc/stdio/fwrite.c
index 5d2c3f0..71ee75c 100644
--- a/usr/klibc/stdio/fwrite.c
+++ b/usr/klibc/stdio/fwrite.c
@@ -59,6 +59,7 @@ size_t _fwrite(const void *buf, size_t count, FILE *file)
size_t bytes = 0;
size_t pf_len, pu_len;
const char *p = buf;
+ const char *q;
/* We divide the data into two chunks, flushed (pf)...