Wireshark-dev: Re: [Wireshark-dev] Replace ntohl() with g_ntohl() -> automated check?
From: Ulf Lamping <[email protected]>
Date: Tue, 07 Nov 2006 09:56:11 +0100
Jaap Keuter wrote:

Checked in.


On Mon, 6 Nov 2006, Albert Chin wrote:

Patch attached to convert usage of ntohl() -> g_ntohl(). On HP-UX,
ntohl() isn't available unless you -D_XOPEN_SOURCE_EXTENDED but there
are other uses of g_ntohl().

albert chin ([email protected])
Hi List!

It seems that we get more and more "keywords" known to be better not used in our code (or at least not in the dissector part).
I think for example of:
- printf
- perror
- sprintf
- ntohl
- ... and there might be a lot more!

Would it be possible to have some simple static code analysis tools to prevent such calls?
Of course, it shouldn't trigger on these keywords inside of strings and 
comments, so a simple text search might not be the way to go.
Any thoughts for a simple but solid solution, which could be integrated 
into the buildbot?
Regards, ULFL