[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] Add Coccinelle patch for detecing places where CEIL_DIV should be used.



commit 25eaf77033cd4cc6a5241554be8951a022dd54bd
Author: Alexander Færøy <ahf@xxxxxxxxxxxxxx>
Date:   Mon Jun 5 14:45:53 2017 +0000

    Add Coccinelle patch for detecing places where CEIL_DIV should be used.
---
 scripts/coccinelle/ceil_div.cocci | 6 ++++++
 1 file changed, 6 insertions(+)

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



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits