提交 f3da64d1 编写于 作者: F Fabian Frederick 提交者: Linus Torvalds

kernel/profile.c: use static const char instead of static char

schedstr, sleepstr and kvmstr are only used in strcmp & strlen
Signed-off-by: NFabian Frederick <fabf@skynet.be>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 aba871f1
...@@ -52,9 +52,9 @@ static DEFINE_MUTEX(profile_flip_mutex); ...@@ -52,9 +52,9 @@ static DEFINE_MUTEX(profile_flip_mutex);
int profile_setup(char *str) int profile_setup(char *str)
{ {
static char schedstr[] = "schedule"; static const char schedstr[] = "schedule";
static char sleepstr[] = "sleep"; static const char sleepstr[] = "sleep";
static char kvmstr[] = "kvm"; static const char kvmstr[] = "kvm";
int par; int par;
if (!strncmp(str, sleepstr, strlen(sleepstr))) { if (!strncmp(str, sleepstr, strlen(sleepstr))) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册