From nobody Thu Feb 03 02:49:34 2022 X-Original-To: dev-commits-src-all@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 60E9219A129F; Thu, 3 Feb 2022 02:49:37 +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 4Jq36R2kYbz4b8J; Thu, 3 Feb 2022 02:49:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643856575; 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=iPK4BHE86oJD4ZF+CyfYiY1t02ztDyjxkb9+2LCnEm0=; b=aZfvJB75tkl991phgvQFxZKvwJXx4feB5GJVkfU3cXRSo9Q2d4Rn9x245VqvmCRtnuduDx EeL126pPdHgLH/aKy/zdxW8EoC7sn/LDZyVsntuLdqc090zNsvgglCu7OuFYUF0sZ1MYlm kTpHWfEtF0wa3O05H3Euez+vU8TUX81pR3dcDSEm7X1cQzfePyQZhJAE3C4aVtqpU/kiD2 ctr3dyoWZecH+EukRa6OtEesj/Jv8RZT2/ChGnTWrVH4UD9RSXdg3h6lkX2F41SgRZVWTt j23CQ6I2xy8azmcvnfbcu9aR4+Wwy5ofTU2BdTco8yyHL+Tq+T6JJ6qyxSM9Kg== 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 AF2FD7E2B; Thu, 3 Feb 2022 02:49:34 +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 2132nYkr087137; Thu, 3 Feb 2022 02:49:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2132nYfX087136; Thu, 3 Feb 2022 02:49:34 GMT (envelope-from git) Date: Thu, 3 Feb 2022 02:49:34 GMT Message-Id: <202202030249.2132nYfX087136@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 0fed1e6f1831 - main - libc/locale/lmonetary.c: minor style List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 0fed1e6f1831a4f4cf8d000465afeea8165d3523 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643856575; 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=iPK4BHE86oJD4ZF+CyfYiY1t02ztDyjxkb9+2LCnEm0=; b=cMD/uwDbInJYv33fz9JuHdNtBrjGurQjYFfJUUFYzFoOYrgj9ChpaYAoqQAsSSYVufrmh/ RjT0H4xoqAnXkewez7NSgA682RpiYCnpH7Sq+1ht+4O/vi1XswiZqATZBx40hDMPB99ton yqzVubrcjcaEmf+d3DgjSMa30gwnk87/hcJiAgzRdfYqGVlNfvPhTvHktNU4u++6yaN4br fx6jeJpqa/waSaknR7HyswXMQ77zKfCibWdMri5i+0qLa/PaMz6tKsPD38qp5B9c2fXVKg OPHYtgH7iwBMZeg25jrWigRZDzbRcfzMf4oLm/Fe6XRNUcM3ipqhwo84yPACsg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1643856575; a=rsa-sha256; cv=none; b=tuNGgmVUr+NcJnI6rpsE4ScmqhNriEIMN1BbLmiTDSONSOBfOLTTj/HIqxdK6NT8okxUcF GGQ0Pj8v4TqGQVaUo/U50wOurb8JtSZt1Dioehd64yXd2kaghX1a3sKUT1NjA7Ui6F0zgG 4ryGUBO3yC7wxUK6qnDRvmylFoB+IgerP93AbT3/5qYDf0egH71d5QBRbPij495ai+AMFz qoT5/vW0oaoSYb285CUkSgRrERe7u/35/b6aig4/jEtYmzYQ8uWtwK7Fe42hmki1yljhFq EZFXdau1jph3YaSKO9+EXQXHEUBkEuaWI2p8wAhMHhi6FkTsLv5cJ3KcsdT7RQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=0fed1e6f1831a4f4cf8d000465afeea8165d3523 commit 0fed1e6f1831a4f4cf8d000465afeea8165d3523 Author: Konstantin Belousov AuthorDate: 2022-02-02 18:10:43 +0000 Commit: Konstantin Belousov CommitDate: 2022-02-03 01:03:29 +0000 libc/locale/lmonetary.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/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 b8b4e78c060b..cbd531d9416c 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_LOADED) { l->mon_grouping = __fix_locale_grouping_str(l->mon_grouping); @@ -148,38 +148,40 @@ monetary_load_locale_l(struct xlocale_monetary *loc, int *using_locale, atomic_store_rel_int(changed, 1); 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"