summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYaowei Bai <bywxiaobai@163.com>2015-09-22 16:43:13 +0300
committerSteven Rostedt <rostedt@goodmis.org>2015-09-22 20:11:30 +0300
commitf0132c4e0d06046a324051c09bd094719b9216ac (patch)
tree0adbbf325b273be644f1f8001540611031f55462
parent1f93e4a96c9109378204c147b3eec0d0e8100fde (diff)
downloadlinux-f0132c4e0d06046a324051c09bd094719b9216ac.tar.xz
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.com Signed-off-by: Yaowei Bai <bywxiaobai@163.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-rw-r--r--kernel/trace/trace_probe.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/trace/trace_probe.h b/kernel/trace/trace_probe.h
index b98dee914542..f6398db09114 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 *