summaryrefslogtreecommitdiff
path: root/src/dd.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2004-04-15 09:11:42 +0000
committerJim Meyering <jim@meyering.net>2004-04-15 09:11:42 +0000
commita5d9418d66e71cbdb5f73182590b4893682e4c07 (patch)
tree0fa68c44e6419bbab1c8eeceb2fa3391f21234fa /src/dd.c
parent5f20d9e92127ea7e56d93ebe25f8754069bd833a (diff)
downloadcoreutils-a5d9418d66e71cbdb5f73182590b4893682e4c07.tar.xz
(ROUND_UP_OFFSET, PTR_ALIGN): Remove.
All uses replaced by ptr_align.
Diffstat (limited to 'src/dd.c')
-rw-r--r--src/dd.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/dd.c b/src/dd.c
index 3700822fd..535469e73 100644
--- a/src/dd.c
+++ b/src/dd.c
@@ -53,10 +53,6 @@
# 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
{