More fixes

Anatoly Vorobey
Wed, 28 Jul 2004 17:50:18 +0300

On Fri, Jul 23, 2004 at 03:55:19PM +0400, Andrei Nigmatulin wrote:
> Hello,
> This is my two cents for memcached ;-)
> - Fixed unsafe realloc usage
> - Fixed some format string types
> - Fixed off-by-one overflow
> - Fixed possible memory leaks
> - Some optimizations and trivial fixes

Thanks, these are very appreciated. I reviewed the changes, and they all 
make good sense to me, except this one, where I don't understand why you 
bother with the conversion:

-        pos += sprintf(pos, "STAT arena_size %d\r\n", info.arena);
+        pos += sprintf(pos, "STAT arena_size %u\r\n", (unsigned int) info.arena);

etc. info.arena and all the other fields are already int. But anyway, 
this stat command hasn't been important for almost a year now, ever 
since we made a decision to never rely on malloc's handling 
of fragmentation. Perhaps we should just get rid of it.

I'll commit the patch after reviewing/testing it some more.

"There's nothing simply good, nor ill alone" -- John Donne