librc: fix getline return value check

Bug: https://bugs.gentoo.org/939758
Fixes: 0702a064a9
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
This commit is contained in:
Mike Gilbert 2024-09-16 23:05:39 -04:00 committed by navi
parent 123872c5a0
commit 8cafbb76bc
1 changed files with 1 additions and 1 deletions

View File

@ -142,7 +142,7 @@ rc_proc_getent(const char *ent RC_UNUSED)
return NULL;
i = 0;
if ((size = getline(&proc, &i, fp) == -1)) {
if ((size = getline(&proc, &i, fp)) == -1) {
free(proc);
return NULL;
}