(ROUND_UP_OFFSET, PTR_ALIGN): Remove.
authorJim Meyering <jim@meyering.net>
Thu, 15 Apr 2004 09:11:42 +0000 (09:11 +0000)
committerJim Meyering <jim@meyering.net>
Thu, 15 Apr 2004 09:11:42 +0000 (09:11 +0000)
All uses replaced by ptr_align.

src/dd.c

index 3700822..535469e 100644 (file)
--- a/src/dd.c
+++ b/src/dd.c
 # define fdatasync(fd) (errno = ENOSYS, -1)
 #endif
 
-#define ROUND_UP_OFFSET(X, M) ((M) - 1 - (((X) + (M) - 1) % (M)))
-#define PTR_ALIGN(Ptr, M) ((Ptr) \
-                          + ROUND_UP_OFFSET ((char *)(Ptr) - (char *)0, (M)))
-
 #define max(a, b) ((a) > (b) ? (a) : (b))
 #define output_char(c)                         \
   do                                           \
@@ -1061,13 +1057,13 @@ dd_copy (void)
   ibuf = real_buf;
   ibuf += SWAB_ALIGN_OFFSET;   /* allow space for swab */
 
-  ibuf = PTR_ALIGN (ibuf, page_size);
+  ibuf = ptr_align (ibuf, page_size);
 
   if (conversions_mask & C_TWOBUFS)
     {
       /* Page-align the output buffer, too.  */
       real_obuf = xmalloc (output_blocksize + page_size - 1);
-      obuf = PTR_ALIGN (real_obuf, page_size);
+      obuf = ptr_align (real_obuf, page_size);
     }
   else
     {