summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
efb2667)
Use unsigned constants to avoid integer overflows when shifting, and
because xmit_accm[] is an array of unsigned values.
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
ppp_option_error("can't escape character 0x%x", n);
ret = 0;
} else
ppp_option_error("can't escape character 0x%x", n);
ret = 0;
} else
- xmit_accm[n >> 5] |= 1 << (n & 0x1F);
+ xmit_accm[n >> 5] |= 1U << (n & 0x1F);
while (*p == ',' || *p == ' ')
++p;
}
while (*p == ',' || *p == ' ')
++p;
}
for (n = 0; n < 256; ++n) {
if (n == 0x7d)
n += 2; /* skip 7d, 7e */
for (n = 0; n < 256; ++n) {
if (n == 0x7d)
n += 2; /* skip 7d, 7e */
- if (xmit_accm[n >> 5] & (1 << (n & 0x1f))) {
+ if (xmit_accm[n >> 5] & (1U << (n & 0x1f))) {
if (!first)
printer(arg, ",");
else
if (!first)
printer(arg, ",");
else
{
ppp_add_notify(NF_PID_CHANGE, maybe_relock, 0);
the_channel = &tty_channel;
{
ppp_add_notify(NF_PID_CHANGE, maybe_relock, 0);
the_channel = &tty_channel;
- xmit_accm[3] = 0x60000000;
+ xmit_accm[3] = 0x60000000U;