On Nov 4, 2012, at 2:26 AM, David Laight wrote:
> Personally I almost never mark variables 'const', the only I initialise
> in their declarations (at the top of a function) are probably almost
> always never chaned (well maybe execpt default error values).
Personally, I always mark variable as const if I don't expect its value to
change since that documents that expectation. This is especially true for
pointers:
const struct foo_softc * const sc = ifp->if_softc;
Once nice side effect is that it catches errors like:
if (sc = NULL) {
}