From nobody Mon Dec 06 00:28:09 2021 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 58FFF18BED9D; Mon, 6 Dec 2021 00:28:14 +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 4J6kmW5tzvz4Xck; Mon, 6 Dec 2021 00:28:11 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 0B24F21CB7; Mon, 6 Dec 2021 00:28:10 +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 1B60S9kt084955; Mon, 6 Dec 2021 00:28:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B60S9T9084954; Mon, 6 Dec 2021 00:28:09 GMT (envelope-from git) Date: Mon, 6 Dec 2021 00:28:09 GMT Message-Id: <202112060028.1B60S9T9084954@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: f457e049940d - stable/13 - citrus_prop.c: do not ignore sign 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/stable/13 X-Git-Reftype: branch X-Git-Commit: f457e049940dc7a411dcd19c13a885732d109635 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638750492; 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=WXZG8rMehLPPBZRUSZtz3HjVIgnC26Pbx9duqstOho8=; b=kpCJJwDZuZQaN70JyffqN70DJEsisrpe8jNXWVc/qKAfzfw/0hxjKXERDLRvfsYvz25ItD pKAZW2AN1Aebdq5bqL9QOf/ygu5xb183Gk6VYhpm3BcVJtWhO8BIUMUz5MpVTEWpf8RSeB Pws8h5uq6BmOmtQOdFw/HRwFn5jg98QztJfKFLwR/HiBLvPIg+4PF7ore/w4XgDP1VX5OP L1qgRm1wIFhE+kkgxiME95nQSjY1J226qBs+SdEIhvP5969tC918MT2STMfxq8NWq30w5f v2ZAK4uZxlUuW6AYPW8Hk8Aq6iJxa/W0uEBu2VUH7RGm/z5xu9DtOUzpaKqvBQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638750492; a=rsa-sha256; cv=none; b=BNB462dGA93IcAsMaXeOX2GlMUapynTI0zfp3algwWpwIcBaKwW+M7ikSRoHrUB6zWan4m h84dVUsAEc2NYLATXNfyzEHlUUne+CkgvoJySQyjdOcfPpdKExltyL+yHrDxRcZDPcNlBV o3mPPJShPN8Hlh61zLyiEtgmDUzsOJxa3AdG61xt2TI+MCW5iwzboL2p0FKiZdXA34v61w rmsGTcLitgWMDay+sxQPZ+Abdm5ZhDpANeApWnDn3ahtCfi2LLN4X/lxGu6M4Z6avNP31Y 6ec+ixqeeXqRQeJjJJDtTvLWKaKoL917Ol9pRcHCNyGq1g5QDsfTTpu8ibpToA== 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=f457e049940dc7a411dcd19c13a885732d109635 commit f457e049940dc7a411dcd19c13a885732d109635 Author: Konstantin Belousov AuthorDate: 2021-11-28 03:03:49 +0000 Commit: Konstantin Belousov CommitDate: 2021-12-06 00:23:45 +0000 citrus_prop.c: do not ignore sign (cherry picked from commit 181751a8b6ef580c44d49ef3cac1c6627bfa461e) --- lib/libc/iconv/citrus_prop.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/libc/iconv/citrus_prop.c b/lib/libc/iconv/citrus_prop.c index 7ac39bbee6e5..0b627f362c22 100644 --- a/lib/libc/iconv/citrus_prop.c +++ b/lib/libc/iconv/citrus_prop.c @@ -79,7 +79,7 @@ static const char *xdigit = "0123456789ABCDEF"; #define _CITRUS_PROP_READ_UINT_COMMON(_func_, _type_, _max_) \ static int \ _citrus_prop_read_##_func_##_common(struct _memstream * __restrict ms, \ - _type_ * __restrict result, int base) \ + _type_ * __restrict result, int base, int neg) \ { \ _type_ acc, cutoff; \ int ch, cutlim, n; \ @@ -99,7 +99,7 @@ _citrus_prop_read_##_func_##_common(struct _memstream * __restrict ms, \ acc += n; \ } \ _memstream_ungetc(ms, ch); \ - *result = acc; \ + *result = neg ? -acc : acc; \ return (0); \ } _CITRUS_PROP_READ_UINT_COMMON(chr, int, UCHAR_MAX) @@ -139,7 +139,7 @@ _citrus_prop_read_##_func_(struct _memstream * __restrict ms, \ return (EINVAL); \ _memstream_ungetc(ms, ch); \ return (_citrus_prop_read_##_func_##_common \ - (ms, &obj->u._func_, base)); \ + (ms, &obj->u._func_, base, neg)); \ } _CITRUS_PROP_READ_INT(chr, int) _CITRUS_PROP_READ_INT(num, uint64_t) @@ -185,7 +185,8 @@ _citrus_prop_read_character_common(struct _memstream * __restrict ms, base -= 8; /*FALLTHROUGH*/ case 'x': - return (_citrus_prop_read_chr_common(ms, result, base)); + return (_citrus_prop_read_chr_common(ms, result, + base, 0)); /*NOTREACHED*/ default: /* unknown escape */