summaryrefslogtreecommitdiffstats
path: root/fs/gfs2/eaops.c
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2006-09-05 13:15:18 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2006-09-05 13:15:18 -0400
commitcca195c5c09b81065018dee39f4013b95bf47502 (patch)
treeac59252852a0b488824645433b8c2017c882e4b3 /fs/gfs2/eaops.c
parent16910427e1eb2a8069708ee24406d2d465381ebd (diff)
downloadop-kernel-dev-cca195c5c09b81065018dee39f4013b95bf47502.zip
op-kernel-dev-cca195c5c09b81065018dee39f4013b95bf47502.tar.gz
[GFS2] Extended attribute code style changes
As per Jan Engelhardt's request and also a few of my own. It has been possible to add a few most const to the code as a result of the change in gfs2_ea_name2type. Cc: Jan Engelhardt <jengelh@linux01.gwdg.de> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
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