Silence compiler warning.

This commit is contained in:
Simon Kelley
2025-02-21 00:04:34 +00:00
parent 1e587bec57
commit 484fea238a

View File

@@ -2675,15 +2675,15 @@ static int one_opt(int option, char *arg, char *errstr, char *gen_err, int comma
if (msize > 128) if (msize > 128)
ret_err_free(_("bad prefix length"), new); ret_err_free(_("bad prefix length"), new);
mask = (1LLU << (128 - msize)) - 1LLU; /* prefix==64 overflows the mask calculation */
if (msize <= 64)
mask = (u64)-1LL;
else
mask = (1LLU << (128 - msize)) - 1LLU;
new->is6 = 1; new->is6 = 1;
new->prefixlen = msize; new->prefixlen = msize;
/* prefix==64 overflows the mask calculation above */
if (msize <= 64)
mask = (u64)-1LL;
new->end6 = new->start6; new->end6 = new->start6;
setaddr6part(&new->start6, addrpart & ~mask); setaddr6part(&new->start6, addrpart & ~mask);
setaddr6part(&new->end6, addrpart | mask); setaddr6part(&new->end6, addrpart | mask);