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".
Showing the changes to include/uapi/linux (1 of 9 files). Show all
Unified · Split
| @@ -16,7 +16,7 @@ struct reiserfs_xattr_header { · 15 unmodified lines | |||
| 16 | }; | 16 | }; |
| 17 | 17 | ||
| 18 | struct reiserfs_security_handle { | 18 | struct reiserfs_security_handle { |
| 19 | char *name; | 19 | const char *name; |
| 20 | void *value; | 20 | void *value; |
| 21 | size_t length; | 21 | size_t length; |
| 22 | }; | 22 | }; |