clean up hostname handling, make service_name() static
[project/mdnsd.git] / main.c
diff --git a/main.c b/main.c
index 22ad73d..f07b9e6 100644 (file)
--- a/main.c
+++ b/main.c
@@ -45,11 +45,8 @@ main(int argc, char **argv)
 {
        int ch, ttl;
 
-       while ((ch = getopt(argc, argv, "h:t:i:d")) != -1) {
+       while ((ch = getopt(argc, argv, "t:i:d")) != -1) {
                switch (ch) {
-               case 'h':
-                       hostname = optarg;
-                       break;
                case 't':
                        ttl = atoi(optarg);
                        if (ttl > 0)
@@ -89,6 +86,7 @@ main(int argc, char **argv)
 
        cache_cleanup();
        service_cleanup();
+       vlist_flush(&interfaces);
 
        return 0;
 }