diff options
| author | Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> | 2013-07-25 05:44:02 +0900 |
|---|---|---|
| committer | Moyster <oysterized@gmail.com> | 2019-07-06 12:00:41 +0200 |
| commit | 35e3f05d39c3bd0e4d96410ac6a996b5657da15c (patch) | |
| tree | cfbb2557e502103bb46676f947691acbbef9babc /include/linux/xattr.h | |
| parent | 3025d5eb549110beca11ed40de9215d0e696d72f (diff) | |
xattr: Constify ->name member of "struct xattr".
Since everybody sets kstrdup()ed constant string to "struct xattr"->name but
nobody modifies "struct xattr"->name , we can omit kstrdup() and its failure
checking by constifying ->name member of "struct xattr".
Change-Id: I84a47af13e3c77b394218cc12ac8901d87b0fd69
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Reviewed-by: Joel Becker <jlbec@evilplan.org> [ocfs2]
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Casey Schaufler <casey@schaufler-ca.com>
Acked-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
Reviewed-by: Paul Moore <paul@paul-moore.com>
Tested-by: Paul Moore <paul@paul-moore.com>
Acked-by: Eric Paris <eparis@redhat.com>
Signed-off-by: James Morris <james.l.morris@oracle.com>
Diffstat (limited to 'include/linux/xattr.h')
| -rw-r--r-- | include/linux/xattr.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/xattr.h b/include/linux/xattr.h index fdbafc684..91b0a68d3 100644 --- a/include/linux/xattr.h +++ b/include/linux/xattr.h @@ -31,7 +31,7 @@ struct xattr_handler { }; struct xattr { - char *name; + const char *name; void *value; size_t value_len; }; |
