diff mbox

[COMMITTED] Fix style and typos in loadmsgcat.c

Message ID 20140702113157.GI20796@spoyarek.pnq.redhat.com
State Committed
Headers show

Commit Message

Siddhesh Poyarekar July 2, 2014, 11:31 a.m. UTC
Hi,

I committed the following fixes to formatting in loadmsgcat.c to
reduce the differences with the gettext version of loadmsgcat.c.

Siddhesh

commit d4eb8195e58b26510acf0676df5a99d07d6193b4
Author: Siddhesh Poyarekar <siddhesh@redhat.com>
Date:   Wed Jul 2 16:57:48 2014 +0530

    Fix typo and formatting in loadmsgcat.c
    
    This reduces the differences with gettext version of loadmsgcat.c
diff mbox

Patch

diff --git a/ChangeLog b/ChangeLog
index 56c35ef..0bc442f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@ 
 2014-07-02  Siddhesh Poyarekar  <siddhesh@redhat.com>
 
+	* intl/loadmsgcat.c: Remove declaration of
+	get_sysdep_segment_value.
+	(get_sysdep_segment_value): Use ISO C style.
+	(_nl_load_domain): Use ISO C style.  Get rid of redundant
+	semicolon.  Fix typo and formatting in comment.
+	(_nl_unload_domain): Use ISO C style.
+
 	* sysdeps/posix/sysconf.c (__sysconf): Fix typo in macro name.
 
 2014-07-02  Will Newton  <will.newton@linaro.org>
diff --git a/intl/loadmsgcat.c b/intl/loadmsgcat.c
index b96a997..325d699 100644
--- a/intl/loadmsgcat.c
+++ b/intl/loadmsgcat.c
@@ -472,12 +472,6 @@  char *alloca ();
 # define freea(p) free (p)
 #endif
 
-
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-static const char *get_sysdep_segment_value PARAMS ((const char *name));
-
-
 /* We need a sign, whether a new catalog was loaded, which can be associated
    with all translations.  This is important if the translations are
    cached by one of GCC's features.  */
@@ -486,8 +480,7 @@  int _nl_msg_cat_cntr;
 
 /* Expand a system dependent string segment.  Return NULL if unsupported.  */
 static const char *
-get_sysdep_segment_value (name)
-     const char *name;
+get_sysdep_segment_value (const char *name)
 {
   /* Test for an ISO C 99 section 7.8.1 format string directive.
      Syntax:
@@ -756,9 +749,8 @@  get_sysdep_segment_value (name)
    message catalog do nothing.  */
 void
 internal_function
-_nl_load_domain (domain_file, domainbinding)
-     struct loaded_l10nfile *domain_file;
-     struct binding *domainbinding;
+_nl_load_domain (struct loaded_l10nfile *domain_file,
+		 struct binding *domainbinding)
 {
   __libc_lock_define_initialized_recursive (static, lock);
   int fd = -1;
@@ -780,12 +772,11 @@  _nl_load_domain (domain_file, domainbinding)
     {
       /* There are two possibilities:
 
-         + is is the same thread calling again during this
-	   initialization via _nl_find_msg.  We have initialized
-	   everything this call needs.
+	 + this is the same thread calling again during this initialization
+	   via _nl_find_msg.  We have initialized everything this call needs.
 
 	 + this is another thread which tried to initialize this object.
-           Not necessary anymore since if the lock is available this
+	   Not necessary anymore since if the lock is available this
 	   is finished.
       */
       __libc_lock_unlock_recursive (lock);
@@ -821,7 +812,7 @@  _nl_load_domain (domain_file, domainbinding)
       || __builtin_expect ((size = (size_t) st.st_size) != st.st_size, 0)
       || __builtin_expect (size < sizeof (struct mo_file_header), 0))
     /* Something went wrong.  */
-    goto out;;
+    goto out;
 
 #ifdef HAVE_MMAP
   /* Now we are ready to load the file.  If mmap() is available we try
@@ -1277,8 +1268,7 @@  _nl_load_domain (domain_file, domainbinding)
 #ifdef _LIBC
 void
 internal_function __libc_freeres_fn_section
-_nl_unload_domain (domain)
-     struct loaded_domain *domain;
+_nl_unload_domain (struct loaded_domain *domain)
 {
   size_t i;