]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
dma: use canonical getline() loop
authorEd Maste <emaste@FreeBSD.org>
Thu, 3 Feb 2022 18:51:06 +0000 (13:51 -0500)
committerEd Maste <emaste@FreeBSD.org>
Mon, 26 Sep 2022 14:26:23 +0000 (10:26 -0400)
commit2e8403e0215868a13e2bdd1c979fc351971b8d91
tree6f157a832fb493e350a0ad14212b0b33ac7e5540
parent7b8bb67135f24f6770162deef12b0d34ff4e6677
dma: use canonical getline() loop

getline() returns -1 on erorr or EOF, so use that condition instead of
feof() and check that there was no error after the loop exits.

Reviewed by: bapt, kevans (both earlier)
MFC after: 3 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D34159

(cherry picked from commit d21e71efce3963b068ccaa807a099b591dc220e9)
contrib/dma/mail.c