[Toybox] [PATCH] getline() returns -1 on EOF, not 0.

enh enh at google.com
Fri Sep 24 16:51:33 PDT 2021


...but you can get 0 if you have a "no newline at end of file" file.

I've been through all the current callers, and just these ones weren't
using the canonical test.
---
 toys/lsb/mount.c       | 2 +-
 toys/pending/init.c    | 2 +-
 toys/pending/lsof.c    | 2 +-
 toys/pending/userdel.c | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20210924/cefa6cc1/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-getline-returns-1-on-EOF-not-0.patch
Type: text/x-patch
Size: 2382 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20210924/cefa6cc1/attachment.bin>


More information about the Toybox mailing list