Author: biurrun Date: Tue Nov 24 10:47:23 2009 New Revision: 1760 Log: Remove HIP_LEN_PAD macro indirection; it is only used in one place. Modified: trunk/community-operator/hipl.c Modified: trunk/community-operator/hipl.c ============================================================================== --- trunk/community-operator/hipl.c Tue Nov 24 10:44:22 2009 (r1759) +++ trunk/community-operator/hipl.c Tue Nov 24 10:47:23 2009 (r1760) @@ -109,9 +109,6 @@ return (msg->payload_len == 0) ? 0 : ((msg->payload_len + 1) << 3); } -#define HIP_LEN_PAD(len) \ - ((((len) & 0x07) == 0) ? (len) : ((((len) >> 3) << 3) + 8)) - /** * Get the padded length of a HIP message parameter. * @@ -120,7 +117,8 @@ */ static uint16_t hip_get_param_total_len(const hip_tlv_common *tlv) { - return HIP_LEN_PAD(sizeof(hip_tlv_common) + ntohs(tlv->length)); +#define LEN (sizeof(hip_tlv_common) + ntohs(tlv->length)) + return (((LEN & 0x07) == 0) ? LEN : (((LEN >> 3) << 3) + 8)); } /**