From: Artem Bityutskiy <dedekind1@gmail.com>
To: Brian Norris <computersforpeace@gmail.com>
Cc: Jan Weitzel <J.Weitzel@phytec.de>, linux-mtd@lists.infradead.org
Subject: Re: [PATCH] nandtest: seed random generator properly
Date: Thu, 01 Dec 2011 11:05:48 +0200 [thread overview]
Message-ID: <1322730350.2332.28.camel@koala> (raw)
In-Reply-To: <CAN8TOE-zTCY-SRrVpsFExu32yq_3j7FJGgVUBN3CEt_E_qzS8Q@mail.gmail.com>
On Wed, 2011-11-30 at 10:24 -0800, Brian Norris wrote:
> On Mon, Nov 28, 2011 at 11:30 PM, Jan Weitzel <J.Weitzel@phytec.de> wrote:
> > Brian Norris <computersforpeace@gmail.com> schrieb am 28.11.2011 19:11:52:
> >> + if (seed < 0)
> >> + seed = time(NULL);
> >> + srand(seed);
> >
> > So you loose all negative seeds.
>
> Well, srand() technically takes unsigned ints, so all seeds are
> technically positive. But that just means we're parsing and storing
> seeds wrong (not a big deal, really).
Brian, would you please send an incremental patch on top of Jan's which
I've pushed?
Artem.
next prev parent reply other threads:[~2011-12-01 9:05 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-24 10:57 [PATCH] nandtest: use seed argument Jan Weitzel
2011-11-28 17:56 ` Brian Norris
2011-11-28 18:11 ` [PATCH] nandtest: seed random generator properly Brian Norris
2011-11-29 7:30 ` Antwort: " Jan Weitzel
2011-11-30 18:24 ` Brian Norris
2011-12-01 8:23 ` Jan Weitzel
2011-12-01 9:05 ` Artem Bityutskiy [this message]
2011-12-02 17:46 ` [PATCH v2] nandtest: seed random generator with time Brian Norris
2011-12-05 6:30 ` Artem Bityutskiy
2011-12-01 7:56 ` [PATCH] nandtest: use seed argument Artem Bityutskiy
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=1322730350.2332.28.camel@koala \
--to=dedekind1@gmail.com \
--cc=J.Weitzel@phytec.de \
--cc=computersforpeace@gmail.com \
--cc=linux-mtd@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.