Download raw body.
relayd: fix scan-build dead stores findings
The second is the same as in httpd[1] the first one is a simple dead
stores.
OK?
1: https://marc.info/?l=openbsd-tech&m=176690419616789&w=2
index eaad7b6a3b8..6fff3797566 100644
--- a/usr.sbin/relayd/relayd.c
+++ b/usr.sbin/relayd/relayd.c
@@ -1310,7 +1310,6 @@ relay_load_fd(int fd, off_t *len)
char *buf = NULL;
struct stat st;
off_t size;
- ssize_t rv;
int err;
if (fstat(fd, &st) != 0)
@@ -1318,7 +1317,7 @@ relay_load_fd(int fd, off_t *len)
size = st.st_size;
if ((buf = calloc(1, size + 1)) == NULL)
goto fail;
- if ((rv = pread(fd, buf, size, 0)) != size)
+ if (pread(fd, buf, size, 0) != size)
goto fail;
close(fd);
@@ -1478,7 +1477,7 @@ expand_string(char *label, size_t len, const char *srch, const char *repl)
log_debug("%s: calloc", __func__);
return (-1);
}
- p = q = label;
+ p = label;
while ((q = strstr(p, srch)) != NULL) {
*q = '\0';
if ((strlcat(tmp, p, len) >= len) ||
relayd: fix scan-build dead stores findings