Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

apparmor: make all generated string array headers const char *const

address_family_names and sock_type_names were created as const char *a[],
which declares them as (non-const) pointers to const chars. Since the
pointers themselves would not be changed, they should be generated as
const char *const a[].

Signed-off-by: Ryan Lee <ryan.lee@canonical.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>

authored by

Ryan Lee and committed by
John Johansen
95ff1189 a88db916

+2 -2
+2 -2
security/apparmor/Makefile
··· 28 28 # to 29 29 # #define AA_SFS_AF_MASK "local inet" 30 30 quiet_cmd_make-af = GEN $@ 31 - cmd_make-af = echo "static const char *address_family_names[] = {" > $@ ;\ 31 + cmd_make-af = echo "static const char *const address_family_names[] = {" > $@ ;\ 32 32 sed $< >>$@ -r -n -e "/AF_MAX/d" -e "/AF_LOCAL/d" -e "/AF_ROUTE/d" -e \ 33 33 's/^\#define[ \t]+AF_([A-Z0-9_]+)[ \t]+([0-9]+)(.*)/[\2] = "\L\1",/p';\ 34 34 echo "};" >> $@ ;\ ··· 43 43 # to 44 44 # [1] = "stream", 45 45 quiet_cmd_make-sock = GEN $@ 46 - cmd_make-sock = echo "static const char *sock_type_names[] = {" >> $@ ;\ 46 + cmd_make-sock = echo "static const char *const sock_type_names[] = {" >> $@ ;\ 47 47 sed $^ >>$@ -r -n \ 48 48 -e 's/^\tSOCK_([A-Z0-9_]+)[\t]+=[ \t]+([0-9]+)(.*)/[\2] = "\L\1",/p';\ 49 49 echo "};" >> $@