Skip to content

Objects_build_with_stringchecks

Rusty Russell edited this page Sep 29, 2011 · 1 revision

ccanlint's objects_build_with_stringchecks test uses ccan/str/str.h to do additional checking.

It overrides strstr, strchr and strrchr to return const char * when given a const char * argument to spot inadvertent const discarding.

It overrides isascii, isalpha etc. to make sure that they are actually passed an unsigned char value (or -1) as the standard insists, not a signed char. Note that ccan/str provides cisascii, cisalpha, etc which take an actual 'char'.

Clone this wiki locally