linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] nandtest: use seed argument
@ 2011-11-24 10:57 Jan Weitzel
  2011-11-28 17:56 ` Brian Norris
  2011-12-01  7:56 ` [PATCH] nandtest: use seed argument Artem Bityutskiy
  0 siblings, 2 replies; 10+ messages in thread
From: Jan Weitzel @ 2011-11-24 10:57 UTC (permalink / raw)
  To: linux-mtd; +Cc: Jan Weitzel

if a seed is provided it is actually not used. First call is
"seed = rand()" killing the given seed.

Signed-off-by: Jan Weitzel <j.weitzel@phytec.de>
---
 nandtest.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/nandtest.c b/nandtest.c
index db7f427..b3aacaf 100644
--- a/nandtest.c
+++ b/nandtest.c
@@ -173,6 +173,7 @@ int main(int argc, char **argv)
 
 		case 's':
 			seed = atol(optarg);
+			srand(seed);
 			break;
 
 		case 'p':
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2011-12-05  6:30 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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 NNTP newsgroup(s).