summaryrefslogtreecommitdiff
path: root/components/hostname.c
diff options
context:
space:
mode:
Diffstat (limited to 'components/hostname.c')
-rw-r--r--components/hostname.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/components/hostname.c b/components/hostname.c
index d7c10c8..d41465f 100644
--- a/components/hostname.c
+++ b/components/hostname.c
@@ -9,7 +9,7 @@
const char *
hostname(void)
{
- if (gethostname(buf, sizeof(buf)) == -1) {
+ if (gethostname(buf, sizeof(buf)) < 0) {
fprintf(stderr, "gethostbyname: %s\n", strerror(errno));
return NULL;
}