tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Reuse strtonum(3) and reallocarray(3) from OpenBSD



On Jan 14,  1:35am, n54%gmx.com@localhost ("Kamil Rytarowski") wrote:
-- Subject: Re: Reuse strtonum(3) and reallocarray(3) from OpenBSD

| Christos Zoulas wrote:
| > I still don't get what you buy by having 2 sets of functions to save a passed
| > NULL pointer... Aside confusion.
| 
| Remove duplication of information returned to caller, related to partial conversion.
| Also returning error for valid conversion is (for me) misguiding.
| 
| What do you think about this to return ENOTSUP only if:
| - endptr was passed as NULL and
| - there happened partial conversion.

What about if no characters match? How do you tell the difference?
So if endptr != NULL behave differently? This is confusing.

| Then it will be reduced to strtoi/strtou.
| 
| If you will ack, then I will submit new patches, this time without regenerated configure and config.h.

What do others think?

christos


Home | Main Index | Thread Index | Old Index