Initial srv before using it in bind(2)

MFC after:	3 days
Reported by:	Coverity
CID:		1357526
Sponsored by:	Dell EMC Isilon
This commit is contained in:
Enji Cooper 2017-05-28 09:08:30 +00:00
parent 15f9aa4370
commit e5853fc53c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=319062

View File

@ -72,6 +72,7 @@ main(int argc, char **argv)
if (sock < 0)
err(EXIT_FAILURE, "socket");
memset(&srv, 0, sizeof(srv));
srv.sin_len = sizeof(srv);
srv.sin_family = AF_INET;
srv.sin_port = htons(port);