diff options
Diffstat (limited to 'include/qemu/osdep.h')
-rw-r--r-- | include/qemu/osdep.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h index 72b75bf..9dd318a 100644 --- a/include/qemu/osdep.h +++ b/include/qemu/osdep.h @@ -205,13 +205,13 @@ extern int daemon(int, int); /* Round number up to multiple. Requires that d be a power of 2 (see * QEMU_ALIGN_UP for a safer but slower version on arbitrary - * numbers) */ + * numbers); works even if d is a smaller type than n. */ #ifndef ROUND_UP -#define ROUND_UP(n,d) (((n) + (d) - 1) & -(d)) +#define ROUND_UP(n, d) (((n) + (d) - 1) & -(0 ? (n) : (d))) #endif #ifndef DIV_ROUND_UP -#define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d)) +#define DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d)) #endif /* |