Skip to content

Commit

Permalink
kernel/profile.c: use static const char instead of static char
Browse files Browse the repository at this point in the history
schedstr, sleepstr and kvmstr are only used in strcmp & strlen

Signed-off-by: Fabian Frederick <[email protected]>
Cc: Paul Gortmaker <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Fabian Frederick authored and torvalds committed Jun 6, 2014
1 parent aba871f commit f3da64d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions kernel/profile.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ static DEFINE_MUTEX(profile_flip_mutex);

int profile_setup(char *str)
{
static char schedstr[] = "schedule";
static char sleepstr[] = "sleep";
static char kvmstr[] = "kvm";
static const char schedstr[] = "schedule";
static const char sleepstr[] = "sleep";
static const char kvmstr[] = "kvm";
int par;

if (!strncmp(str, sleepstr, strlen(sleepstr))) {
Expand Down

0 comments on commit f3da64d

Please sign in to comment.