Skip to content

Commit

Permalink
Use parentheses for macro argument
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 699254841
  • Loading branch information
protobuf-github-bot authored and copybara-github committed Nov 22, 2024
1 parent 0bdcf98 commit d76359a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions upb/port/def.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit d76359a

Please sign in to comment.