lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] [patch #7130] mib2.c: remove meaningless const qualifiers


From: Kieran Mansley
Subject: [lwip-devel] [patch #7130] mib2.c: remove meaningless const qualifiers
Date: Fri, 26 Mar 2010 13:40:22 +0000
User-agent: Opera/9.80 (X11; Linux i686; U; en) Presto/2.2.15 Version/10.00

Follow-up Comment #9, patch #7130 (project lwip):

Posted too fast: maybe it's not so weird.  I think it's trying to say that
the pointer is a const, rather than the thing it points to being a const. i.e.
if you have 

const char * foo;
char * const bar;

You can modify foo but not *foo, and you can modify *bar but not bar.

To complete Bill's list:

const struct mib_node* snmp_nodes[28] is an array of pointers to const struct
mib_node. 

(const struct mib_node*)&snmp_scalar is a pointer to a const struct mib_node.


(struct mib_node* const)&snmp_scalar is a const (i.e. unmodifiable) pointer
to a struct mib_node 


In summary, I'm not sure what's wrong with the current code, assuming that
they meant to declare const pointers rather than pointers to consts.  

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?7130>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]