aboutsummaryrefslogtreecommitdiff
path: root/xs_random.h
diff options
context:
space:
mode:
authordefault <nobody@localhost>2024-10-08 07:45:17 +0200
committerdefault <nobody@localhost>2024-10-08 07:45:17 +0200
commit12373b018e985ba0bc5628dcaceb7c406a350e45 (patch)
tree8093b8de6b52fbfb8447eb88d2821d63b719202d /xs_random.h
parente49c837cd790b0c6e4cbccafb148d2687a132258 (diff)
Added -pedantic compilation flag.
Diffstat (limited to 'xs_random.h')
-rw-r--r--xs_random.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/xs_random.h b/xs_random.h
index d076cc2..78de32a 100644
--- a/xs_random.h
+++ b/xs_random.h
@@ -66,7 +66,8 @@ void *xs_rnd_buf(void *buf, int size)
/* fill with full integers */
while (n--) {
xs_rnd_int32_d(&s);
- p = memcpy(p, &s, sizeof(s)) + sizeof(s);
+ memcpy(p, &s, sizeof(s));
+ p += sizeof(s);
}
if ((n = size % sizeof(s))) {