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] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 22 Sep 2015 09:59:42 -0400
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Yaowei Bai <bywxiaobai@....com>
Cc:	mingo@...hat.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] kernel/trace_probe: is_good_name can be boolean

On Tue, 22 Sep 2015 21:43:13 +0800
Yaowei Bai <bywxiaobai@....com> wrote:

> This patch makes is_good_name return bool to improve readability
> due to this particular function only using either one or zero as its
> return value.

This patch makes sense. I'll take it. Thanks!

-- Steve

> 
> No functional change.
> 
> Signed-off-by: Yaowei Bai <bywxiaobai@....com>
> ---
>  kernel/trace/trace_probe.h | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/kernel/trace/trace_probe.h b/kernel/trace/trace_probe.h
> index b98dee9..f6398db 100644
> --- a/kernel/trace/trace_probe.h
> +++ b/kernel/trace/trace_probe.h
> @@ -302,15 +302,15 @@ static nokprobe_inline void call_fetch(struct fetch_param *fprm,
>  }
>  
>  /* Check the name is good for event/group/fields */
> -static inline int is_good_name(const char *name)
> +static inline bool is_good_name(const char *name)
>  {
>  	if (!isalpha(*name) && *name != '_')
> -		return 0;
> +		return false;
>  	while (*++name != '\0') {
>  		if (!isalpha(*name) && !isdigit(*name) && *name != '_')
> -			return 0;
> +			return false;
>  	}
> -	return 1;
> +	return true;
>  }
>  
>  static inline struct event_file_link *

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ