Skip to content
This repository was archived by the owner on Sep 30, 2022. It is now read-only.

Commit 981c89d

Browse files
committed
test: fixup hostname max length usage
Signed-off-by: Karol Mroz <[email protected]> (cherry picked from commit bb6ee60)
1 parent f320b94 commit 981c89d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/util/opal_if.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ test_ifaddrtoname(char *addr)
5959
int
6060
main(int argc, char *argv[])
6161
{
62-
char hostname[MAXHOSTNAMELEN];
62+
char hostname[OPAL_MAXHOSTNAMELEN];
6363

6464
opal_init(&argc, &argv);
6565
test_init("opal_if");
@@ -117,7 +117,7 @@ main(int argc, char *argv[])
117117
}
118118

119119
/* local host name */
120-
gethostname(hostname, MAXHOSTNAMELEN);
120+
gethostname(hostname, sizeof(hostname));
121121
if (test_ifaddrtoname(hostname)) {
122122
test_success();
123123
} else {

0 commit comments

Comments
 (0)