From patchwork Wed Jul 2 11:31:57 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Siddhesh Poyarekar X-Patchwork-Id: 1850 Received: (qmail 16037 invoked by alias); 2 Jul 2014 11:30:34 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 15962 invoked by uid 89); 2 Jul 2014 11:30:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.5 required=5.0 tests=AWL, BAYES_00, SPF_HELO_PASS, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Date: Wed, 2 Jul 2014 17:01:57 +0530 From: Siddhesh Poyarekar To: libc-alpha@sourceware.org Subject: [COMMITTED] Fix style and typos in loadmsgcat.c Message-ID: <20140702113157.GI20796@spoyarek.pnq.redhat.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.22.1-rc1 (2013-10-16) 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 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 --git a/ChangeLog b/ChangeLog index 56c35ef..0bc442f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2014-07-02 Siddhesh Poyarekar + * 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 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;