git: 8a8709c408fc - stable/13 - libc/locale/xlocale.c: minor style

From: Konstantin Belousov <kib_at_FreeBSD.org>
Date: Wed, 09 Feb 2022 00:48:05 UTC
The branch stable/13 has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=8a8709c408fcf1570204b3674bfcba2b02b57337

commit 8a8709c408fcf1570204b3674bfcba2b02b57337
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2022-02-02 17:23:14 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2022-02-09 00:42:45 +0000

    libc/locale/xlocale.c: minor style
    
    (cherry picked from commit aaa6fa65a6a03ca6cef9bde47341a2ded7c4fed6)
---
 lib/libc/locale/xlocale.c | 30 ++++++++++++++++++------------
 1 file changed, 18 insertions(+), 12 deletions(-)

diff --git a/lib/libc/locale/xlocale.c b/lib/libc/locale/xlocale.c
index d64262da809e..528403693ad4 100644
--- a/lib/libc/locale/xlocale.c
+++ b/lib/libc/locale/xlocale.c
@@ -64,13 +64,12 @@ _Thread_local locale_t __thread_locale;
  * Flag indicating that one or more per-thread locales exist.
  */
 int __has_thread_locale;
+
 /*
  * Private functions in setlocale.c.
  */
-const char *
-__get_locale_env(int category);
-int
-__detect_path_locale(void);
+const char *__get_locale_env(int category);
+int __detect_path_locale(void);
 
 struct _xlocale __xlocale_global_locale = {
 	{0},
@@ -101,7 +100,7 @@ struct _xlocale __xlocale_C_locale = {
 	0
 };
 
-static void*(*constructors[])(const char*, locale_t) =
+static void *(*constructors[])(const char *, locale_t) =
 {
 	__collate_load,
 	__ctype_load,
@@ -115,7 +114,8 @@ static pthread_key_t locale_info_key;
 static int fake_tls;
 static locale_t thread_local_locale;
 
-static void init_key(void)
+static void
+init_key(void)
 {
 
 	pthread_key_create(&locale_info_key, xlocale_release);
@@ -139,7 +139,7 @@ get_thread_locale(void)
 	_once(&once_control, init_key);
 	
 	return (fake_tls ? thread_local_locale :
-		pthread_getspecific(locale_info_key));
+	    pthread_getspecific(locale_info_key));
 }
 
 static void
@@ -198,6 +198,7 @@ alloc_locale(void)
 	new->numeric_locale_changed = 1;
 	return (new);
 }
+
 static void
 copyflags(locale_t new, locale_t old)
 {
@@ -207,7 +208,8 @@ copyflags(locale_t new, locale_t old)
 	new->using_messages_locale = old->using_messages_locale;
 }
 
-static int dupcomponent(int type, locale_t base, locale_t new) 
+static int
+dupcomponent(int type, locale_t base, locale_t new)
 {
 	/* Always copy from the global locale, since it has mutable components.
 	 */
@@ -238,7 +240,8 @@ static int dupcomponent(int type, locale_t base, locale_t new)
  * xlocale interface.  
  */
 
-locale_t newlocale(int mask, const char *locale, locale_t base)
+locale_t
+newlocale(int mask, const char *locale, locale_t base)
 {
 	locale_t orig_base;
 	int type;
@@ -295,7 +298,8 @@ locale_t newlocale(int mask, const char *locale, locale_t base)
 	return (new);
 }
 
-locale_t duplocale(locale_t base)
+locale_t
+duplocale(locale_t base)
 {
 	locale_t new = alloc_locale();
 	int type;
@@ -338,7 +342,8 @@ freelocale(locale_t loc)
  * Returns the name or version of the locale for a particular component of a
  * locale_t.
  */
-const char *querylocale(int mask, locale_t loc)
+const char *
+querylocale(int mask, locale_t loc)
 {
 	int type = ffs(mask & ~LC_VERSION_MASK) - 1;
 	FIX_LOCALE(loc);
@@ -358,7 +363,8 @@ const char *querylocale(int mask, locale_t loc)
 /*
  * Installs the specified locale_t as this thread's locale.
  */
-locale_t uselocale(locale_t loc)
+locale_t
+uselocale(locale_t loc)
 {
 	locale_t old = get_thread_locale();
 	if (NULL != loc) {