diff options
| -rw-r--r-- | Makefile | 2 | ||||
| -rw-r--r-- | xs.h | 2 | ||||
| -rw-r--r-- | xs_random.h | 3 | ||||
| -rw-r--r-- | xs_url.h | 2 |
4 files changed, 5 insertions, 4 deletions
| @@ -1,6 +1,6 @@ | |||
| 1 | PREFIX=/usr/local | 1 | PREFIX=/usr/local |
| 2 | PREFIX_MAN=$(PREFIX)/man | 2 | PREFIX_MAN=$(PREFIX)/man |
| 3 | CFLAGS?=-g -Wall -Wextra | 3 | CFLAGS?=-g -Wall -Wextra -pedantic |
| 4 | 4 | ||
| 5 | all: snac | 5 | all: snac |
| 6 | 6 | ||
| @@ -1070,7 +1070,7 @@ typedef struct { | |||
| 1070 | int size; /* size of full dict (_XS_TYPE_SIZE) */ | 1070 | int size; /* size of full dict (_XS_TYPE_SIZE) */ |
| 1071 | int first; /* first node for sequential search */ | 1071 | int first; /* first node for sequential search */ |
| 1072 | int root; /* root node for hashed search */ | 1072 | int root; /* root node for hashed search */ |
| 1073 | ditem_hdr ditems[]; /* the ditems */ | 1073 | /* a bunch of ditem_hdr and value follows */ |
| 1074 | } dict_hdr; | 1074 | } dict_hdr; |
| 1075 | 1075 | ||
| 1076 | 1076 | ||
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))) { |
| @@ -17,7 +17,7 @@ xs_str *xs_url_dec(const char *str) | |||
| 17 | 17 | ||
| 18 | while (*str) { | 18 | while (*str) { |
| 19 | if (*str == '%') { | 19 | if (*str == '%') { |
| 20 | int i; | 20 | unsigned int i; |
| 21 | 21 | ||
| 22 | if (sscanf(str + 1, "%02x", &i) == 1) { | 22 | if (sscanf(str + 1, "%02x", &i) == 1) { |
| 23 | unsigned char uc = i; | 23 | unsigned char uc = i; |