Remove unnecessary duplicate #ifdef USE_SYSTEMD around the else
branch for utmpx-based user counting. Use the same pattern as
USE_NETLINK where the else and opening brace are split across the
endif boundary.
Signed-off-by: Karel Zak <kzak@redhat.com>
users = sd_get_sessions(NULL);
if (users < 0)
users = 0;
- } else {
+ } else
#endif
+ {
users = 0;
struct utmpx *ut;
setutxent();
if (ut->ut_type == USER_PROCESS)
users++;
endutxent();
-#ifdef USE_SYSTEMD
}
-#endif
if (c == 'U')
fprintf(ie->output, P_("%d user", "%d users", users), users);
else