]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-forces.c
Clean up rounding up.
[tcpdump] / print-forces.c
index 9a3229dd8b289564e8f13fb22acef19460ff54f8..425af7e94353d4b27c937e2488b876aed2a611ee 100644 (file)
@@ -388,7 +388,7 @@ struct forces_tlv {
        nd_uint16_t length;
 };
 
-#define F_ALN_LEN(len) ( ((len)+ForCES_ALNL-1) & ~(ForCES_ALNL-1) )
+#define F_ALN_LEN(len) roundup2(len, ForCES_ALNL)
 #define        GET_TOP_TLV(fhdr) ((const struct forces_tlv *)((fhdr) + sizeof (struct forcesh)))
 #define TLV_SET_LEN(len)  (F_ALN_LEN(TLV_HDRL) + (len))
 #define TLV_DATA(tlvp)   ((const void*)(((const char*)(tlvp)) + TLV_SET_LEN(0)))