On 31.05.2006, at 20:37, [EMAIL PROTECTED] wrote:
My experience is that *BSD's malloc and pointer stuff is designed to be asStyle 1: time_t t*; time(t);safe as possible by default, and will try to fix and correct any common mistakes you will make. The short answer is that BSD will figure out where you are screwing up and allow it to work. Linux gives you total freedom to screw your self over.
I can not agree with this. BSD malloc() (or better: free()) is much more conservative, and lately our default even changed to abort on double free()s. A lot of buggy software has double free()s and I think glibc doesn't even complain per default.
Also, style 1 is technically "incorrect" since you never allocated the memory that t is pointing to before passing it into time().
maybe the compiler on BSD by chance put NULL into "t" and thus made it a valid parameter?
cheers simon -- Serve - BSD +++ RENT this banner advert +++ ASCII Ribbon /"\ Work - Mac +++ space for low €€€ NOW!1 +++ Campaign \ / Party Enjoy Relax | http://dragonflybsd.org Against HTML \ Dude 2c 2 the max ! http://golden-apple.biz Mail + News / \
PGP.sig
Description: This is a digitally signed message part
