commit | a51893a6d52a8cdf247cb1bd10dd8987d4d7eb49 | [log] [tgz] |
---|---|---|
author | H. Peter Anvin <hpa@linux.intel.com> | Wed Apr 09 16:51:10 2014 -0700 |
committer | H. Peter Anvin <hpa@linux.intel.com> | Wed Apr 09 16:51:10 2014 -0700 |
tree | 40236fab3b43770c581b5cc849724536e091e31a | |
parent | e845d9b10c5699ef5f2f41a117f2211508f3d6bf [diff] |
[klibc] fwrite: use memrchr() to find the final '\n' in _IOLBF mode In line buffered mode, we need to split the write at the final '\n' (which usually, but not always, is the last character in the string.) Use memrchr() instead of open-coding it. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>