diff options
| -rw-r--r-- | avahi-daemon/static-hosts.c | 66 | ||||
| -rwxr-xr-x | bootstrap.sh | 4 | 
2 files changed, 38 insertions, 32 deletions
| diff --git a/avahi-daemon/static-hosts.c b/avahi-daemon/static-hosts.c index aba96f7..23d5384 100644 --- a/avahi-daemon/static-hosts.c +++ b/avahi-daemon/static-hosts.c @@ -171,46 +171,52 @@ void static_hosts_load(int in_chroot) {          line++; -		/* Find the start of the line, ignore whitespace */ -		s = ln + strspn(ln, " \t"); -		/* Set the end of the string to NULL */ -		s[strcspn(s, "#\r\n")] = 0; - -		/* Ignore comment (#) and blank lines (*/ -		if (*s == '#' || *s == 0) -			continue; - -		/* Read the first string (ip) up to the next whitespace */ -		len = strcspn(s, " \t"); -		ip = avahi_strndup(s, len); - -		/* Skip past it */ -		s += len; - -		/* Find the next token */ -		s += strspn(s, " \t"); -		len = strcspn(s, " \t"); -		host = avahi_strndup(s, len); - -		if (*host == 0) -		{ -			avahi_log_error ("%s:%d: Error, unexpected end of line!", filename, line); -            break; -		} +        /* Find the start of the line, ignore whitespace */ +        s = ln + strspn(ln, " \t"); +        /* Set the end of the string to NULL */ +        s[strcspn(s, "#\r\n")] = 0; + +        /* Ignore comment (#) and blank lines (*/ +        if (*s == '#' || *s == 0) +            continue; + +        /* Read the first string (ip) up to the next whitespace */ +        len = strcspn(s, " \t"); +        ip = avahi_strndup(s, len); + +        /* Skip past it */ +        s += len; + +        /* Find the next token */ +        s += strspn(s, " \t"); +        len = strcspn(s, " \t"); +        host = avahi_strndup(s, len); + +        if (*host == 0) +        { +            avahi_log_error("%s:%d: Error, unexpected end of line!", filename, line); +            avahi_free(host); +            avahi_free(ip); +	    break; +        }          /* Skip past any more spaces */ -		s += strspn(s+len, " \t"); +        s += strspn(s+len, " \t");          /* Anything left? */ -		if (*(s+len) != 0) { -			avahi_log_error ("%s:%d: Junk on the end of the line!", filename, line); +        if (*(s+len) != 0) { +            avahi_log_error ("%s:%d: Junk on the end of the line!", filename, line); +            avahi_free(host); +            avahi_free(ip);              break; -		} +        }          h = static_host_new();          h->host = host;          h->ip = ip;      } + +    fclose(f);  }  void static_hosts_free_all (void) diff --git a/bootstrap.sh b/bootstrap.sh index 870053b..d0b6256 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -51,8 +51,8 @@ case `uname -s` in  esac  case "$USER" in -    lathiat) -    FLAGS="$FLAGS" +    lathiat|trentl) +    FLAGS="$FLAGS --disable-qt4"      ;;      sebest)      FLAGS="$FLAGS --disable-monodoc --disable-mono --disable-qt3 --disable-qt4 --sysconfdir=/etc --localstatedir=/var --prefix=/usr  --disable-manpages --disable-xmltoman" | 
