Skip to content

Commit

Permalink
librc: fix getline return value check
Browse files Browse the repository at this point in the history
Bug: https://bugs.gentoo.org/939758
Fixes: 0702a06
Signed-off-by: Mike Gilbert <[email protected]>
  • Loading branch information
floppym committed Sep 17, 2024
1 parent 123872c commit f81f276
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librc/librc-misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit f81f276

Please sign in to comment.