Attention is currently required from: osmith, fixeria.
1 comment:
File src/gprs/gprs_llc_parse.c:
Patch Set #1, Line 138: ghp->data = (uint8_t *)&ctrl[3];
> You are also telling the user that calling the function won't make any kind of modification at any […]
The way those functions are writen is controversial and basically reflects some limitations of C (no overloading). Ideally there'd be 2 functions, one const and nother non-const.
See for instance https://stackoverflow.com/questions/16860418/why-strrchr-returns-char-instead-of-const-char
I see your point. But I still think in this caseit only confuses readers by pretending this function will not conclude in that buffer being modified at some point after being passed to it.
So I really see no advantage in using const there, and a lot of possible drawbacks.
To view, visit change 29279. To unsubscribe, or for help writing mail filters, visit settings.