aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaciej Żenczykowski <maze@google.com>2012-06-27 18:07:02 -0700
committermaximilian attems <max@stro.at>2012-06-28 17:28:32 +0200
commit1a6f222b01cead2ec48556203f0e200107eb4c2f (patch)
treeea13a3c9f05d2044dcfff3b854bdc898e8811515
parent029622dfbfe25203275a385a5bf33d44c2409b00 (diff)
downloadklibc-1a6f222b01cead2ec48556203f0e200107eb4c2f.tar.gz
[klibc] Fix gethostname()/getdomainname()klibc-2.0.1
uname(2) returns (like all syscalls) 0 on success. Signed-off-by: Maciej Żenczykowski <maze@google.com> Signed-off-by: maximilian attems <max@stro.at>
-rw-r--r--usr/klibc/getdomainname.c2
-rw-r--r--usr/klibc/gethostname.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/usr/klibc/getdomainname.c b/usr/klibc/getdomainname.c
index 61722ca3519b54..218ff0baa87167 100644
--- a/usr/klibc/getdomainname.c
+++ b/usr/klibc/getdomainname.c
@@ -11,7 +11,7 @@ int getdomainname(char *name, size_t len)
{
struct utsname un;
- if (!uname(&un))
+ if (uname(&un))
return -1;
if (len < strlen(un.domainname) + 1) {
diff --git a/usr/klibc/gethostname.c b/usr/klibc/gethostname.c
index 5326b5fc4eb91c..120edd94317088 100644
--- a/usr/klibc/gethostname.c
+++ b/usr/klibc/gethostname.c
@@ -11,7 +11,7 @@ int gethostname(char *name, size_t len)
{
struct utsname un;
- if (!uname(&un))
+ if (uname(&un))
return -1;
if (len < strlen(un.nodename) + 1) {