Don't check & errx() after each and every invocation of
authorkrw <krw@openbsd.org>
Sun, 15 Aug 2021 13:45:42 +0000 (13:45 +0000)
committerkrw <krw@openbsd.org>
Sun, 15 Aug 2021 13:45:42 +0000 (13:45 +0000)
commit12deea296f5a404f7217078a9573ba071f4f05bb
treed08d64db2c220cb86ef52861ff297c5c91d6eb59
parent44f8884c2e2eac2b5596ad4bdb4a616ff8467ff3
Don't check & errx() after each and every invocation of
string_from_line(). Just errx() inside string_from_line() if
getline() fails.

Use strcspn() idiom to nuke '\n' returned by getline().

No functional change.
sbin/fdisk/cmd.c
sbin/fdisk/misc.c
sbin/fdisk/misc.h
sbin/fdisk/user.c