A bug in strverscmp.c?

Ulrich Drepper drepper@redhat.com
Fri Feb 2 00:22:00 GMT 2001


"H . J . Lu" <hjl@valinux.com> writes:

> This testcase prints "-45". I was expecting a positive number.

Why?  "2.8" is smaller than "2.8-0.4".  This is consistent with your
ChangeLog comment

> 	* string/strverscmp.c (__strverscmp): Treat '\0' as the
> 	lowest version.

...and also with the contents of the tst-svc.expect file.  I'm adding
your two strings as well but the code should be fine without a change.

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


More information about the Libc-alpha mailing list