提交 f0132c4e 编写于 作者: Y Yaowei Bai 提交者: Steven Rostedt

kernel/trace_probe: is_good_name can be boolean

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.

No functional change.

Link: http://lkml.kernel.org/r/1442929393-4753-2-git-send-email-bywxiaobai@163.comSigned-off-by: NYaowei Bai <bywxiaobai@163.com>
Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
上级 1f93e4a9
...@@ -302,15 +302,15 @@ static nokprobe_inline void call_fetch(struct fetch_param *fprm, ...@@ -302,15 +302,15 @@ static nokprobe_inline void call_fetch(struct fetch_param *fprm,
} }
/* Check the name is good for event/group/fields */ /* 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 != '_') if (!isalpha(*name) && *name != '_')
return 0; return false;
while (*++name != '\0') { while (*++name != '\0') {
if (!isalpha(*name) && !isdigit(*name) && *name != '_') if (!isalpha(*name) && !isdigit(*name) && *name != '_')
return 0; return false;
} }
return 1; return true;
} }
static inline struct event_file_link * static inline struct event_file_link *
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册