Fix wrong length for sethostname()

This was messed up in the previous commit.
This commit is contained in:
sin 2014-02-14 15:11:06 +00:00
parent 5c6a17ef20
commit 13cbb19adc

View File

@ -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:");
}