From 84b00965b7c2d0fb41c061895a85b383cbc1c89d Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 20 Jul 2010 21:34:25 +0200 Subject: hostname: properly deal with unset hostname in fedora configuration --- src/hostname-setup.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') 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); -- cgit v1.2.3-54-g00ecf