-/* $OpenBSD: qs.c,v 1.1 2022/06/28 16:11:30 claudio Exp $ */
+/* $OpenBSD: qs.c,v 1.2 2022/08/25 16:49:18 claudio Exp $ */
/*
* Copyright (c) 2020 Claudio Jeker <claudio@openbsd.org>
*
p[0] = '\0';
}
- bzero(&hints, sizeof(hints));
+ memset(&hints, 0, sizeof(hints));
hints.ai_family = AF_UNSPEC;
hints.ai_socktype = SOCK_DGRAM;
hints.ai_flags = AI_NUMERICHOST;
-/* $OpenBSD: slowcgi.c,v 1.3 2022/08/12 13:24:30 claudio Exp $ */
+/* $OpenBSD: slowcgi.c,v 1.4 2022/08/25 16:49:18 claudio Exp $ */
/*
* Copyright (c) 2020 Claudio Jeker <claudio@openbsd.org>
* Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv>
0)) == -1)
lerr(1, "slowcgi_listen: socket");
- bzero(&sun, sizeof(sun));
+ memset(&sun, 0, sizeof(sun));
sun.sun_family = AF_UNIX;
if (strlcpy(sun.sun_path, path, sizeof(sun.sun_path)) >=
sizeof(sun.sun_path))
/* Make space for further reads */
if (c->buf_len > 0) {
- bcopy(c->buf + c->buf_pos, c->buf, c->buf_len);
+ memmove(c->buf, c->buf + c->buf_pos, c->buf_len);
c->buf_pos = 0;
}
return;
return;
}
- bcopy(buf, env_entry->key, name_len);
+ memcpy(env_entry->key, buf, name_len);
buf += name_len;
n -= name_len;
env_entry->key[name_len] = '\0';
- bcopy(buf, env_entry->val, val_len);
+ memcpy(env_entry->val, buf, val_len);
buf += val_len;
n -= val_len;
env_entry->val[val_len] = '\0';