clang-tidy: fix wrong identation

Found with readability-misleading-indentation

Signed-off-by: Rosen Penev <rosenp@gmail.com>
pull/250/head
Rosen Penev 2020-10-12 00:26:08 -07:00
parent 17a5fe6022
commit d5320d554e
No known key found for this signature in database
GPG Key ID: 36D31CFA845F0E3B
5 changed files with 159 additions and 151 deletions

View File

@ -486,7 +486,8 @@ int main(int argc, char *argv[])
break;
case 'p':
#ifdef _GNU_SOURCE
if (asprintf(&program_invocation_name, "%s.%s", program_invocation_short_name, optarg) < 0)
if (asprintf(&program_invocation_name, "%s.%s",
program_invocation_short_name, optarg) < 0)
err(1, "asprintf(program invocation name)");
#else
err(0, "compile with -D_GNU_SOURCE to use -p");
@ -497,6 +498,7 @@ int main(int argc, char *argv[])
exit(1);
break;
}
if (argv[optind])
s.name = strtoull(argv[optind++], 0, 16);
if (argv[optind])

View File

@ -608,8 +608,10 @@ static int j1939cat_parse_args(struct j1939cat_priv *priv, int argc, char *argv[
case 's':
priv->max_transfer = strtoul(optarg, NULL, 0);
if (priv->max_transfer > J1939_MAX_ETP_PACKET_SIZE)
err(EXIT_FAILURE, "used value (%zu) is bigger then allowed maximal size: %u.\n",
priv->max_transfer, J1939_MAX_ETP_PACKET_SIZE);
err(EXIT_FAILURE,
"used value (%zu) is bigger then allowed maximal size: %u.\n",
priv->max_transfer,
J1939_MAX_ETP_PACKET_SIZE);
break;
case 'r':
priv->todo_recv = 1;
@ -626,7 +628,8 @@ static int j1939cat_parse_args(struct j1939cat_priv *priv, int argc, char *argv[
case 'R':
priv->repeat = strtoul(optarg, NULL, 0);
if (priv->repeat < 1)
err(EXIT_FAILURE, "send/repeat count can't be less then 1\n");
err(EXIT_FAILURE,
"send/repeat count can't be less then 1\n");
break;
case 'B':
priv->todo_broadcast = 1;

View File

@ -120,7 +120,8 @@ int main(int argc, char **argv)
case 't':
if (optarg) {
if (!strchr("adzA", optarg[0]))
err(1, "unknown time option '%c'", optarg[0]);
err(1, "unknown time option '%c'",
optarg[0]);
s.time = optarg[0];
} else {
s.time = 'z';
@ -131,6 +132,7 @@ int main(int argc, char **argv)
exit(1);
break;
}
if (argv[optind]) {
optarg = argv[optind];
ret = libj1939_str2addr(optarg, 0, &s.addr);

View File

@ -108,7 +108,8 @@ int main(int argc, char *argv[])
case 's':
todo_send = strtoul(optarg ?: "8", NULL, 0);
if (todo_send > sizeof(dat))
err(1, "Unsupported size. max: %zu", sizeof(dat));
err(1, "Unsupported size. max: %zu",
sizeof(dat));
break;
case 'r':
todo_recv = 1;