From d76359aa45420cce136bb87c089b7d941a02429e Mon Sep 17 00:00:00 2001 From: Protobuf Team Bot Date: Fri, 22 Nov 2024 12:31:40 -0800 Subject: [PATCH] Use parentheses for macro argument PiperOrigin-RevId: 699254841 --- upb/port/def.inc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/upb/port/def.inc b/upb/port/def.inc index 526ab0871d90..bdd4d6f0a128 100644 --- a/upb/port/def.inc +++ b/upb/port/def.inc @@ -68,10 +68,10 @@ Error, UINTPTR_MAX is undefined // overall - in that case, it can overlap with the trailing padding of the rest // of the struct, and a naive sizeof(base) + sizeof(flex) * count calculation // will not take into account that overlap, and allocate more than is required. -#define UPB_SIZEOF_FLEX(type, member, count) \ - (UPB_MAX(sizeof(type), \ - (offsetof(type, member) + \ - count * (offsetof(type, member[1]) - offsetof(type, member[0]))))) +#define UPB_SIZEOF_FLEX(type, member, count) \ + (UPB_MAX(sizeof(type), \ + (offsetof(type, member) + (count) * (offsetof(type, member[1]) - \ + offsetof(type, member[0]))))) #define UPB_MAPTYPE_STRING 0