]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r313948: bsdgrep: fix EOF handling with --mmap
authorkevans <kevans@FreeBSD.org>
Mon, 14 Aug 2017 21:48:50 +0000 (21:48 +0000)
committerkevans <kevans@FreeBSD.org>
Mon, 14 Aug 2017 21:48:50 +0000 (21:48 +0000)
commit03a37e0a48ec05481519ea016980e20a34455673
tree2c23471525b802c6bdaa3b6ce00771ccd43961f2
parentcda5653328ddfb4773a6dcb31e9f15e27d5afa6d
MFC r313948: bsdgrep: fix EOF handling with --mmap

Rework part of the loop in grep_fgetln to return the rest of the line
and ensure that we still advance the buffer by the length of the rest
of the line.

PR: 165471
Approved by: emaste (mentor)
usr.bin/grep/file.c