summaryrefslogtreecommitdiffstats
path: root/fs/gfs2/eaops.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/gfs2/eaops.c')
-rw-r--r--fs/gfs2/eaops.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/gfs2/eaops.c b/fs/gfs2/eaops.c
index 3b8749c..adb898c 100644
--- a/fs/gfs2/eaops.c
+++ b/fs/gfs2/eaops.c
@@ -31,22 +31,22 @@
* Returns: GFS2_EATYPE_XXX
*/
-unsigned int gfs2_ea_name2type(const char *name, char **truncated_name)
+unsigned int gfs2_ea_name2type(const char *name, const char **truncated_name)
{
unsigned int type;
if (strncmp(name, "system.", 7) == 0) {
type = GFS2_EATYPE_SYS;
if (truncated_name)
- *truncated_name = strchr(name, '.') + 1;
+ *truncated_name = name + sizeof("system.") - 1;
} else if (strncmp(name, "user.", 5) == 0) {
type = GFS2_EATYPE_USR;
if (truncated_name)
- *truncated_name = strchr(name, '.') + 1;
+ *truncated_name = name + sizeof("user.") - 1;
} else if (strncmp(name, "security.", 9) == 0) {
type = GFS2_EATYPE_SECURITY;
if (truncated_name)
- *truncated_name = strchr(name, '.') + 1;
+ *truncated_name = name + sizeof("security.") - 1;
} else {
type = GFS2_EATYPE_UNUSED;
if (truncated_name)
OpenPOWER on IntegriCloud