clang-tidy: fix wrong identation
Found with readability-misleading-indentation Signed-off-by: Rosen Penev <rosenp@gmail.com>pull/250/head
parent
17a5fe6022
commit
d5320d554e
|
|
@ -486,7 +486,8 @@ int main(int argc, char *argv[])
|
||||||
break;
|
break;
|
||||||
case 'p':
|
case 'p':
|
||||||
#ifdef _GNU_SOURCE
|
#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)");
|
err(1, "asprintf(program invocation name)");
|
||||||
#else
|
#else
|
||||||
err(0, "compile with -D_GNU_SOURCE to use -p");
|
err(0, "compile with -D_GNU_SOURCE to use -p");
|
||||||
|
|
@ -497,6 +498,7 @@ int main(int argc, char *argv[])
|
||||||
exit(1);
|
exit(1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (argv[optind])
|
if (argv[optind])
|
||||||
s.name = strtoull(argv[optind++], 0, 16);
|
s.name = strtoull(argv[optind++], 0, 16);
|
||||||
if (argv[optind])
|
if (argv[optind])
|
||||||
|
|
|
||||||
|
|
@ -608,8 +608,10 @@ static int j1939cat_parse_args(struct j1939cat_priv *priv, int argc, char *argv[
|
||||||
case 's':
|
case 's':
|
||||||
priv->max_transfer = strtoul(optarg, NULL, 0);
|
priv->max_transfer = strtoul(optarg, NULL, 0);
|
||||||
if (priv->max_transfer > J1939_MAX_ETP_PACKET_SIZE)
|
if (priv->max_transfer > J1939_MAX_ETP_PACKET_SIZE)
|
||||||
err(EXIT_FAILURE, "used value (%zu) is bigger then allowed maximal size: %u.\n",
|
err(EXIT_FAILURE,
|
||||||
priv->max_transfer, J1939_MAX_ETP_PACKET_SIZE);
|
"used value (%zu) is bigger then allowed maximal size: %u.\n",
|
||||||
|
priv->max_transfer,
|
||||||
|
J1939_MAX_ETP_PACKET_SIZE);
|
||||||
break;
|
break;
|
||||||
case 'r':
|
case 'r':
|
||||||
priv->todo_recv = 1;
|
priv->todo_recv = 1;
|
||||||
|
|
@ -626,7 +628,8 @@ static int j1939cat_parse_args(struct j1939cat_priv *priv, int argc, char *argv[
|
||||||
case 'R':
|
case 'R':
|
||||||
priv->repeat = strtoul(optarg, NULL, 0);
|
priv->repeat = strtoul(optarg, NULL, 0);
|
||||||
if (priv->repeat < 1)
|
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;
|
break;
|
||||||
case 'B':
|
case 'B':
|
||||||
priv->todo_broadcast = 1;
|
priv->todo_broadcast = 1;
|
||||||
|
|
|
||||||
|
|
@ -120,7 +120,8 @@ int main(int argc, char **argv)
|
||||||
case 't':
|
case 't':
|
||||||
if (optarg) {
|
if (optarg) {
|
||||||
if (!strchr("adzA", optarg[0]))
|
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];
|
s.time = optarg[0];
|
||||||
} else {
|
} else {
|
||||||
s.time = 'z';
|
s.time = 'z';
|
||||||
|
|
@ -131,6 +132,7 @@ int main(int argc, char **argv)
|
||||||
exit(1);
|
exit(1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (argv[optind]) {
|
if (argv[optind]) {
|
||||||
optarg = argv[optind];
|
optarg = argv[optind];
|
||||||
ret = libj1939_str2addr(optarg, 0, &s.addr);
|
ret = libj1939_str2addr(optarg, 0, &s.addr);
|
||||||
|
|
|
||||||
|
|
@ -108,7 +108,8 @@ int main(int argc, char *argv[])
|
||||||
case 's':
|
case 's':
|
||||||
todo_send = strtoul(optarg ?: "8", NULL, 0);
|
todo_send = strtoul(optarg ?: "8", NULL, 0);
|
||||||
if (todo_send > sizeof(dat))
|
if (todo_send > sizeof(dat))
|
||||||
err(1, "Unsupported size. max: %zu", sizeof(dat));
|
err(1, "Unsupported size. max: %zu",
|
||||||
|
sizeof(dat));
|
||||||
break;
|
break;
|
||||||
case 'r':
|
case 'r':
|
||||||
todo_recv = 1;
|
todo_recv = 1;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue