lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <10a36c82-3c74-4fc3-abce-b2fe81956d37@linuxfoundation.org>
Date: Wed, 10 Jul 2024 09:47:31 -0600
From: Shuah Khan <skhan@...uxfoundation.org>
To: Zhu Jun <zhujun2@...s.chinamobile.com>, shuah@...nel.org
Cc: angquan21@...il.com, linux-kselftest@...r.kernel.org,
 linux-kernel@...r.kernel.org, Shuah Khan <skhan@...uxfoundation.org>
Subject: Re: [PATCH v2] selftests/breakpoints:Add return value in main
 function

On 7/9/24 20:16, Zhu Jun wrote:
> Main function return value is int type, so add return
> value in the end that this problem was discovered by reading the code
> 
> Signed-off-by: Zhu Jun <zhujun2@...s.chinamobile.com>
> ---
> Changes in v2:
>   - modify commit info
> 
>   tools/testing/selftests/breakpoints/step_after_suspend_test.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/breakpoints/step_after_suspend_test.c b/tools/testing/selftests/breakpoints/step_after_suspend_test.c
> index dfec31fb9b30..b473131fce3e 100644
> --- a/tools/testing/selftests/breakpoints/step_after_suspend_test.c
> +++ b/tools/testing/selftests/breakpoints/step_after_suspend_test.c
> @@ -166,7 +166,7 @@ int main(int argc, char **argv)
>   	bool succeeded = true;
>   	unsigned int tests = 0;
>   	cpu_set_t available_cpus;
> -	int err;
> +	int err = 0;
>   	int cpu;
>   
>   	ksft_print_header();
> @@ -222,4 +222,6 @@ int main(int argc, char **argv)
>   		ksft_exit_pass();
>   	else
>   		ksft_exit_fail();
> +
> +	return err;
>   }

Unless this is causing a compile error or warning - there is
no need to make this change.

thanks,
-- Shuah

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ