Re: [dev] [sic]: patches for string handling

From: Kris Maglione <maglione.k_AT_gmail.com>
Date: Tue, 22 Sep 2009 19:12:20 -0400

On Wed, Sep 23, 2009 at 12:53:35AM +0200, Mark Edgar wrote:
>* Fix buffer overrun when using strncpy()

It's really sad to see code using strncpy.

>* Use startswith() macro instead strncmp()

Macros don't go over so well around here, but I'm in favor of
that one (even if as a utility function rather than a macro).

>* Use const char * where appropriate

const char* tends not to go over so well around here.

>* Use size_t instead of unsigned int in readl().

We also tend not to use *_t integer types types in favor of int
and uint.

I'll take this opportunity to re-submit my ages-old
modifications of sic (which push the line count to 251).
Incidentally, what's with all of the (void) casts of function
calls lately? Have we really resorted to that level of GNU-style
hair brained pedantry?

-- 
Kris Maglione
The best way to predict the future is to invent it.
	--Alan Kay


Received on Tue Sep 22 2009 - 23:12:20 UTC

This archive was generated by hypermail 2.2.0 : Tue Sep 22 2009 - 23:24:01 UTC