[prev in list] [next in list] [prev in thread] [next in thread] 

List:       varnish-commit
Subject:    r1596 - trunk/varnish-cache/bin/varnishtop
From:       des () projects ! linpro ! no (des at projects ! linpro ! no)
Date:       2007-06-29 10:04:12
Message-ID: 20070629100412.D76691EC030 () projects ! linpro ! no
[Download RAW message or body]

Author: des
Date: 2007-06-29 12:04:12 +0200 (Fri, 29 Jun 2007)
New Revision: 1596

Modified:
   trunk/varnish-cache/bin/varnishtop/varnishtop.c
Log:
Simplify.


Modified: trunk/varnish-cache/bin/varnishtop/varnishtop.c
===================================================================
--- trunk/varnish-cache/bin/varnishtop/varnishtop.c	2007-06-29 10:03:55 UTC (rev 1595)
+++ trunk/varnish-cache/bin/varnishtop/varnishtop.c	2007-06-29 10:04:12 UTC (rev 1596)
@@ -276,16 +276,11 @@
 {
 	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 @@
 			varnish_version("varnishtop");
 			exit(0);
 		default:
+			if (VSL_Arg(vd, o, optarg) > 0)
+				break;
 			usage();
 		}
 	}



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic