summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-07-20 21:34:25 +0200
committerLennart Poettering <lennart@poettering.net>2010-07-20 21:34:25 +0200
commit84b00965b7c2d0fb41c061895a85b383cbc1c89d (patch)
tree64a97abe2d20e6aaff225aedee90c71a14cb0983 /src
parent2cc59dbfe08e92496b242aed3f2b3cf130beb203 (diff)
hostname: properly deal with unset hostname in fedora configuration
Diffstat (limited to 'src')
-rw-r--r--src/hostname-setup.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/hostname-setup.c b/src/hostname-setup.c
index 24e0f9d9fe..e0257166d8 100644
--- a/src/hostname-setup.c
+++ b/src/hostname-setup.c
@@ -101,10 +101,11 @@ static int read_hostname(char **hn) {
}
*hn = k;
- break;
+ r = 0;
+ goto finish;
}
- r = 0;
+ r = -ENOENT;
finish:
fclose(f);