From: des Date: Fri, 29 Jun 2007 10:04:12 +0000 (+0000) Subject: Simplify. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=77c288d5d4695c02120610cb02c3b4546403b77c;p=varnish Simplify. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1596 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishtop/varnishtop.c b/varnish-cache/bin/varnishtop/varnishtop.c index ddf6a73a..7a9b93fe 100644 --- a/varnish-cache/bin/varnishtop/varnishtop.c +++ b/varnish-cache/bin/varnishtop/varnishtop.c @@ -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(); } }