summaryrefslogtreecommitdiffstats
path: root/libc/unistd/gethostname.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/unistd/gethostname.c')
-rw-r--r--libc/unistd/gethostname.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libc/unistd/gethostname.c b/libc/unistd/gethostname.c
index 369d21e..5d3d7d9 100644
--- a/libc/unistd/gethostname.c
+++ b/libc/unistd/gethostname.c
@@ -41,11 +41,11 @@ int gethostname(char* buff, size_t buflen)
int namelen = strlen(name.nodename);
if ((int)buflen < namelen+1) {
- errno = EINVAL;
+ errno = EINVAL;
result = -1;
} else {
memcpy( buff, name.nodename, namelen+1 );
- }
+ }
}
return result;
}