public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@suse.de>
To: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Cc: libc-alpha@sourceware.org,  Paul Eggert <eggert@cs.ucla.edu>,
	 Bruno Haible <bruno@clisp.org>
Subject: Re: [PATCH v5] posix: Sync tempname with gnulib
Date: Wed, 17 Apr 2024 14:26:00 +0200	[thread overview]
Message-ID: <mvm1q746uqv.fsf@suse.de> (raw)
In-Reply-To: <20240410122009.784038-1-adhemerval.zanella@linaro.org> (Adhemerval Zanella's message of "Wed, 10 Apr 2024 09:20:09 -0300")

On Apr 10 2024, Adhemerval Zanella wrote:

> @@ -299,25 +246,23 @@ try_tempname_len (char *tmpl, int suffixlen, void *args,
>          {
>            if (vdigits == 0)
>              {
> -              do
> -                {
> -                  v = random_bits (v, use_getrandom);
> -                  use_getrandom = true;
> -                }
> -              while (unfair_min <= v);
                        v >= unfair_min

> +              /* Worry about bias only if the bits are high quality.  */
> +              while (random_bits (&v, v) && biased_min <= v)
                                               v >= biased_min

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

  parent reply	other threads:[~2024-04-17 12:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-10 12:20 Adhemerval Zanella
2024-04-10 14:30 ` Bruno Haible
2024-04-17 12:26 ` Andreas Schwab [this message]
2024-04-17 13:51   ` Bruno Haible
2024-04-17 14:37     ` Andreas Schwab
2024-04-17 17:04       ` Florian Weimer
2024-04-17 20:33       ` Paul Eggert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=mvm1q746uqv.fsf@suse.de \
    --to=schwab@suse.de \
    --cc=adhemerval.zanella@linaro.org \
    --cc=bruno@clisp.org \
    --cc=eggert@cs.ucla.edu \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).