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

From: FRIGN <dev_AT_frign.de>
Date: Thu, 22 Aug 2013 07:36:19 +0200

Hey sin, thanks for your feedback!

>> -static char *
>> -eat(char *s, int (*p)(int), int r) {
>> +static char*
>> +eat(char *s, int (*p)(int), const int r) {
>> while(*s != '\0' && p(*s) == r)
>> s++;
>> return s;
>> }
>
> Please do not use char* instead use char *.

I'm puzzled. What's with util.c:57? I'll invert the change and apply it
to line 57 instead of 50.

>
>> int
>> -main(int argc, char *argv[]) {
>> +main(const int argc, const char *argv[]) {
>
> Do no use const for main. Doesn't make sense.

Yep, I should've read more about it. I'll remove it from the patch.

>
> Thanks,
> sin
>
>
Received on Thu Aug 22 2013 - 07:36:19 CEST

This archive was generated by hypermail 2.3.0 : Thu Aug 22 2013 - 09:36:07 CEST