summaryrefslogtreecommitdiff
path: root/fs/xfs/libxfs/xfs_da_format.h
diff options
context:
space:
mode:
authorCarlos Maiolino <cmaiolino@redhat.com>2020-09-04 19:51:39 +0300
committerDarrick J. Wong <darrick.wong@oracle.com>2020-09-16 06:52:42 +0300
commitc418dbc9805dbd215586454f0c5729333219aa63 (patch)
treef537a8358e0bd4aff6a5de20a78f9bce3b6c4f46 /fs/xfs/libxfs/xfs_da_format.h
parent47e6cc100054c8c6b809e25c286a2fd82e82bcb7 (diff)
downloadlinux-c418dbc9805dbd215586454f0c5729333219aa63.tar.xz
xfs: Use variable-size array for nameval in xfs_attr_sf_entry
nameval is a variable-size array, so, define it as it, and remove all the -1 magic number subtractions Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/xfs/libxfs/xfs_da_format.h')
-rw-r--r--fs/xfs/libxfs/xfs_da_format.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/libxfs/xfs_da_format.h b/fs/xfs/libxfs/xfs_da_format.h
index e708b714bf99..b40a4e80f5ee 100644
--- a/fs/xfs/libxfs/xfs_da_format.h
+++ b/fs/xfs/libxfs/xfs_da_format.h
@@ -589,7 +589,7 @@ struct xfs_attr_shortform {
uint8_t namelen; /* actual length of name (no NULL) */
uint8_t valuelen; /* actual length of value (no NULL) */
uint8_t flags; /* flags bits (see xfs_attr_leaf.h) */
- uint8_t nameval[1]; /* name & value bytes concatenated */
+ uint8_t nameval[]; /* name & value bytes concatenated */
} list[1]; /* variable sized array */
};