#include "netdissect-stdinc.h"
#include "netdissect.h"
-#include <string.h>
-#include <stdlib.h>
#include "ip.h"
#include "ip6.h"
goto invalid;
/* Print all the EID records */
- while ((length > packet_offset) && (record_count--)) {
-
+ while ((length > packet_offset) && (record_count != 0)) {
+ record_count--;
ND_TCHECK_LEN(packet_iterator + packet_offset,
MAP_REGISTER_EID_LEN);
ND_PRINT("\n");
ND_PRINT(" %u locator(s)", loc_count);
- while (loc_count--) {
+ while (loc_count != 0) {
+ loc_count--;
ND_TCHECK_LEN(packet_iterator + packet_offset,
MAP_REGISTER_LOC_LEN);
lisp_loc = (const lisp_map_register_loc *) (packet_iterator + packet_offset);
return;
invalid:
nd_print_invalid(ndo);
- return;
}
static uint8_t
ND_PRINT(" flags [%s],", bittok2str(map_notify_hdr_flag,
"none", GET_BE_U_4(lisp_hdr)));
}
-
- return;
}
static void action_flag(netdissect_options *ndo, uint8_t act_auth_inc_res)