From 8e38570ebed346c00e58c3fcc998a4b305e83a36 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 15 Jun 2016 01:26:01 +0200 Subject: tree-wide: htonl() is weird, let's use htobe32() instead (#3538) Super-important change, yeah! --- coccinelle/htonl.cocci | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 coccinelle/htonl.cocci (limited to 'coccinelle/htonl.cocci') diff --git a/coccinelle/htonl.cocci b/coccinelle/htonl.cocci new file mode 100644 index 0000000000..4e69bb7090 --- /dev/null +++ b/coccinelle/htonl.cocci @@ -0,0 +1,20 @@ +@@ +expression s; +@@ +- htonl(s) ++ htobe32(s) +@@ +expression s; +@@ +- htons(s) ++ htobe16(s) +@@ +expression s; +@@ +- ntohl(s) ++ be32toh(s) +@@ +expression s; +@@ +- ntohs(s) ++ be16toh(s) -- cgit v1.2.3-54-g00ecf