style: format code (80 col)
This commit is contained in:
parent
3c493c685e
commit
297d38bff1
4 changed files with 9 additions and 5 deletions
|
|
@ -9,7 +9,8 @@ print_version(void)
|
|||
printf("Copyright (C) 2026 lohhiicccc\n");
|
||||
printf("License GPLv3+:");
|
||||
printf("GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>\n");
|
||||
printf("This is free software: you are free to change and redistribute it.\n");
|
||||
printf("This is free software: ");
|
||||
printf("you are free to change and redistribute it.\n");
|
||||
printf("There is NO WARRANTY, to the extent permitted by law.\n");
|
||||
printf("\n");
|
||||
#if PING_HAS_GIT_COMMIT
|
||||
|
|
|
|||
|
|
@ -19,7 +19,8 @@ cli_parse_destinations(int argc, char **argv, int first_arg,
|
|||
|
||||
for (int i = first_arg; i < argc; i++)
|
||||
{
|
||||
if (0 != cli_parse_inet_addr(argv[i], &config->destinations[i - first_arg]))
|
||||
if (0 != cli_parse_inet_addr(argv[i],
|
||||
&config->destinations[i - first_arg]))
|
||||
{
|
||||
free(config->destinations);
|
||||
config->destinations = NULL;
|
||||
|
|
|
|||
|
|
@ -36,8 +36,10 @@ print_loss_line(size_t sent, size_t ok_recv, size_t errors)
|
|||
printf("%zu packets transmitted, %zu packets received, +%zu errors,"
|
||||
" %d%% packet loss\n", sent, ok_recv, errors, loss_pct);
|
||||
else
|
||||
printf("%zu packets transmitted, %zu packets received, %d%% packet loss\n",
|
||||
sent, ok_recv, loss_pct);
|
||||
{
|
||||
printf("%zu packets transmitted, %zu packets received,", sent, ok_recv);
|
||||
printf(" %d%% packet loss\n", loss_pct);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ Test(cli_parse_inet_addr, valid_ip)
|
|||
Test(cli_parse_inet_addr, invalid_host)
|
||||
{
|
||||
struct destinations out = {0};
|
||||
int ret = cli_parse_inet_addr("not.a.real.host.invalid", &out);
|
||||
int ret = cli_parse_inet_addr("invalid.host.local", &out);
|
||||
|
||||
cr_assert_eq(ret, 1);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue