about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAndreas Jaeger <aj@suse.de>2012-05-09 17:41:25 +0200
committerAndreas Jaeger <aj@suse.de>2012-05-09 17:42:15 +0200
commit91d8d69ec6bc407af06125c4c98f70e3a43f3b38 (patch)
treefa6984cc5a9e7798406e4398d60089d998c82e0c
parentbb90b80baa683336584716122f529b039c48d3af (diff)
downloadglibc-91d8d69ec6bc407af06125c4c98f70e3a43f3b38.tar.gz
glibc-91d8d69ec6bc407af06125c4c98f70e3a43f3b38.tar.xz
glibc-91d8d69ec6bc407af06125c4c98f70e3a43f3b38.zip
Cleanup last patch for nscd/nscd.c
	* nscd/nscd.c (run_mode): Use enum.
	(main): Cleanup coding style issue.
-rw-r--r--ChangeLog6
-rw-r--r--nscd/nscd.c7
2 files changed, 9 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 7cee81a624..6d7243b27b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2012-05-09  Andreas Jaeger  <aj@suse.de>
+	    Pedro Alves  <palves@redhat.com>
+
+	* nscd/nscd.c (run_mode): Use enum.
+	(main): Cleanup coding style issue.
+
 2012-05-09  Alexandre Oliva  <aoliva@redhat.com>
 	    Andreas Jaeger  <aj@suse.de>
 
diff --git a/nscd/nscd.c b/nscd/nscd.c
index 38a1421082..e22d8e8320 100644
--- a/nscd/nscd.c
+++ b/nscd/nscd.c
@@ -72,7 +72,7 @@ int do_shutdown;
 int disabled_passwd;
 int disabled_group;
 
-enum
+static enum
 {
   /* Running in foreground but otherwise behave like a daemon,
      i.e., detach from terminal and use syslog.  This allows
@@ -82,8 +82,7 @@ enum
   RUN_DAEMONIZE,
   /* Run in foreground in debug mode.  */
   RUN_DEBUG
-};
-static int run_mode = RUN_DAEMONIZE;
+} run_mode = RUN_DAEMONIZE;
 
 static const char *conffile = _PATH_NSCDCONF;
 
@@ -187,7 +186,7 @@ main (int argc, char **argv)
   /* Determine page size.  */
   pagesize_m1 = getpagesize () - 1;
 
-  if ((run_mode == RUN_DAEMONIZE) || (run_mode == RUN_FOREGROUND))
+  if (run_mode == RUN_DAEMONIZE || run_mode == RUN_FOREGROUND)
     {
       int i;
       pid_t pid;