Download raw body.
[PATCH] usr.bin/true,false: Remove redundant return parens
On Mon, Mar 31, 2025 at 04:29:41PM +0200, Koli Jak wrote:
> Problem: Redundant parentheses in return statements.
> Solution: Remove them for KNF consistency.
>
> (No functional changes; tested on OpenBSD -current.)
This is a common syntax throughout the OpenBSD source tree.
I see no point in this.
> diff --git a/usr.bin/false/false.c b/usr.bin/false/false.c
> index 240f4bd42dd..559b702738e 100644
> --- a/usr.bin/false/false.c
> +++ b/usr.bin/false/false.c
> @@ -5,5 +5,5 @@
> int
> main(int argc, char *argv[])
> {
> - return (1);
> + return 1;
> }
> diff --git a/usr.bin/true/true.c b/usr.bin/true/true.c
> index a27b589e820..9967b3ab5d1 100644
> --- a/usr.bin/true/true.c
> +++ b/usr.bin/true/true.c
> @@ -5,5 +5,5 @@
> int
> main(int argc, char *argv[])
> {
> - return (0);
> + return 0;
> }
--
:wq Claudio
[PATCH] usr.bin/true,false: Remove redundant return parens