Skip to content

Commit

Permalink
Fix issue #53: Build problem with Clang, bit shift of negative value …
Browse files Browse the repository at this point in the history
…undefined

FreeBSD PR https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=202959

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
  • Loading branch information
troglobit committed Sep 7, 2015
1 parent 8b2ea21 commit 7475ccb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pimd.h
Original file line number Diff line number Diff line change
Expand Up @@ -324,9 +324,9 @@ typedef struct pim_jp_encod_grp_ {
(masklen) = tmp_masklen; \
} while (0)

#define MASKLEN_TO_MASK(masklen, mask) \
do { \
(mask) = (masklen)? htonl(~0 << ((sizeof((mask)) << 3) - (masklen))) : 0;\
#define MASKLEN_TO_MASK(masklen, mask) \
do { \
(mask) = masklen ? htonl(~0U << ((sizeof(mask) << 3) - (masklen))) : 0; \
} while (0)


Expand Down

0 comments on commit 7475ccb

Please sign in to comment.