Re: [RFC PATCH 1/6] msvc: opendir: use xmalloc
- From
Erik Faye-Lund <kusmabite@gmail.com>
- Date
- Nov 23, 2010, 18:12 UTC
- Message-ID
- <AANLkTimXgnYePPwZNDapS53JSnmO-D-xLxHbLaP8HVv0@mail.gmail.com>
- In-Reply-To
- <20101123180250.GF12113@burratino>
On Tue, Nov 23, 2010 at 7:02 PM, Jonathan Nieder <jrnieder@gmail.com> wrote:
Show 9 quoted lines
> Erik Faye-Lund wrote: > >> The motivation is just to avoid having to deal with the error, like we >> do other places. It's not a big deal though. I could also set errno to >> ENOMEM and return NULL if that's preferable. I just don't see how it >> is. > > I don't disagree; just fishing for a commit message. :) >
Yes, but after stopping to think about it a tad more, I tend to like it working more similar to existing POSIX implementations.
I am adding a commit message this time, though! ;)
Show 14 quoted lines
>> I also slightly dislike setting an error not listed in POSIX' >> documentation of opendir, even though it's probably allowed. > > For future reference, here's what POSIX has to say. > > Implementations shall not generate a different error > number from one required by this volume of > POSIX.1-2008 for an error condition described in this > volume of POSIX.1-2008, but may generate additional > errors unless explicitly disallowed for a particular > function. > > So ENOMEM would have been allowed from that front. >
Thanks for the clarification.