This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch, master, updated. glibc-2.14-116-gb902330


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  b902330ca8abb08c2114aa9636c77ac0553257f9 (commit)
      from  80029994814f0718aef9568c90f04b3d9a31802c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b902330ca8abb08c2114aa9636c77ac0553257f9

commit b902330ca8abb08c2114aa9636c77ac0553257f9
Author: Marek Polacek <mpolacek@redhat.com>
Date:   Tue Jul 19 20:13:31 2011 -0400

    Avoid warning in nscd config file parsing code

diff --git a/ChangeLog b/ChangeLog
index e3dc2ee..e24f33e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-07-15  Marek Polacek  <mpolacek@redhat.com>
+
+	* nscd/nscd_conf.c (nscd_parse_file): Remove unnecessary condition
+	in the reload-count case.
+
 2011-07-15  Liubov Dmitrieva  <liubov.dmitrieva@intel.com>
 
 	* sysdeps/x86_64/multiarch/Makefile (sysdep_routines): Add
diff --git a/nscd/nscd_conf.c b/nscd/nscd_conf.c
index 9d0ef0e..3b6cbb0 100644
--- a/nscd/nscd_conf.c
+++ b/nscd/nscd_conf.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 1998, 2000, 2003-2007, 2008 Free Software Foundation, Inc.
+/* Copyright (c) 1998, 2000, 2003-2008, 2011 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Thorsten Kukuk <kukuk@suse.de>, 1998.
 
@@ -189,17 +189,17 @@ nscd_parse_file (const char *fname, struct database_dyn dbs[lastdb])
 	  max_nthreads = MAX (atol (arg1), lastdb);
 	}
       else if (strcmp (entry, "server-user") == 0)
-        {
-          if (!arg1)
-            error (0, 0, _("Must specify user name for server-user option"));
-          else
-            server_user = xstrdup (arg1);
-        }
+	{
+	  if (!arg1)
+	    error (0, 0, _("Must specify user name for server-user option"));
+	  else
+	    server_user = xstrdup (arg1);
+	}
       else if (strcmp (entry, "stat-user") == 0)
-        {
-          if (arg1 == NULL)
-            error (0, 0, _("Must specify user name for stat-user option"));
-          else
+	{
+	  if (arg1 == NULL)
+	    error (0, 0, _("Must specify user name for stat-user option"));
+	  else
 	    {
 	      stat_user = xstrdup (arg1);
 
@@ -207,7 +207,7 @@ nscd_parse_file (const char *fname, struct database_dyn dbs[lastdb])
 	      if (pw != NULL)
 		stat_uid = pw->pw_uid;
 	    }
-        }
+	}
       else if (strcmp (entry, "persistent") == 0)
 	{
 	  int idx = find_db (arg1);
@@ -236,13 +236,11 @@ nscd_parse_file (const char *fname, struct database_dyn dbs[lastdb])
 	    reload_count = UINT_MAX;
 	  else
 	    {
-	      unsigned int count = strtoul (arg1, NULL, 0);
+	      unsigned long int count = strtoul (arg1, NULL, 0);
 	      if (count > UINT8_MAX - 1)
 		reload_count = UINT_MAX;
-	      else if (count >= 0)
-	    reload_count = count;
 	      else
-		error (0, 0, _("invalid value for 'reload-count': %u"), count);
+		reload_count = count;
 	    }
 	}
       else if (strcmp (entry, "paranoia") == 0)
@@ -257,7 +255,7 @@ nscd_parse_file (const char *fname, struct database_dyn dbs[lastdb])
 	  if (arg1 != NULL)
 	    restart_interval = atol (arg1);
 	  else
-            error (0, 0, _("Must specify value for restart-interval option"));
+	    error (0, 0, _("Must specify value for restart-interval option"));
 	}
       else if (strcmp (entry, "auto-propagate") == 0)
 	{

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog        |    5 +++++
 nscd/nscd_conf.c |   32 +++++++++++++++-----------------
 2 files changed, 20 insertions(+), 17 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]