From: reyk Date: Wed, 6 Aug 2014 18:38:11 +0000 (+0000) Subject: Use memset(buf instead of memset(&buf. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=876a82a2d6d4118647dea716d3f6fc1b519fc9ae;p=openbsd Use memset(buf instead of memset(&buf. Pointed out by deraadt@ --- diff --git a/usr.sbin/httpd/server.c b/usr.sbin/httpd/server.c index dd009c691a8..56f363fc396 100644 --- a/usr.sbin/httpd/server.c +++ b/usr.sbin/httpd/server.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server.c,v 1.38 2014/08/06 16:10:02 jsing Exp $ */ +/* $OpenBSD: server.c,v 1.39 2014/08/06 18:38:11 reyk Exp $ */ /* * Copyright (c) 2006 - 2014 Reyk Floeter @@ -998,8 +998,8 @@ server_log(struct client *clt, const char *msg) } if (debug_cmd != -1 && msg != NULL) { - memset(&ibuf, 0, sizeof(ibuf)); - memset(&obuf, 0, sizeof(obuf)); + memset(ibuf, 0, sizeof(ibuf)); + memset(obuf, 0, sizeof(obuf)); (void)print_host(&clt->clt_ss, ibuf, sizeof(ibuf)); (void)server_http_host(&clt->clt_srv_ss, obuf, sizeof(obuf)); if (EVBUFFER_LENGTH(clt->clt_log) && diff --git a/usr.sbin/httpd/server_fcgi.c b/usr.sbin/httpd/server_fcgi.c index f2d14f4598f..08fd6e16a69 100644 --- a/usr.sbin/httpd/server_fcgi.c +++ b/usr.sbin/httpd/server_fcgi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server_fcgi.c,v 1.23 2014/08/06 15:08:04 florian Exp $ */ +/* $OpenBSD: server_fcgi.c,v 1.24 2014/08/06 18:38:11 reyk Exp $ */ /* * Copyright (c) 2014 Florian Obser @@ -144,7 +144,7 @@ server_fcgi(struct httpd *env, struct client *clt) socket_set_blockmode(fd, BM_NONBLOCK); - memset(&hbuf, 0, sizeof(hbuf)); + memset(hbuf, 0, sizeof(hbuf)); clt->clt_fcgi_state = FCGI_READ_HEADER; clt->clt_fcgi_toread = sizeof(struct fcgi_record_header);