Attention is currently required from: osmith, pespin.
1 comment:
File src/gprs/gprs_llc_parse.c:
Patch Set #1, Line 138: ghp->data = (uint8_t *)&ctrl[3];
The compiler may make optimizations based on what passed to the function. […]
The main point of using const is *not* to assist the compiler in optimizations but to protect yourself from mistakes... I am telling the API user that gprs_llc_hdr_parse() does not modify the given buffer, that's it. I would agree with you if I were actually changing the given buffer here via a const pointer, or were passing it to some other function which does so. What I am doing here and below is storing an address.
To view, visit change 29279. To unsubscribe, or for help writing mail filters, visit settings.