summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTrent Lloyd <lathiat@bur.st>2006-02-20 02:33:31 +0000
committerTrent Lloyd <lathiat@bur.st>2006-02-20 02:33:31 +0000
commit0aa3030787e0bcb18df07667544b78e3aa7fffe9 (patch)
treeb5016ba8a1f77c21dd8c2947d77a06d030c88279
parentbba061b0c38d6308a10c8ef543fa72c1e1c5fad7 (diff)
* Update static hosts, fix a missing fclose(), free some leaked memory and fix indenting.
* Update my bootstrap.sh magic git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1147 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
-rw-r--r--avahi-daemon/static-hosts.c66
-rwxr-xr-xbootstrap.sh4
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"