forked from pool/coreutils
Dirk Mueller
ca11210de3
All problems solved, all tests passed OBS-URL: https://build.opensuse.org/request/show/1108292 OBS-URL: https://build.opensuse.org/package/show/Base:System/coreutils?expand=0&rev=352
14 lines
486 B
Diff
14 lines
486 B
Diff
diff --git a/lib/readutmp.c b/lib/readutmp.c
|
|
index 0173b7e0c1..e99158677c 100644
|
|
--- a/lib/readutmp.c
|
|
+++ b/lib/readutmp.c
|
|
@@ -795,7 +795,7 @@ read_utmp_from_systemd (idx_t *n_entries, STRUCT_UTMP **utmp_buf, int options)
|
|
{
|
|
char **sessions;
|
|
int num_sessions = sd_get_sessions (&sessions);
|
|
- if (num_sessions >= 0)
|
|
+ if (num_sessions > 0)
|
|
{
|
|
char **session_ptr;
|
|
for (session_ptr = sessions; *session_ptr != NULL; session_ptr++)
|