From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id C69E43858D28 for ; Tue, 12 Apr 2022 09:50:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C69E43858D28 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-554-3qrVzbjVPf-imfS9kyRGjA-1; Tue, 12 Apr 2022 05:50:08 -0400 X-MC-Unique: 3qrVzbjVPf-imfS9kyRGjA-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 378DA3C11C7F; Tue, 12 Apr 2022 09:50:08 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.39.193.61]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5D0FD1454537; Tue, 12 Apr 2022 09:50:07 +0000 (UTC) From: Florian Weimer To: Noah Goldstein via Libc-alpha Subject: Re: [PATCH v2] Replace {u}int_fast{16|32} with {u}int32_t References: <20220411165835.4028009-1-goldstein.w.n@gmail.com> <20220411212315.2780090-1-goldstein.w.n@gmail.com> Date: Tue, 12 Apr 2022 11:50:05 +0200 In-Reply-To: <20220411212315.2780090-1-goldstein.w.n@gmail.com> (Noah Goldstein via Libc-alpha's message of "Mon, 11 Apr 2022 16:23:15 -0500") Message-ID: <87lewahbqq.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-11.4 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Apr 2022 09:50:11 -0000 * Noah Goldstein via Libc-alpha: > @@ -558,10 +558,10 @@ skip: > } > > > -static uint_fast32_t > +static uint32_t > dl_new_hash (const char *s) > { > - uint_fast32_t h = 5381; > + uint32_t h = 5381; > for (unsigned char c = *s; c != '\0'; c = *++s) > h = h * 33 + c; > return h & 0xffffffff; I think you can remove the final masking. > diff --git a/resolv/nss_dns/dns-canon.c b/resolv/nss_dns/dns-canon.c > index 3151e50ae1..53230c5599 100644 > --- a/resolv/nss_dns/dns-canon.c > +++ b/resolv/nss_dns/dns-canon.c > @@ -118,7 +118,7 @@ _nss_dns_getcanonname_r (const char *name, char *buffer, size_t buflen, > goto unavail; > > /* Check whether type and class match. */ > - uint_fast16_t type; > + unsigned int type; > NS_GET16 (type, ptr); > if (type == qtypes[i]) > { This should uint16_t because DNS record types are 16-bit only. > diff --git a/timezone/zic.c b/timezone/zic.c > index 2875b5544c..16d0cede65 100644 > --- a/timezone/zic.c > +++ b/timezone/zic.c > @@ -1789,7 +1789,7 @@ rulesub(struct rule *rp, const char *loyearp, const char *hiyearp, > } > > static void > -convert(const int_fast32_t val, char *const buf) > +convert(const int32_t val, char *const buf) > { > register int i; > register int shift; > @@ -1811,7 +1811,7 @@ convert64(const zic_t val, char *const buf) > } > > static void > -puttzcode(const int_fast32_t val, FILE *const fp) > +puttzcode(const int32_t val, FILE *const fp) > { > char buf[4]; Has Paul commented on this? This code is shared with the tz project. Otherwise looks good. Still builds on all architectures. Reviewed-by: Florian Weimer Thanks, Florian