src: Code cleanup

This commit is contained in:
Tatsuhiro Tsujikawa 2013-08-18 22:08:40 +09:00
parent 0c9703fa2c
commit 47ee8e3c79
3 changed files with 58 additions and 58 deletions

View File

@ -1462,23 +1462,23 @@ int main(int argc, char **argv)
while(1) { while(1) {
int flag; int flag;
static option long_options[] = { static option long_options[] = {
{"verbose", no_argument, 0, 'v' }, {"verbose", no_argument, nullptr, 'v'},
{"null-out", no_argument, 0, 'n' }, {"null-out", no_argument, nullptr, 'n'},
{"remote-name", no_argument, 0, 'O' }, {"remote-name", no_argument, nullptr, 'O'},
{"timeout", required_argument, 0, 't' }, {"timeout", required_argument, nullptr, 't'},
{"window-bits", required_argument, 0, 'w' }, {"window-bits", required_argument, nullptr, 'w'},
{"get-assets", no_argument, 0, 'a' }, {"get-assets", no_argument, nullptr, 'a'},
{"stat", no_argument, 0, 's' }, {"stat", no_argument, nullptr, 's'},
{"cert", required_argument, &flag, 1}, {"cert", required_argument, &flag, 1},
{"key", required_argument, &flag, 2}, {"key", required_argument, &flag, 2},
{"help", no_argument, 0, 'h' }, {"help", no_argument, nullptr, 'h'},
{"header", required_argument, 0, 'H' }, {"header", required_argument, nullptr, 'H'},
{"data", required_argument, 0, 'd' }, {"data", required_argument, nullptr, 'd'},
{"multiply", required_argument, 0, 'm' }, {"multiply", required_argument, nullptr, 'm'},
{"no-flow-control", no_argument, 0, 'f'}, {"no-flow-control", no_argument, nullptr, 'f'},
{"upgrade", no_argument, 0, 'u'}, {"upgrade", no_argument, nullptr, 'u'},
{"pri", required_argument, 0, 'p'}, {"pri", required_argument, nullptr, 'p'},
{0, 0, 0, 0 } {nullptr, 0, nullptr, 0 }
}; };
int option_index = 0; int option_index = 0;
int c = getopt_long(argc, argv, "Oad:fm:np:hH:vst:uw:", long_options, int c = getopt_long(argc, argv, "Oad:fm:np:hH:vst:uw:", long_options,

View File

@ -87,14 +87,14 @@ int main(int argc, char **argv)
while(1) { while(1) {
int flag; int flag;
static option long_options[] = { static option long_options[] = {
{"daemon", no_argument, 0, 'D' }, {"daemon", no_argument, nullptr, 'D'},
{"htdocs", required_argument, 0, 'd' }, {"htdocs", required_argument, nullptr, 'd'},
{"help", no_argument, 0, 'h' }, {"help", no_argument, nullptr, 'h'},
{"verbose", no_argument, 0, 'v' }, {"verbose", no_argument, nullptr, 'v'},
{"verify-client", no_argument, 0, 'V' }, {"verify-client", no_argument, nullptr, 'V'},
{"no-tls", no_argument, &flag, 1}, {"no-tls", no_argument, &flag, 1},
{"no-flow-control", no_argument, 0, 'f'}, {"no-flow-control", no_argument, nullptr, 'f'},
{0, 0, 0, 0 } {nullptr, 0, nullptr, 0}
}; };
int option_index = 0; int option_index = 0;
int c = getopt_long(argc, argv, "DVd:fhv", long_options, &option_index); int c = getopt_long(argc, argv, "DVd:fhv", long_options, &option_index);

View File

@ -619,17 +619,17 @@ int main(int argc, char **argv)
while(1) { while(1) {
int flag; int flag;
static option long_options[] = { static option long_options[] = {
{"daemon", no_argument, 0, 'D' }, {"daemon", no_argument, nullptr, 'D'},
{"log-level", required_argument, 0, 'L' }, {"log-level", required_argument, nullptr, 'L'},
{"backend", required_argument, 0, 'b' }, {"backend", required_argument, nullptr, 'b'},
{"spdy-max-concurrent-streams", required_argument, 0, 'c' }, {"spdy-max-concurrent-streams", required_argument, nullptr, 'c'},
{"frontend", required_argument, 0, 'f' }, {"frontend", required_argument, nullptr, 'f'},
{"help", no_argument, 0, 'h' }, {"help", no_argument, nullptr, 'h'},
{"insecure", no_argument, 0, 'k' }, {"insecure", no_argument, nullptr, 'k'},
{"workers", required_argument, 0, 'n' }, {"workers", required_argument, nullptr, 'n'},
{"client-proxy", no_argument, 0, 'p' }, {"client-proxy", no_argument, nullptr, 'p'},
{"spdy-proxy", no_argument, 0, 's' }, {"spdy-proxy", no_argument, nullptr, 's'},
{"version", no_argument, 0, 'v' }, {"version", no_argument, nullptr, 'v'},
{"add-x-forwarded-for", no_argument, &flag, 1}, {"add-x-forwarded-for", no_argument, &flag, 1},
{"frontend-spdy-read-timeout", required_argument, &flag, 2}, {"frontend-spdy-read-timeout", required_argument, &flag, 2},
{"frontend-read-timeout", required_argument, &flag, 3}, {"frontend-read-timeout", required_argument, &flag, 3},
@ -660,7 +660,7 @@ int main(int argc, char **argv)
{"frontend-no-tls", no_argument, &flag, 29}, {"frontend-no-tls", no_argument, &flag, 29},
{"backend-tls-sni-field", required_argument, &flag, 31}, {"backend-tls-sni-field", required_argument, &flag, 31},
{"honor-cipher-order", no_argument, &flag, 32}, {"honor-cipher-order", no_argument, &flag, 32},
{0, 0, 0, 0 } {nullptr, 0, nullptr, 0 }
}; };
int option_index = 0; int option_index = 0;
int c = getopt_long(argc, argv, "DL:b:c:f:hkn:psv", long_options, int c = getopt_long(argc, argv, "DL:b:c:f:hkn:psv", long_options,