mirror of
https://github.com/libvirt/libvirt.git
synced 2026-08-05 18:56:51 -05:00
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:
committed by
Eric Blake
parent
f88de3eb51
commit
a1b62f983b
+1
-1
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user