diff options
Diffstat (limited to 'avahi-daemon/static-hosts.c')
-rw-r--r-- | avahi-daemon/static-hosts.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/avahi-daemon/static-hosts.c b/avahi-daemon/static-hosts.c index ae8961b..163ad30 100644 --- a/avahi-daemon/static-hosts.c +++ b/avahi-daemon/static-hosts.c @@ -200,11 +200,14 @@ void static_hosts_load(int in_chroot) { break; } + /* Skip over the host */ + s += len; + /* Skip past any more spaces */ - s += strspn(s+len, " \t"); + s += strspn(s, " \t"); /* Anything left? */ - if (*(s+len) != 0) { + if (*s != 0) { avahi_log_error ("%s:%d: Junk on the end of the line!", filename, line); avahi_free(host); avahi_free(ip); |