From bb6ee605bf6e94cd41edbecceb2b19dcd777d4dc Mon Sep 17 00:00:00 2001 From: Karol Mroz Date: Wed, 20 Apr 2016 00:32:22 +0200 Subject: [PATCH] test: fixup hostname max length usage Signed-off-by: Karol Mroz --- test/util/opal_if.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/util/opal_if.c b/test/util/opal_if.c index ab12c6d5ca..a459384ba2 100644 --- a/test/util/opal_if.c +++ b/test/util/opal_if.c @@ -59,7 +59,7 @@ test_ifaddrtoname(char *addr) int main(int argc, char *argv[]) { - char hostname[MAXHOSTNAMELEN]; + char hostname[OPAL_MAXHOSTNAMELEN]; opal_init(&argc, &argv); test_init("opal_if"); @@ -117,7 +117,7 @@ main(int argc, char *argv[]) } /* local host name */ - gethostname(hostname, MAXHOSTNAMELEN); + gethostname(hostname, sizeof(hostname)); if (test_ifaddrtoname(hostname)) { test_success(); } else {