Skip to content

Commit

Permalink
(squash) checkpatch: make static array constant
Browse files Browse the repository at this point in the history
Fix the following checkpatch warning:

  WARNING: static char array declaration should probably be static const char
  torvalds#340: FILE: lib/livepatch/test_klp_convert_mod_b.c:9:
  +static char homonym_string[] = "homonym string B";

Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com>
  • Loading branch information
joe-lawrence committed Nov 24, 2021
1 parent dd6ef9a commit 48f164a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/livepatch/test_klp_convert_mod_b.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
* symbols, forcing a livepatch to use sympos annotations.
*/

static char homonym_string[] = "homonym string B";
__used static char *get_homonym_string(void)
static const char homonym_string[] = "homonym string B";
__used static const char *get_homonym_string(void)
{
return homonym_string;
}
Expand Down

0 comments on commit 48f164a

Please sign in to comment.