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: Bill Auerbach
Subject: [lwip-devel] [patch #7130] mib2.c: remove meaningless const qualifiers
Date: Fri, 26 Mar 2010 13:47:44 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6 (.NET CLR 3.5.30729)

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

Here's what I agree to: :-)

If snmp_nodes will not be changed at any time:

struct mib_node const * const snmp_nodes[28] = { (const struct
mib_node*)&snmp_scalar, ...

If snmp_nodes will be changed then:

struct mib_node const * snmp_nodes[28] = { (const struct
mib_node*)&snmp_scalar, ...

The pointers must be to const because they are initialized to const objects. 
If this is done corretly, there should be NO casts required on the array
initializers.

So probably:

struct mib_node const * const snmp_nodes[28] = { &snmp_scalar, ...

    _______________________________________________________

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]