This is the mail archive of the libc-alpha@sources.redhat.com 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: I: [PATCH] asprintf error handling fix


James Antill <james@and.org> writes:

>  This isn't true, I was under the impression that the return value
> from asprintf() would be the same as that from snprintf(). Thus the
> few times I've used asprintf() I've just done...

This only means your program is broken.

>  And even if you still consider it incompatible with older glibcs
> there is ample precedent for changing functions to do the right thing
> (snprintf() had a much bigger API change, for example).

This is completely irrelevant.  Bug fixes are one thing, arbitrary
semantic changes are another.

> [1] I can't think of a std. function that has an int return value and
> also returns a ptr value through a parameter atm.

The situation is the same as with errno.  Unless the return value of a
function says so nobody must look at it's value.


There will be no change.  Stop complaining and fix your code.

-- 
---------------.                          ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Red Hat          `--' drepper at redhat.com   `------------------------


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