diff options
author | Omar Polo <op@omarpolo.com> | 2023-06-13 16:36:06 +0000 |
---|---|---|
committer | Omar Polo <op@omarpolo.com> | 2023-06-13 16:36:06 +0000 |
commit | 10cc819309de08fbab770ce9605dec1b35a4fad9 (patch) | |
tree | eaeacaa22de47101ab1a601ce31a375c5bd65ebc /gg.c | |
parent | d6d9f9b2a9493f3a6271fd52f3e63a51b2c57f67 (diff) |
avoid arithmetic on void pointers (GNU extension)
not really sold on this one, I don't see what other interpretation could
be given, but it's not standard so...
Diffstat (limited to 'gg.c')
-rw-r--r-- | gg.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -157,7 +157,7 @@ doreq(struct tls *ctx, const char *buf) } static size_t -dorep(struct tls *ctx, void *buf, size_t len) +dorep(struct tls *ctx, uint8_t *buf, size_t len) { ssize_t w; size_t tot = 0; @@ -189,7 +189,7 @@ get(const char *r) int foundhdr = 0, code = -1, od; char iribuf[GEMINI_URL_LEN]; char req[GEMINI_URL_LEN]; - char buf[2048]; + uint8_t buf[2048]; const char *parse_err, *host, *port; if (strlcpy(iribuf, r, sizeof(iribuf)) >= sizeof(iribuf)) @@ -234,7 +234,7 @@ get(const char *r) doreq(ctx, req); for (;;) { - char *t; + uint8_t *t; size_t len; len = dorep(ctx, buf, sizeof(buf)); |