]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Add Coccinelle patch for detecing places where CEIL_DIV should be used.
authorAlexander Færøy <ahf@torproject.org>
Mon, 5 Jun 2017 14:45:53 +0000 (14:45 +0000)
committerNick Mathewson <nickm@torproject.org>
Thu, 24 Aug 2017 19:20:11 +0000 (15:20 -0400)
scripts/coccinelle/ceil_div.cocci [new file with mode: 0644]

diff --git a/scripts/coccinelle/ceil_div.cocci b/scripts/coccinelle/ceil_div.cocci
new file mode 100644 (file)
index 0000000..00843e8
--- /dev/null
@@ -0,0 +1,6 @@
+@@
+expression n, d;
+@@
+
+- (((n) + (d) - 1) / (d))
++ CEIL_DIV(n, d)