From nobody Thu Feb 03 02:49:36 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 CD55719A116A; Thu, 3 Feb 2022 02:49:39 +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 4Jq36V5XGwz4bBj; Thu, 3 Feb 2022 02:49:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643856579; 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=A9oZHQnCgdY3bpK5WqFR9IxvSEF/f/R/YXdSTZbnWqs=; b=kOn9LxX4dpWXPAaFTA7x0XP/v38RLBs9RL2Io7kUUMzABP++gGqdEGdbEnM+uRnwyR/VFr gFXWy8h+XJOcB1rFNzVkSLlfjP8m3cjXMzL6r/joF/QZWxZ6WGyTe9ZBjyLCN20XTH4TE9 03G9HrWmn8BGYZ7nIM1GTuhIWtnRTMqTy7fVnTrQ8CQDN3W1m916xlMy91phnnCPeALHyX 7xKB5yRlTzSFpmPq1cfk/Kgpv2t+SuevCh80oHKT6gYkCcpGJZLNN+WWn2nszvzqZG2szo YCJ3yS3Um1rT7adcfqB3X2o+ib946m/3ngjnOTpbxJwFazbCB5KTQjfOMmM4VQ== 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 EDAC07E2C; Thu, 3 Feb 2022 02:49:36 +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 2132naK4087195; Thu, 3 Feb 2022 02:49:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2132nalg087194; Thu, 3 Feb 2022 02:49:36 GMT (envelope-from git) Date: Thu, 3 Feb 2022 02:49:36 GMT Message-Id: <202202030249.2132nalg087194@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: 1aa669c5f9c2 - main - libc/locale/lnumeric.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: 1aa669c5f9c233989204de96e0557459378e85bc Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643856579; 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=A9oZHQnCgdY3bpK5WqFR9IxvSEF/f/R/YXdSTZbnWqs=; b=bBi51o29ZUz3DmiugzgpqNw7Bm6MQ4m2AjEo6eM2fwabtINrzK2WOMclZomNqL7sneWYB3 qr+GDbvNgHE8WQXaEYIzBOk+T/Ogdc8wZeHWU6cgSFDh544TKIwwWifyrSV6AQXAaD8VxL Uyh8OYplT9KVnjihn+Bfe5NMIoHQ8t+JouE6Hy67iNb+8gAekEu/PxPeu62Ray5sACE0tA 3C6ldHCS38sEbhuivD2e+CR4TvzavSrt6mlIwaSJEaLXqKAj0cLVLGlt4eQiKNpySx/gtS P+5ofPn1PZCzMhmTo7DpUAvRrbCRwbUAIjoBLwJS6C5m6Ey3EnR4k/q6n0BnPQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1643856579; a=rsa-sha256; cv=none; b=PcOWYd5Dq650x9K39CNeqUQJUNZgYB9wSRZ1ZkazWHZmCs+QKPX/ZEhStv5dXk5dLzcVjm /kjXgOq2CYO+4Q+ukzRlWDk5PovLcueudSn3prqt1hSl3sDjqGfjG3XGzz7jWvRttfGtMB W0wEoDDUP3ro5KOIUMWSaHD8wxFh4fb1oSqWWsbUWa6JbkaJXZ4jq1jk8PQA7po6TtZjYh CZ+NzhGYU9TeZmwce3UjURTvJp+PwaiBDUk3Pjqii/jBuApXk2+G2kq08UxJJeMjrUfO2W 9RCTPXDX5YMJAwBJ6yPzIsiPjsYUcWjALixYJNbUJiwiapAQh0SmxmffqRVELQ== 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=1aa669c5f9c233989204de96e0557459378e85bc commit 1aa669c5f9c233989204de96e0557459378e85bc Author: Konstantin Belousov AuthorDate: 2022-02-02 18:15:34 +0000 Commit: Konstantin Belousov CommitDate: 2022-02-03 01:03:44 +0000 libc/locale/lnumeric.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/lnumeric.c | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/lib/libc/locale/lnumeric.c b/lib/libc/locale/lnumeric.c index cc1daa3863e3..1b2a91d3652c 100644 --- a/lib/libc/locale/lnumeric.c +++ b/lib/libc/locale/lnumeric.c @@ -63,16 +63,16 @@ destruct_numeric(void *v) struct xlocale_numeric __xlocale_global_numeric; static int -numeric_load_locale(struct xlocale_numeric *loc, int *using_locale, int *changed, - const char *name) +numeric_load_locale(struct xlocale_numeric *loc, int *using_locale, + int *changed, const char *name) { int ret; struct lc_numeric_T *l = &loc->locale; ret = __part_load_locale(name, using_locale, - &loc->buffer, "LC_NUMERIC", - LCNUMERIC_SIZE, LCNUMERIC_SIZE, - (const char**)l); + &loc->buffer, "LC_NUMERIC", + LCNUMERIC_SIZE, LCNUMERIC_SIZE, + (const char**)l); if (ret == _LDP_LOADED) { /* Can't be empty according to C99 */ if (*l->decimal_point == '\0') @@ -89,30 +89,31 @@ numeric_load_locale(struct xlocale_numeric *loc, int *using_locale, int *changed int __numeric_load_locale(const char *name) { - return numeric_load_locale(&__xlocale_global_numeric, - &__xlocale_global_locale.using_numeric_locale, - &__xlocale_global_locale.numeric_locale_changed, name); + return (numeric_load_locale(&__xlocale_global_numeric, + &__xlocale_global_locale.using_numeric_locale, + &__xlocale_global_locale.numeric_locale_changed, name)); } + void * __numeric_load(const char *name, locale_t l) { - struct xlocale_numeric *new = calloc(sizeof(struct xlocale_numeric), 1); + struct xlocale_numeric *new = calloc(sizeof(struct xlocale_numeric), + 1); new->header.header.destructor = destruct_numeric; if (numeric_load_locale(new, &l->using_numeric_locale, - &l->numeric_locale_changed, name) == _LDP_ERROR) - { + &l->numeric_locale_changed, name) == _LDP_ERROR) { xlocale_release(new); - return NULL; + return (NULL); } - return new; + return (new); } struct lc_numeric_T * __get_current_numeric_locale(locale_t loc) { - return (loc->using_numeric_locale - ? &((struct xlocale_numeric *)loc->components[XLC_NUMERIC])->locale - : (struct lc_numeric_T *)&_C_numeric_locale); + return (loc->using_numeric_locale ? + &((struct xlocale_numeric *)loc->components[XLC_NUMERIC])->locale : + (struct lc_numeric_T *)&_C_numeric_locale); } #ifdef LOCALE_DEBUG