diff options
Diffstat (limited to 'fs/gfs2/eaops.c')
-rw-r--r-- | fs/gfs2/eaops.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/gfs2/eaops.c b/fs/gfs2/eaops.c index 3b8749c22731..adb898ceaa18 100644 --- a/fs/gfs2/eaops.c +++ b/fs/gfs2/eaops.c | |||
@@ -31,22 +31,22 @@ | |||
31 | * Returns: GFS2_EATYPE_XXX | 31 | * Returns: GFS2_EATYPE_XXX |
32 | */ | 32 | */ |
33 | 33 | ||
34 | unsigned int gfs2_ea_name2type(const char *name, char **truncated_name) | 34 | unsigned int gfs2_ea_name2type(const char *name, const char **truncated_name) |
35 | { | 35 | { |
36 | unsigned int type; | 36 | unsigned int type; |
37 | 37 | ||
38 | if (strncmp(name, "system.", 7) == 0) { | 38 | if (strncmp(name, "system.", 7) == 0) { |
39 | type = GFS2_EATYPE_SYS; | 39 | type = GFS2_EATYPE_SYS; |
40 | if (truncated_name) | 40 | if (truncated_name) |
41 | *truncated_name = strchr(name, '.') + 1; | 41 | *truncated_name = name + sizeof("system.") - 1; |
42 | } else if (strncmp(name, "user.", 5) == 0) { | 42 | } else if (strncmp(name, "user.", 5) == 0) { |
43 | type = GFS2_EATYPE_USR; | 43 | type = GFS2_EATYPE_USR; |
44 | if (truncated_name) | 44 | if (truncated_name) |
45 | *truncated_name = strchr(name, '.') + 1; | 45 | *truncated_name = name + sizeof("user.") - 1; |
46 | } else if (strncmp(name, "security.", 9) == 0) { | 46 | } else if (strncmp(name, "security.", 9) == 0) { |
47 | type = GFS2_EATYPE_SECURITY; | 47 | type = GFS2_EATYPE_SECURITY; |
48 | if (truncated_name) | 48 | if (truncated_name) |
49 | *truncated_name = strchr(name, '.') + 1; | 49 | *truncated_name = name + sizeof("security.") - 1; |
50 | } else { | 50 | } else { |
51 | type = GFS2_EATYPE_UNUSED; | 51 | type = GFS2_EATYPE_UNUSED; |
52 | if (truncated_name) | 52 | if (truncated_name) |