From: des Date: Sun, 19 Aug 2007 17:17:58 +0000 (+0000) Subject: Whitespace cleanup X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1ef78bd57e81ccdf0bf3e08dd8be6b788bcff800;p=varnish Whitespace cleanup git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1853 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishadm/varnishadm.c b/varnish-cache/bin/varnishadm/varnishadm.c index 886d9421..5db9eff2 100644 --- a/varnish-cache/bin/varnishadm/varnishadm.c +++ b/varnish-cache/bin/varnishadm/varnishadm.c @@ -56,7 +56,7 @@ telnet_mgt(const char* T_arg, int argc, char* argv[]) char *answer = NULL; char buf[13]; char *p, *pp; - + XXXAZ(VSS_parse(T_arg, &addr, &port)); XXXAN(n = VSS_resolve(addr, port, &ta)); free(addr); @@ -65,22 +65,22 @@ telnet_mgt(const char* T_arg, int argc, char* argv[]) fprintf(stderr, "Could not open TELNET port\n"); exit(2); } - + sock = VSS_connect(ta[0]); - + for (i = 0; i < n; ++i) { free(ta[i]); ta[i] = NULL; } free(ta); - + for (i=0; i 0) write(sock, " ", 1); write(sock, argv[i], strlen(argv[i])); } write(sock, "\n", 1); - + n = read(sock, buf, 13); if (n != 13) { fprintf(stderr, "An error occured in receiving status.\n"); @@ -99,7 +99,7 @@ telnet_mgt(const char* T_arg, int argc, char* argv[]) } *p = '\0'; bytes = strtol(pp, &p, 10); - + answer = malloc(bytes+1); n = read(sock, answer, bytes); if (n != bytes) { @@ -108,14 +108,14 @@ telnet_mgt(const char* T_arg, int argc, char* argv[]) } answer[bytes] = '\0'; close(sock); - + if (status == STATUS_OK) { printf("%s\n", answer); exit(0); } fprintf(stderr, "Command failed with error code %ld\n", status); exit(1); - + } static void @@ -131,7 +131,7 @@ main(int argc, char *argv[]) int c; const char *address = NULL; int T_arg = 0; - + if (argc < 2) usage(); @@ -145,12 +145,12 @@ main(int argc, char *argv[]) usage(); } } - + if (T_arg) { if (optind == argc) usage(); telnet_mgt(address, argc - optind, &argv[optind]); } - + exit(0); }