[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: [patch] give gpioctl.c some love
In article <55D841B5.7010300%msys.ch@localhost>, Marc Balmer <marc%msys.ch@localhost> wrote:
>Am 22.08.15 um 11:20 schrieb Felix Deichmann:
>> Am 22.08.2015 um 10:15 schrieb Marc Balmer:
>>> Imo, this patch does not solve a problem, but creates new ones, maybe...
>>> The constness that you sprinkle is definitely not needed, only makes
>>> the code cluttered imo.
>> This "constness" is mainly adding "pointers to const" in function
>> arguments and for strings. Some will consider this good style to say the
>> least (MISRA, CERT C Coding Standard), and some even claim it will allow
>> for better compiler optimization.
>I agree for libraries, but not for tools where such functions are only
>used internally. And only that some committees consider sth good style
>does not mandate that I use it.
Const is good whe used properly; it helps the compiler and the programmer.
Main Index |
Thread Index |