update copyright date to 2013
[dpdk.git] / app / test / test_lpm.c
index af51194..a747ec6 100644 (file)
@@ -1,7 +1,7 @@
 /*-
  *   BSD LICENSE
  * 
- *   Copyright(c) 2010-2012 Intel Corporation. All rights reserved.
+ *   Copyright(c) 2010-2013 Intel Corporation. All rights reserved.
  *   All rights reserved.
  * 
  *   Redistribution and use in source and binary forms, with or without 
@@ -725,7 +725,6 @@ test10(void)
 
        ip = IPv4(128, 0, 0, 0);
        depth = 24;
-       next_hop_add = 100;
 
        status = rte_lpm_delete(lpm, ip, depth);
        TEST_LPM_ASSERT(status < 0);
@@ -739,7 +738,6 @@ test10(void)
 
        ip = IPv4(128, 0, 0, 0);
        depth = 32;
-       next_hop_add = 100;
 
        status = rte_lpm_delete(lpm, ip, depth);
        TEST_LPM_ASSERT(status < 0);
@@ -940,12 +938,12 @@ test14(void)
        lpm = rte_lpm_create(__func__, SOCKET_ID_ANY, 256 * 32, 0);
        TEST_LPM_ASSERT(lpm != NULL);
 
-       ip = IPv4(0, 0, 0, 0);
        depth = 32;
        next_hop_add = 100;
+       ip = IPv4(0, 0, 0, 0);
 
        /* Add 256 rules that require a tbl8 extension */
-       for (ip = 0; ip <= IPv4(0, 0, 255, 0); ip += 256) {
+       for (; ip <= IPv4(0, 0, 255, 0); ip += 256) {
                status = rte_lpm_add(lpm, ip, depth, next_hop_add);
                TEST_LPM_ASSERT(status == 0);