Dear Michael Walle, In message <201205112320.15462.mich...@walle.cc> you wrote: > > > This is inconsequent. Either we assume that the user will seed > > srand(), then y should not be initialized at all, so it goes to the > > BSS segment and does not waste space in the binary image. Or we want > > to deal with cases where the user doesn call srand(), and then we > > should provide a bit better than such a static initialization. > > Again, i wanted to stick with the regular rand() srand() semantics. > > http://pubs.opengroup.org/onlinepubs/009695399/functions/rand.html > "If rand() is called before any calls to srand() are made, the same sequence > shall be generated as when srand() is first called with a seed value of 1."
Good point. But then y should be initialized as 1 ? Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de "Security is mostly a superstition. It does not exist in nature... Life is either a daring adventure or nothing." - Helen Keller _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot