util: fix thinko in runIO

When aligning you need to clear the bits in the mask and leave the
others aside.  Likely this code has never run, and will never run.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Paolo Bonzini 2011-11-24 16:36:50 +01:00 committed by Eric Blake
parent f88de3eb51
commit a1b62f983b

View File

@ -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) {