]> err.no Git - varnish/commitdiff
Simplify.
authordes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Fri, 29 Jun 2007 10:04:12 +0000 (10:04 +0000)
committerdes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Fri, 29 Jun 2007 10:04:12 +0000 (10:04 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1596 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishtop/varnishtop.c

index ddf6a73a3973f5a14f2ab68703828b488b28dd40..7a9b93fe41adfda67a92965be339f8a6444690d4 100644 (file)
@@ -276,16 +276,11 @@ main(int argc, char **argv)
 {
        struct VSL_data *vd;
        const char *n_arg = NULL;
-       int i, o, once = 0;
+       int o, once = 0;
 
        vd = VSL_New();
 
        while ((o = getopt(argc, argv, VSL_ARGS "1fn:V")) != -1) {
-               i = VSL_Arg(vd, o, optarg);
-               if (i < 0)
-                       exit (1);
-               if (i > 0)
-                       continue;
                switch (o) {
                case '1':
                        VSL_Arg(vd, 'd', NULL);
@@ -301,6 +296,8 @@ main(int argc, char **argv)
                        varnish_version("varnishtop");
                        exit(0);
                default:
+                       if (VSL_Arg(vd, o, optarg) > 0)
+                               break;
                        usage();
                }
        }