Browse Source

[master] Compilation fix in src/lib/dhcp/addr_utilities.cc (after 2238 merge)

Tomek Mrugalski 12 years ago
parent
commit
76fa5523da
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/lib/dhcp/addr_utilities.cc

+ 2 - 2
src/lib/dhcp/addr_utilities.cc

@@ -22,7 +22,7 @@ namespace dhcp {
 isc::asiolink::IOAddress firstAddrInPrefix(const isc::asiolink::IOAddress& prefix,
 isc::asiolink::IOAddress firstAddrInPrefix(const isc::asiolink::IOAddress& prefix,
                                             uint8_t len) {
                                             uint8_t len) {
 
 
-    static char bitMask[]= { 0, 0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc, 0xfe, 0xff };
+    const static uint8_t bitMask[]= { 0, 0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc, 0xfe, 0xff };
     uint8_t packed[V6ADDRESS_LEN];
     uint8_t packed[V6ADDRESS_LEN];
 
 
     // First we copy the whole address as 16 bytes.
     // First we copy the whole address as 16 bytes.
@@ -57,7 +57,7 @@ isc::asiolink::IOAddress firstAddrInPrefix(const isc::asiolink::IOAddress& prefi
 isc::asiolink::IOAddress lastAddrInPrefix(const isc::asiolink::IOAddress& prefix,
 isc::asiolink::IOAddress lastAddrInPrefix(const isc::asiolink::IOAddress& prefix,
                                            uint8_t len) {
                                            uint8_t len) {
 
 
-    static char bitMask[]= { 0, 0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc, 0xfe, 0xff };
+    const static uint8_t bitMask[]= { 0, 0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc, 0xfe, 0xff };
     uint8_t packed[V6ADDRESS_LEN];
     uint8_t packed[V6ADDRESS_LEN];
 
 
     // First we copy the whole address as 16 bytes.
     // First we copy the whole address as 16 bytes.