]> www.infradead.org Git - mtd-utils.git/commit
nandtest: seed random generator with time
authorBrian Norris <computersforpeace@gmail.com>
Fri, 2 Dec 2011 17:46:12 +0000 (09:46 -0800)
committerArtem Bityutskiy <Artem.Bityutskiy@intel.com>
Mon, 5 Dec 2011 06:27:31 +0000 (08:27 +0200)
commit4e37713af46f289eac21ca24d2e7d50aed014237
treead897f947004df1cb97b16911e3cbd424262b36d
parent1cf7295ecd343090e7327bade716f25e0bf737cb
nandtest: seed random generator with time

If a seed is not provided via --seed, we use the default rand() values,
which produces the same sequence of values every run. Since this is
undesirable, we should choose a random seed via the current time().

Note that this patch moves the srand() until after all the initial
options processing.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@intel.com>
nandtest.c