This is the mail archive of the glibc-bugs@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]

[Bug manual/16776] Endless loop in strtol example


https://sourceware.org/bugzilla/show_bug.cgi?id=16776

--- Comment #3 from Michael Kerrisk <mtk.manpages at gmail dot com> ---
(In reply to Olaf van der Spek from comment #2)
> Bugs in examples are bad, they *will* be copied into real code.

I'mquite agree. 

But, Olaf, why not just provide a patch? Seems to me the solution is just an
API of the form:

int sum_ints_from_string(char * str, int &result)

which returns 0 on failure, 1 on success.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


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