From: Alexander Færøy Date: Mon, 5 Jun 2017 14:45:53 +0000 (+0000) Subject: Add Coccinelle patch for detecing places where CEIL_DIV should be used. X-Git-Tag: tor-0.3.2.1-alpha~145^2~12 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=25eaf77033cd4cc6a5241554be8951a022dd54bd;p=thirdparty%2Ftor.git Add Coccinelle patch for detecing places where CEIL_DIV should be used. --- diff --git a/scripts/coccinelle/ceil_div.cocci b/scripts/coccinelle/ceil_div.cocci new file mode 100644 index 0000000000..00843e82c3 --- /dev/null +++ b/scripts/coccinelle/ceil_div.cocci @@ -0,0 +1,6 @@ +@@ +expression n, d; +@@ + +- (((n) + (d) - 1) / (d)) ++ CEIL_DIV(n, d)