diff options
| author | Jon Maloy <jmaloy@redhat.com> | 2026-11-19 20:32:48 -0500 |
|---|---|---|
| committer | Stefano Brivio <sbrivio@redhat.com> | 2026-11-22 22:06:26 +0100 |
| commit | 094211f421e47fb9d72430b228a0ab4a5b1cdb9d (patch) | |
| tree | 1fb74338809225b6d9fad80a0d4771ab69522735 | |
| parent | 16bf5c49fa8706613318ac17ea7b5682a6e2cf41 (diff) | |
| download | passt-094211f421e47fb9d72430b228a0ab4a5b1cdb9d.tar passt-094211f421e47fb9d72430b228a0ab4a5b1cdb9d.tar.gz passt-094211f421e47fb9d72430b228a0ab4a5b1cdb9d.tar.bz2 passt-094211f421e47fb9d72430b228a0ab4a5b1cdb9d.tar.lz passt-094211f421e47fb9d72430b228a0ab4a5b1cdb9d.tar.xz passt-094211f421e47fb9d72430b228a0ab4a5b1cdb9d.tar.zst passt-094211f421e47fb9d72430b228a0ab4a5b1cdb9d.zip | |
passt-repair: Drop redundant parentheses around stat() calls
clang-tidy 23.1.5 reports:
passt-repair.c:122:6: error: redundant parentheses around expression
[readability-redundant-parentheses,-warnings-as-errors]
122 | if ((stat(a->sun_path, sb))) {
and the same for the stat() call in main(). There's no assignment in
those conditions, so the extra parentheses are pointless. Drop them.
Signed-off-by: Jon Maloy <jmaloy@redhat.com>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
| -rw-r--r-- | passt-repair.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/passt-repair.c b/passt-repair.c index 3958c3a..2a14743 100644 --- a/passt-repair.c +++ b/passt-repair.c @@ -119,7 +119,7 @@ static int wait_for_socket(struct sockaddr_un *a, const char *dir, ret = snprintf(a->sun_path, sizeof(a->sun_path), "%s/%s", dir, ev->name); - if ((stat(a->sun_path, sb))) { + if (stat(a->sun_path, sb)) { FPRINTF(stderr, "Can't stat() %s: %i\n", a->sun_path, errno); _exit(1); } @@ -186,7 +186,7 @@ int main(int argc, char **argv) _exit(1); } - if ((stat(argv[1], &sb))) { + if (stat(argv[1], &sb)) { FPRINTF(stderr, "Can't stat() %s: %i\n", argv[1], errno); _exit(1); } |
