Re: [dev] [sic] [patch] const-correctness and formalities

From: Roberto E. Vargas Caballero <>
Date: Thu, 22 Aug 2013 08:27:04 +0200

> Declaring immutable arguments makes reading the code easier.

Depends of the eyes, for me, const only adds noise to the code and
it should be avoid except in some situations. In the case of main
is directly an error because the standard says explicityly that main
must be defined as:

        main() (only in c89)
        int main()
        int main(int argc, char *argv[])
        int main(int argc, char argv[][])

The effects of other definition of main is implementation defined.

> Additionally, there was a small formal error how the pointer to the
> isspace()-function was passed as an argument to the eat-function.

What error? The name of a function generates a pointer to the function, and
it is the correct way of passing a pointer to function. It is similar
when you use the name of an array, that generates a pointer to the first
element of the array.

> Please let me know what you think about my proposed changes.

I only like the int -> size_t in strlcpy change.

Roberto E. Vargas Caballero
Received on Thu Aug 22 2013 - 08:27:04 CEST

This archive was generated by hypermail 2.3.0 : Thu Aug 22 2013 - 08:36:06 CEST