[PATCH 02/11] tests: Avoid filling with the same values in ioctl_block test
Eugene Syromyatnikov
evgsyr at gmail.com
Wed Sep 21 21:20:53 UTC 2016
* tests/ioctl.block (init_magic): Add iterator value to fill magic value
in order to enable detection of possible 4-byte aligned shifts.
---
tests/ioctl_block.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/ioctl_block.c b/tests/ioctl_block.c
index 3dc030d..bac9f68 100644
--- a/tests/ioctl_block.c
+++ b/tests/ioctl_block.c
@@ -50,7 +50,7 @@ init_magic(void *addr, const unsigned int size)
const unsigned int *end = addr + size - sizeof(int);
for (; p <= end; ++p)
- *(unsigned int *) p = magic;
+ *(unsigned int *) p = magic + (p - (unsigned int *)addr);
}
static struct xlat block_argless[] = {
--
1.7.10.4
More information about the Strace-devel
mailing list