From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yb1-xb29.google.com (mail-yb1-xb29.google.com [IPv6:2607:f8b0:4864:20::b29]) by sourceware.org (Postfix) with ESMTPS id 9462B3857C4E for ; Wed, 13 Apr 2022 16:11:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9462B3857C4E Received: by mail-yb1-xb29.google.com with SMTP id v77so4575322ybi.12 for ; Wed, 13 Apr 2022 09:11:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=WmRRT1/zRfAeaQCCoBMfauCO5hE9kM8UgABC4hHKyFk=; b=ui37OTT3E/3S2ZIkJtcYccsdnrwE9LoPaQqEkVbKAudpa0W0Zw/OCRWoK2x/8cKclw Q99QGhEVOKSQoUYcnbVtoRyz7dXyegtl6mezEEW9Fk/n5UPJQshkLq6qhDGiVlj6kua9 GU4wR47h0Cju32u0DXpz41uROcAoYTGv7OhbvQTNO+5S5B+ZcFKpxAtFIIrtTbdydNBs Un4VR48C/Jn1LjlHEioRZRv6pqjD9c1SBrM38C0o54AynXQlVfY+XB2V0Bo2Hxf7gXa+ CEU1qxeDUQivh49Oi1il8dUIRyVSMm8KbVN7ClKcygPetsznSCuquh48mYuhbHX/UPyo LA4Q== X-Gm-Message-State: AOAM533nGPrpiUkAs6NzZo7NYWYVTC0wiLM1Uov5m1UeWh137fvruUPn 6AtC3D1w0Ql1K3RXzIi0tnbTsJRxuD3g/UNCnJU= X-Google-Smtp-Source: ABdhPJzlyOsfyk8oX7/3fXAC0Zzc+AhhbmpjAMvcScsO/Dv9CZuIgXeyD8Xx10aCoEyVGbKiwRLRxNGKw8k/pq2DfCE= X-Received: by 2002:a25:acdb:0:b0:641:46d5:c2d9 with SMTP id x27-20020a25acdb000000b0064146d5c2d9mr11556633ybd.143.1649866309056; Wed, 13 Apr 2022 09:11:49 -0700 (PDT) MIME-Version: 1.0 References: <20220411165835.4028009-1-goldstein.w.n@gmail.com> <20220411212315.2780090-1-goldstein.w.n@gmail.com> <87lewahbqq.fsf@oldenburg.str.redhat.com> In-Reply-To: <87lewahbqq.fsf@oldenburg.str.redhat.com> From: Noah Goldstein Date: Wed, 13 Apr 2022 11:11:38 -0500 Message-ID: Subject: Re: [PATCH v2] Replace {u}int_fast{16|32} with {u}int32_t To: Florian Weimer Cc: Noah Goldstein via Libc-alpha Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-8.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, 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: Wed, 13 Apr 2022 16:11:51 -0000 On Tue, Apr 12, 2022 at 4:50 AM Florian Weimer wrote: > > * 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. Fixed in v3. > > > 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. Fixed in v3. > > > 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 >