mirror of
git://git.code.sf.net/p/dhcpd-pools/code
synced 2025-12-18 00:37:01 +00:00
all files: re-indent
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
parent
1875a13733
commit
7cd381ed83
6 changed files with 69 additions and 67 deletions
|
|
@ -155,7 +155,6 @@ int main(int argc, char **argv)
|
|||
atexit(close_stdout);
|
||||
set_program_name(argv[0]);
|
||||
|
||||
|
||||
prepare_memory(&state);
|
||||
set_ipv_functions(&state, IPvUNKNOWN);
|
||||
/* Parse command line options */
|
||||
|
|
@ -179,24 +178,25 @@ int main(int argc, char **argv)
|
|||
output_format = optarg[0];
|
||||
break;
|
||||
case 's':
|
||||
{
|
||||
/* Output sorting option */
|
||||
struct output_sort *p = state.sorts;
|
||||
size_t len;
|
||||
{
|
||||
/* Output sorting option */
|
||||
struct output_sort *p = state.sorts;
|
||||
size_t len;
|
||||
|
||||
while (p && p->next)
|
||||
p = p->next;
|
||||
for (len = 0; len < strlen(optarg); len++) {
|
||||
if (state.sorts == NULL) {
|
||||
state.sorts = xcalloc(1, sizeof(struct output_sort));
|
||||
p = state.sorts;
|
||||
} else {
|
||||
p->next = xcalloc(1, sizeof(struct output_sort));
|
||||
while (p && p->next)
|
||||
p = p->next;
|
||||
for (len = 0; len < strlen(optarg); len++) {
|
||||
if (state.sorts == NULL) {
|
||||
state.sorts =
|
||||
xcalloc(1, sizeof(struct output_sort));
|
||||
p = state.sorts;
|
||||
} else {
|
||||
p->next = xcalloc(1, sizeof(struct output_sort));
|
||||
p = p->next;
|
||||
}
|
||||
p->func = field_selector(optarg[len]);
|
||||
}
|
||||
p->func = field_selector(optarg[len]);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'r':
|
||||
/* What ever sort in reverse order */
|
||||
|
|
@ -250,7 +250,7 @@ int main(int argc, char **argv)
|
|||
state.minsize = strtod_or_err(optarg, "illegal argument");
|
||||
break;
|
||||
case OPT_SET_IPV:
|
||||
switch(optarg[0]) {
|
||||
switch (optarg[0]) {
|
||||
case '4':
|
||||
set_ipv_functions(&state, IPv4);
|
||||
break;
|
||||
|
|
@ -276,8 +276,7 @@ int main(int argc, char **argv)
|
|||
/* Print help */
|
||||
usage(EXIT_SUCCESS);
|
||||
default:
|
||||
error(EXIT_FAILURE, 0, "Try %s --help for more information.",
|
||||
program_name);
|
||||
error(EXIT_FAILURE, 0, "Try %s --help for more information.", program_name);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -294,13 +293,14 @@ int main(int argc, char **argv)
|
|||
state.header_limit = return_limit(default_limit[0]);
|
||||
state.number_limit = return_limit(default_limit[1]);
|
||||
}
|
||||
/* Output format is not defined, if alarm thresholds are then it's
|
||||
* alarming, else use the default. */
|
||||
/* Output format is not defined, if alarm thresholds are then it's alarming, else use the
|
||||
* default. */
|
||||
if (output_format == '\0') {
|
||||
if (alarming == 1)
|
||||
output_format = 'a';
|
||||
else {
|
||||
const char *const default_format = OUTPUT_FORMAT;
|
||||
|
||||
output_format = default_format[0];
|
||||
}
|
||||
}
|
||||
|
|
@ -321,4 +321,3 @@ int main(int argc, char **argv)
|
|||
clean_up(&state);
|
||||
return (ret_val);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue