From c6c7df47a00a8a974eb026f31e94bfc07984ac13 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Tue, 25 Sep 2007 17:30:07 +0000 Subject: Revert last patch --- src/rc-status.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'src/rc-status.c') diff --git a/src/rc-status.c b/src/rc-status.c index 00612177..9ebd56c8 100644 --- a/src/rc-status.c +++ b/src/rc-status.c @@ -33,21 +33,20 @@ static void print_service (char *service) int cols = printf (" %s\n", service); einfo_color_t color = ecolor_bad; - if (rc_service_state (service, rc_service_stopping) == 0) + if (rc_service_state (service, rc_service_stopping)) snprintf (status, sizeof (status), "stopping "); - else if (rc_service_state (service, rc_service_starting) == 0) { + else if (rc_service_state (service, rc_service_starting)) { snprintf (status, sizeof (status), "starting "); color = ecolor_warn; - } else if (rc_service_state (service, rc_service_inactive) == 0) { + } else if (rc_service_state (service, rc_service_inactive)) { snprintf (status, sizeof (status), "inactive "); color = ecolor_warn; - } else if (geteuid () == 0 && - rc_service_state (service, rc_service_crashed) == 0) + } else if (geteuid () == 0 && rc_service_state (service, rc_service_crashed)) snprintf (status, sizeof (status), " crashed "); - else if (rc_service_state (service, rc_service_started) == 0) { + else if (rc_service_state (service, rc_service_started)) { snprintf (status, sizeof (status), " started "); color = ecolor_good; - } else if (rc_service_state (service, rc_service_scheduled) == 0) { + } else if (rc_service_state (service, rc_service_scheduled)) { snprintf (status, sizeof (status), "scheduled"); color = ecolor_warn; } else @@ -108,7 +107,7 @@ int rc_status (int argc, char **argv) STRLIST_FOREACH (services, service, i) { bool found = false; STRLIST_FOREACH (levels, level, j) - if (rc_service_in_runlevel (service, level) == 0) { + if (rc_service_in_runlevel (service, level)) { found = true; break; } -- cgit v1.2.3