mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-09-06 18:05:37 +00:00
![Laurent Vivier](/assets/img/avatar_default.png)
sample from http://coccinellery.org/ Signed-off-by: Laurent Vivier <lvivier@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
20 lines
279 B
Plaintext
20 lines
279 B
Plaintext
// Use macro DIV_ROUND_UP instead of (((n) + (d) - 1) /(d))
|
|
@@
|
|
expression e1;
|
|
expression e2;
|
|
@@
|
|
(
|
|
- ((e1) + e2 - 1) / (e2)
|
|
+ DIV_ROUND_UP(e1,e2)
|
|
|
|
|
- ((e1) + (e2 - 1)) / (e2)
|
|
+ DIV_ROUND_UP(e1,e2)
|
|
)
|
|
|
|
@@
|
|
expression e1;
|
|
expression e2;
|
|
@@
|
|
-(DIV_ROUND_UP(e1,e2))
|
|
+DIV_ROUND_UP(e1,e2)
|