[Freeciv-Dev] Re: [Patch] strcmp
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Dear diary, on Mon, Feb 11, 2002 at 08:21:43PM CET, I got a letter,
where Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx> told me, that...
> The return values of str(n)cmp and mystr(n)casecmp are used as
> boolean. This is bad. Attached patch fixes this.
This is bad. str[n]cmp() returns pointer, thus first you have to compare it
against NULL and second IIRC we don't make explicit compares against NULLs for
pointer return values.
--
Petr "Pasky" Baudis
* UN*X programmer && admin * IPv6 guy (XS26 co-coordinator)
* elinks maintainer * FreeCiv AI hacker
* IRCnet operator
.
I love deadlines.
I love the whooshing sound they make as they fly by.
-- Douglas Adams.
.
Public PGP key && geekcode && homepage: http://pasky.ji.cz/~pasky/
|
|