Skip to content
Snippets Groups Projects
Commit be6ac304 authored by Michael Tüxen's avatar Michael Tüxen
Browse files

Don't use undefined behaviour.

parent 1fea873e
No related branches found
No related tags found
No related merge requests found
......@@ -239,7 +239,7 @@ static u32 crc_c[256] = {
__be32 sctp_crc32c(const void *packet, u32 len)
{
u32 i, crc32c;
u8 byte0, byte1, byte2, byte3;
u32 byte0, byte1, byte2, byte3;
const u8 *buf = (const u8 *)packet;
crc32c = ~0;
......
......@@ -309,7 +309,7 @@ extern int netmask_to_prefix(const char *netmask)
int prefix_len = 0;
for (pos = 31; pos >= 0; --pos) {
if (!(mask_addr & (1<<pos)))
if (!(mask_addr & (1U<<pos)))
break;
++prefix_len;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment