HomeFreeBSD

ngctl: Fix getline loop

Description

ngctl: Fix getline loop

I misremembered when I wrote this code: getline() returns -1 on EOF, not
zero, so the loop condition and the error check are both incorrect
(though in practice getline() will never return 0).

MFC after: 3 days
Fixes: 3cbdcabf714d ("ngctl: Modernize code somewhat")
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D55487

Details

Provenance
desAuthored on Feb 24 2026, 2:23 PM
Reviewer
markj
Differential Revision
D55487: ngctl: Fix getline loop
Parents
rGb7ef4f4b230f: sys: Restore sorting in sys/elf_common.h
Branches
Unknown
Tags
Unknown