From nobody Wed Feb 09 00:48:14 2022 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 66B0419B73DC; Wed, 9 Feb 2022 00:48:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Jth7g6cwkz4tjt; Wed, 9 Feb 2022 00:48:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644367697; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TWtQ+rygGlGBRo9WhYou7JpYi8v0LFZ/01gZxJk1b+g=; b=SjKBLuk7SysK7ijWuvcds0Pd9eMBAqjWE1278IOII8VE4j9gmMiFJLK2tBIyiFm242Mq7S sQGAphSfCWJJTijZc3fbOyxIQIV4I8/7/NlcWH/KdPeYrSDfBRSprm2ZHrqPJGqUFk6RVf hz5UKIhF48NqhwGk3d4NtB9qeYYPWQQ1yk+lp7uE0q2ROHu/NEXyw3bh2IGpqmT502St6q mtr9h4UgnZyOY7J79hN/LcjhghkUvzFINQAseXFNy1IFAb6sHxqveziQ+3OD+gdyJEyer5 hVTVu7Qh3rvfdae1KeOdng2ltbA97chuPGIOcnPmqWwYIPqUo88k2a1AzF+XOQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8A48323371; Wed, 9 Feb 2022 00:48:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 2190mEqh083872; Wed, 9 Feb 2022 00:48:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2190mEB8083871; Wed, 9 Feb 2022 00:48:14 GMT (envelope-from git) Date: Wed, 9 Feb 2022 00:48:14 GMT Message-Id: <202202090048.2190mEB8083871@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: c3f2e156baf0 - stable/13 - libc/locale/lmonetary.c: minor style List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c3f2e156baf0c05e67ecb09f9ff22b691b9a7f85 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644367698; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TWtQ+rygGlGBRo9WhYou7JpYi8v0LFZ/01gZxJk1b+g=; b=uztMw4od2FnYwWRrAobETO3i8CvpXe2AhLB1+zSiecAXPT3B6xNIi7W3Bpwqe0Q36q7hnh 9bTBT3JpqGd8riK4B3nXc7l4Ztf2J9RoMHgEdgz9HdFxf2W8TsBP5u2WMSXoTec+1UfZQR I0gHGlS+9qnCtcA4V0pUlquio/iUmGbJxsHwPLE5SzBLvo1GjtZboC7dBscXZPWpjNYUrl HPCPuInIpm8TaM0vLPH8KsvYSWcdzsV+M36k+7alFzNd6pzelJhV3mxszGun1XktmYknYI PjGYXEfW8synEFhUehYxkAYwonLQeVssXXjJ27cloM5EukQ55dyLiaiklp2YCg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1644367698; a=rsa-sha256; cv=none; b=XI4ZWs4bhEoNU5qY5N9EH0+V2gMHOwnf0WwS332vg2H9kBOV4z2Q4PqNf1toHG8wtaRCk8 Wf563MY+xzYJYO3W5P17ws0VESCH8vGOoonT3muf6rPFoP0vXT4TZpqwW0139Izl8rZ8PA BA2gAZBkAA0+qcCL8iC7IE9wCapUIjbmZIbUAU7xEaKbB1sVBA6QNzjSRZdZgE1BqQq1oz 6sSNOVOndQsZ2QdHbmjomuBqGR5o3kiJkvypC7pk81fIfmESjWakuZvOQcGLPGVL7ZXfwl P2udXIFi6otbRrmoWksnBwNyiDZe1zcGI1D6ZJjQ1ncRNAHWvW1OlaGkt2pP/w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=c3f2e156baf0c05e67ecb09f9ff22b691b9a7f85 commit c3f2e156baf0c05e67ecb09f9ff22b691b9a7f85 Author: Konstantin Belousov AuthorDate: 2022-02-02 18:10:43 +0000 Commit: Konstantin Belousov CommitDate: 2022-02-09 00:42:45 +0000 libc/locale/lmonetary.c: minor style (cherry picked from commit 0fed1e6f1831a4f4cf8d000465afeea8165d3523) --- lib/libc/locale/lmonetary.c | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/lib/libc/locale/lmonetary.c b/lib/libc/locale/lmonetary.c index 99800ae69922..c8811e8d59a4 100644 --- a/lib/libc/locale/lmonetary.c +++ b/lib/libc/locale/lmonetary.c @@ -98,15 +98,15 @@ destruct_monetary(void *v) static int monetary_load_locale_l(struct xlocale_monetary *loc, int *using_locale, - int *changed, const char *name) + int *changed, const char *name) { int ret; struct lc_monetary_T *l = &loc->locale; ret = __part_load_locale(name, using_locale, - &loc->buffer, "LC_MONETARY", - LCMONETARY_SIZE_FULL, LCMONETARY_SIZE_MIN, - (const char **)l); + &loc->buffer, "LC_MONETARY", + LCMONETARY_SIZE_FULL, LCMONETARY_SIZE_MIN, + (const char **)l); if (ret != _LDP_ERROR) *changed = 1; if (ret == _LDP_LOADED) { @@ -148,38 +148,40 @@ monetary_load_locale_l(struct xlocale_monetary *loc, int *using_locale, } return (ret); } + int __monetary_load_locale(const char *name) { - return monetary_load_locale_l(&__xlocale_global_monetary, - &__xlocale_global_locale.using_monetary_locale, - &__xlocale_global_locale.monetary_locale_changed, name); + return (monetary_load_locale_l(&__xlocale_global_monetary, + &__xlocale_global_locale.using_monetary_locale, + &__xlocale_global_locale.monetary_locale_changed, name)); } -void* __monetary_load(const char *name, locale_t l) + +void * +__monetary_load(const char *name, locale_t l) { - struct xlocale_monetary *new = calloc(sizeof(struct xlocale_monetary), 1); + struct xlocale_monetary *new = calloc(sizeof(struct xlocale_monetary), + 1); new->header.header.destructor = destruct_monetary; if (monetary_load_locale_l(new, &l->using_monetary_locale, - &l->monetary_locale_changed, name) == _LDP_ERROR) - { + &l->monetary_locale_changed, name) == _LDP_ERROR) { xlocale_release(new); - return NULL; + return (NULL); } - return new; + return (new); } - struct lc_monetary_T * __get_current_monetary_locale(locale_t loc) { - return (loc->using_monetary_locale - ? &((struct xlocale_monetary*)loc->components[XLC_MONETARY])->locale - : (struct lc_monetary_T *)&_C_monetary_locale); + return (loc->using_monetary_locale ? + &((struct xlocale_monetary*)loc->components[XLC_MONETARY])->locale : + (struct lc_monetary_T *)&_C_monetary_locale); } #ifdef LOCALE_DEBUG void -monetdebug() { +monetdebug(void) { printf( "int_curr_symbol = %s\n" "currency_symbol = %s\n" "mon_decimal_point = %s\n"