提交 a1b62f98 编写于 作者: P Paolo Bonzini 提交者: Eric Blake

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: NPaolo Bonzini <pbonzini@redhat.com>
上级 f88de3eb
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册