Permalink
Browse files

Polish, mostly for coverage purposes

  • Loading branch information...
1 parent 82744f1 commit 9d29b38612a74c443e40434a9093a297845c194c @fgsch fgsch committed Jan 10, 2017
Showing with 26 additions and 12 deletions.
  1. +1 −2 bin/varnishadm/varnishadm.c
  2. +25 −9 bin/varnishd/mgt/mgt_main.c
  3. +0 −1 bin/varnishlog/varnishlog.c
@@ -484,9 +484,8 @@ main(int argc, char * const *argv)
argv += optind;
if (n_arg != NULL) {
- if (T_arg != NULL || S_arg != NULL) {
+ if (T_arg != NULL || S_arg != NULL)
usage(1);
- }
sock = n_arg_sock(n_arg);
} else if (T_arg == NULL) {
sock = n_arg_sock("");
@@ -644,15 +644,31 @@ main(int argc, char * const *argv)
*/
while ((o = getopt(argc, argv, opt_spec)) != -1) {
switch (o) {
- case '?': usage(); break;
- case 'b': b_arg = optarg; break;
- case 'C': C_flag = 1; break;
- case 'd': d_flag++; break;
- case 'f': f_arg = optarg; break;
- case 'F': F_flag = 1; break;
- case 'j': j_arg = optarg; break;
- case 'x': x_arg = optarg; break;
- default: break;
+ case '?':
+ usage();
+ case 'b':
+ b_arg = optarg;
+ break;
+ case 'C':
+ C_flag = 1;
+ break;
+ case 'd':
+ d_flag++;
+ break;
+ case 'f':
+ f_arg = optarg;
+ break;
+ case 'F':
+ F_flag = 1;
+ break;
+ case 'j':
+ j_arg = optarg;
+ break;
+ case 'x':
+ x_arg = optarg;
+ break;
+ default:
+ break;
}
}
@@ -137,7 +137,6 @@ main(int argc, char * const *argv)
case 'h':
/* Usage help */
usage(0);
- break;
case 'w':
/* Write to file */
REPLACE(LOG.w_arg, optarg);

0 comments on commit 9d29b38

Please sign in to comment.