git: 5b7e92d48fbc - main - libc/locale/lmessages.c: minor style

From: Konstantin Belousov <kib_at_FreeBSD.org>
Date: Thu, 03 Feb 2022 02:49:32 UTC
The branch main has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=5b7e92d48fbc94b8a95a9f96ab501de5af1ed115

commit 5b7e92d48fbc94b8a95a9f96ab501de5af1ed115
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2022-02-02 18:06:39 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2022-02-03 01:03:17 +0000

    libc/locale/lmessages.c: minor style
    
    Reviewed by:    markj
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
    Differential revision:  https://reviews.freebsd.org/D34140
---
 lib/libc/locale/lmessages.c | 30 ++++++++++++++++++------------
 1 file changed, 18 insertions(+), 12 deletions(-)

diff --git a/lib/libc/locale/lmessages.c b/lib/libc/locale/lmessages.c
index 9c442dc3d7a1..fd00fc16a4ea 100644
--- a/lib/libc/locale/lmessages.c
+++ b/lib/libc/locale/lmessages.c
@@ -60,7 +60,8 @@ static const struct lc_messages_T _C_messages_locale = {
 	"no"		/* nostr */
 };
 
-static void destruct_messages(void *v)
+static void
+destruct_messages(void *v)
 {
 	struct xlocale_messages *l = v;
 	if (l->buffer)
@@ -69,7 +70,8 @@ static void destruct_messages(void *v)
 }
 
 static int
-messages_load_locale(struct xlocale_messages *loc, int *using_locale, const char *name)
+messages_load_locale(struct xlocale_messages *loc, int *using_locale,
+    const char *name)
 {
 	int ret;
 	struct lc_messages_T *l = &loc->locale;
@@ -86,35 +88,39 @@ messages_load_locale(struct xlocale_messages *loc, int *using_locale, const char
 	}
 	return (ret);
 }
+
 int
 __messages_load_locale(const char *name)
 {
-	return messages_load_locale(&__xlocale_global_messages,
-			&__xlocale_global_locale.using_messages_locale, name);
+	return (messages_load_locale(&__xlocale_global_messages,
+	    &__xlocale_global_locale.using_messages_locale, name));
 }
+
 void *
 __messages_load(const char *name, locale_t l)
 {
-	struct xlocale_messages *new = calloc(sizeof(struct xlocale_messages), 1);
+	struct xlocale_messages *new = calloc(sizeof(struct xlocale_messages),
+	    1);
 	new->header.header.destructor = destruct_messages;
-	if (messages_load_locale(new, &l->using_messages_locale, name) == _LDP_ERROR) {
+	if (messages_load_locale(new, &l->using_messages_locale, name) ==
+	    _LDP_ERROR) {
 		xlocale_release(new);
-		return NULL;
+		return (NULL);
 	}
-	return new;
+	return (new);
 }
 
 struct lc_messages_T *
 __get_current_messages_locale(locale_t loc)
 {
-	return (loc->using_messages_locale
-		? &((struct xlocale_messages *)loc->components[XLC_MESSAGES])->locale
-		: (struct lc_messages_T *)&_C_messages_locale);
+	return (loc->using_messages_locale ? &((struct xlocale_messages *)
+	    loc->components[XLC_MESSAGES])->locale :
+	    (struct lc_messages_T *)&_C_messages_locale);
 }
 
 #ifdef LOCALE_DEBUG
 void
-msgdebug() {
+msgdebug(void) {
 printf(	"yesexpr = %s\n"
 	"noexpr = %s\n"
 	"yesstr = %s\n"