diff options
author | Anton Altaparmakov <aia21@cantab.net> | 2005-05-27 11:42:56 -0400 |
---|---|---|
committer | Anton Altaparmakov <aia21@cantab.net> | 2005-05-27 11:42:56 -0400 |
commit | 442d207eb0b4e7047c4fedccd900c425e689d502 (patch) | |
tree | 2c23dc98fba6912417164ba65b258a9da1241ae1 /fs/ntfs/attrib.c | |
parent | 2fb21db2548fc8b196eb8d8425f05ee1965d5344 (diff) |
NTFS: Use C99 style structure initialization after memory allocation where
possible (fs/ntfs/{attrib.c,index.c,super.c}). Thanks to Al Viro and
Pekka Enberg.
Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
Diffstat (limited to 'fs/ntfs/attrib.c')
-rw-r--r-- | fs/ntfs/attrib.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/fs/ntfs/attrib.c b/fs/ntfs/attrib.c index 23ca3bdfb89a..104eedfb2507 100644 --- a/fs/ntfs/attrib.c +++ b/fs/ntfs/attrib.c | |||
@@ -982,15 +982,14 @@ int ntfs_attr_lookup(const ATTR_TYPE type, const ntfschar *name, | |||
982 | static inline void ntfs_attr_init_search_ctx(ntfs_attr_search_ctx *ctx, | 982 | static inline void ntfs_attr_init_search_ctx(ntfs_attr_search_ctx *ctx, |
983 | ntfs_inode *ni, MFT_RECORD *mrec) | 983 | ntfs_inode *ni, MFT_RECORD *mrec) |
984 | { | 984 | { |
985 | ctx->mrec = mrec; | 985 | *ctx = (ntfs_attr_search_ctx) { |
986 | /* Sanity checks are performed elsewhere. */ | 986 | .mrec = mrec, |
987 | ctx->attr = (ATTR_RECORD*)((u8*)mrec + le16_to_cpu(mrec->attrs_offset)); | 987 | /* Sanity checks are performed elsewhere. */ |
988 | ctx->is_first = TRUE; | 988 | .attr = (ATTR_RECORD*)((u8*)mrec + |
989 | ctx->ntfs_ino = ni; | 989 | le16_to_cpu(mrec->attrs_offset)), |
990 | ctx->al_entry = NULL; | 990 | .is_first = TRUE, |
991 | ctx->base_ntfs_ino = NULL; | 991 | .ntfs_ino = ni, |
992 | ctx->base_mrec = NULL; | 992 | }; |
993 | ctx->base_attr = NULL; | ||
994 | } | 993 | } |
995 | 994 | ||
996 | /** | 995 | /** |