]> git.ipfire.org Git - thirdparty/systemd.git/commit
basic/fileio: use strdup_to_full() in read_stripped_line()
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 19 Mar 2024 17:29:40 +0000 (18:29 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 20 Mar 2024 14:18:21 +0000 (15:18 +0100)
commit94b75cdb06aae1e5fe91f5846dbed5781f8d5ecb
tree50a2c9d289f5e1a50d70fb638625d4f717bb3255
parent4f77ddca591a25779407a89ca959d8b0176b2d4d
basic/fileio: use strdup_to_full() in read_stripped_line()

The return value of read_stripped_line() is changed. Before we'd return the
number of characters read, but that number was not meaningful after we called
strstrip(). So just return 0 if nothing was read (EOF), and 1 if something was
read (not EOF). All the callers were only checking for <0 or ==0.
src/basic/fileio.c