chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
tree-wide: htonl() is weird, let's use htobe32() instead (#3538)
[elogind.git]
/
coccinelle
/
htonl.cocci
diff --git a/coccinelle/htonl.cocci
b/coccinelle/htonl.cocci
new file mode 100644
(file)
index 0000000..
4e69bb7
--- /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)