This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] [BZ #15381] Initialize wide struct info.


Hi,

* Andreas Schwab <schwab@suse.de>:
> > Are you opposed to initializing _wide_data to NULL? 
> 
> I would prefer -1 so that broken uses crash predictably. :-)

Since undefined behaviour can be anything you like, both initializing
with NULL and with -1 is equally "valid".

However I agree with Andreas that initializing with -1 would expose
the user's bug reliably (as it did in the case of mutt), whereas NULL
would hide this, possibly leading to confusion.

Julius

[not on the list, please CC me in replies]


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]