[Crash-utility] [PATCH] kernel: minor clean-up in read_in_kernel_config()
HAGIO KAZUHITO(萩尾 一仁)
k-hagio-ab at nec.com
Mon Dec 20 07:52:47 UTC 2021
-----Original Message-----
> The 'found' variable is 0 when declared and 'found' set to 1.
> Using 'TRUE' statement rather than '1' makes routine be more readable.
>
> Signed-off-by: Austin Kim <austindh.kim at gmail.com>
Thanks for the patch, but sorry, currently at least I am not interested
in fixing such a minor coding style, typos in comments, and etc. without
fixing a bug, in order to avoid merging a lot of patches.
Thanks,
Kazu
> ---
> kernel.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/kernel.c b/kernel.c
> index f4598ea..7935d91 100644
> --- a/kernel.c
> +++ b/kernel.c
> @@ -10423,7 +10423,7 @@ void
> read_in_kernel_config(int command)
> {
> struct syment *sp;
> - int ii, jj, ret, end, found=0;
> + int ii, jj, ret, end, found = FALSE;
> unsigned long size, bufsz;
> uint64_t magic;
> char *pos, *ln, *buf, *head, *tail, *val, *uncomp;
> @@ -10488,7 +10488,7 @@ again:
> while (tail < (buf + (size - 1))) {
>
> if (strncmp(tail, MAGIC_END, end)==0) {
> - found = 1;
> + found = TRUE;
> break;
> }
> tail++;
> --
> 2.20.1
>
> --
> Crash-utility mailing list
> Crash-utility at redhat.com
> https://listman.redhat.com/mailman/listinfo/crash-utility
More information about the Crash-utility
mailing list