appl: Fix warnings in test utils

This commit is contained in:
Nicolas Williams
2022-12-30 16:39:49 -06:00
parent a791f45e62
commit 0bedcc5c62
2 changed files with 7 additions and 0 deletions

View File

@@ -192,6 +192,9 @@ proto (int sock, const char *service)
gss_OID mech_oid;
char *mech, *p;
memset(&remote, 0, sizeof(remote));
local = remote;
addrlen = sizeof(local);
if (getsockname (sock, (struct sockaddr *)&local, &addrlen) < 0
|| addrlen != sizeof(local))

View File

@@ -316,6 +316,7 @@ main(int argc, char **argv)
argc -= optind;
argv += optind;
memset(&req, 0, sizeof(req));
mech_oid = select_mech(mech);
if (argc != 1 && argc != 2)
@@ -346,6 +347,9 @@ main(int argc, char **argv)
}
num_headers = 0;
if (req.response == NULL)
errx(1, "Got no response");
if (strstr(req.response, " 200 ") != NULL) {
print_body = 1;
done = 1;