]> git.meshlink.io Git - catta/commitdiff
small cleanup
authorLennart Poettering <lennart@poettering.net>
Mon, 20 Feb 2006 15:27:08 +0000 (15:27 +0000)
committerLennart Poettering <lennart@poettering.net>
Mon, 20 Feb 2006 15:27:08 +0000 (15:27 +0000)
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1149 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe

avahi-daemon/static-hosts.c

index ae8961b6ea3f2abe2629b32d13395f2b98b345d3..163ad303406e0d147de8590eb4c7c666c734c0ba 100644 (file)
@@ -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);