mirror of
https://github.com/systemd/systemd.git
synced 2025-01-25 10:04:04 +03:00
fileio: return 0 from read_one_line_file on success
Fixup for f4b51a2d09. Suggested by Evgeny Vereshchagin.
This commit is contained in:
parent
2c9de13912
commit
2e33df93de
@ -178,6 +178,7 @@ fail:
|
||||
|
||||
int read_one_line_file(const char *fn, char **line) {
|
||||
_cleanup_fclose_ FILE *f = NULL;
|
||||
int r;
|
||||
|
||||
assert(fn);
|
||||
assert(line);
|
||||
@ -186,7 +187,8 @@ int read_one_line_file(const char *fn, char **line) {
|
||||
if (!f)
|
||||
return -errno;
|
||||
|
||||
return read_line(f, LONG_LINE_MAX, line);
|
||||
r = read_line(f, LONG_LINE_MAX, line);
|
||||
return r < 0 ? r : 0;
|
||||
}
|
||||
|
||||
int verify_file(const char *fn, const char *blob, bool accept_extra_nl) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user