Fix wrong length for sethostname()
This was messed up in the previous commit.
This commit is contained in:
parent
5c6a17ef20
commit
13cbb19adc
|
@ -36,7 +36,7 @@ main(int argc, char *argv[])
|
|||
eprintf("gethostname:");
|
||||
puts(host);
|
||||
} else {
|
||||
if (sethostname(argv[0], sz + 1) < 0)
|
||||
if (sethostname(argv[0], strlen(argv[0])) < 0)
|
||||
eprintf("sethostname:");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user