summaryrefslogtreecommitdiff
path: root/xs_random.h
diff options
context:
space:
mode:
authorGravatar default2024-10-08 07:45:17 +0200
committerGravatar default2024-10-08 07:45:17 +0200
commit12373b018e985ba0bc5628dcaceb7c406a350e45 (patch)
tree8093b8de6b52fbfb8447eb88d2821d63b719202d /xs_random.h
parentDon't cache a page if an error is set. (diff)
downloadsnac2-12373b018e985ba0bc5628dcaceb7c406a350e45.tar.gz
snac2-12373b018e985ba0bc5628dcaceb7c406a350e45.tar.xz
snac2-12373b018e985ba0bc5628dcaceb7c406a350e45.zip
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)
66 /* fill with full integers */ 66 /* fill with full integers */
67 while (n--) { 67 while (n--) {
68 xs_rnd_int32_d(&s); 68 xs_rnd_int32_d(&s);
69 p = memcpy(p, &s, sizeof(s)) + sizeof(s); 69 memcpy(p, &s, sizeof(s));
70 p += sizeof(s);
70 } 71 }
71 72
72 if ((n = size % sizeof(s))) { 73 if ((n = size % sizeof(s))) {