[ros-diffs] [gvg] 13584: Fix ROUND_UP when N is a multiple of S. Proposed by unC0Rr.

gvg at svn.reactos.com gvg at svn.reactos.com
Tue Feb 15 18:25:01 CET 2005


Fix ROUND_UP when N is a multiple of S. Proposed by unC0Rr.
Modified: trunk/reactos/tools/mkhive/binhive.c
  _____  

Modified: trunk/reactos/tools/mkhive/binhive.c
--- trunk/reactos/tools/mkhive/binhive.c	2005-02-15 15:46:22 UTC
(rev 13583)
+++ trunk/reactos/tools/mkhive/binhive.c	2005-02-15 17:25:01 UTC
(rev 13584)
@@ -49,8 +49,8 @@

 #define  REG_EXTEND_HASH_TABLE_SIZE    4
 #define  REG_VALUE_LIST_CELL_MULTIPLE  4
 
-#define ROUND_UP(N, S) ((N) + (S) - ((N) % (S)))
 #define ROUND_DOWN(N, S) ((N) - ((N) % (S)))
+#define ROUND_UP(N, S) ROUND_DOWN((N) + (S) - 1, (S))
 
 #define ABS_VALUE(V) (((V) < 0) ? -(V) : (V))
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.reactos.org/pipermail/ros-diffs/attachments/20050215/73ec1f2e/attachment.html


More information about the Ros-diffs mailing list