mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 03:12:22 +00: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:
parent
f88de3eb51
commit
a1b62f983b
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user