diff --git a/src/util/iohelper.c b/src/util/iohelper.c index 9e7bbdef92d2f979a705a50f44184b4cdd45e4f7..93154f89454c19f690a8ef3c8279a1a77d0be30e 100644 --- a/src/util/iohelper.c +++ b/src/util/iohelper.c @@ -98,7 +98,7 @@ runIO(const char *path, int fd, int oflags, unsigned long long length) goto cleanup; } base = buf; - buf = (char *) (((intptr_t) base + alignMask) & alignMask); + buf = (char *) (((intptr_t) base + alignMask) & ~alignMask); #endif switch (oflags & O_ACCMODE) {