summaryrefslogtreecommitdiff
path: root/fs/ntfs/attrib.c
diff options
context:
space:
mode:
authorAnton Altaparmakov <aia21@cantab.net>2005-05-27 19:42:56 +0400
committerAnton Altaparmakov <aia21@cantab.net>2005-05-27 19:42:56 +0400
commit442d207eb0b4e7047c4fedccd900c425e689d502 (patch)
tree2c23dc98fba6912417164ba65b258a9da1241ae1 /fs/ntfs/attrib.c
parent2fb21db2548fc8b196eb8d8425f05ee1965d5344 (diff)
downloadlinux-442d207eb0b4e7047c4fedccd900c425e689d502.tar.xz
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.c17
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,
static inline void ntfs_attr_init_search_ctx(ntfs_attr_search_ctx *ctx,
ntfs_inode *ni, MFT_RECORD *mrec)
{
- ctx->mrec = mrec;
- /* Sanity checks are performed elsewhere. */
- ctx->attr = (ATTR_RECORD*)((u8*)mrec + le16_to_cpu(mrec->attrs_offset));
- ctx->is_first = TRUE;
- ctx->ntfs_ino = ni;
- ctx->al_entry = NULL;
- ctx->base_ntfs_ino = NULL;
- ctx->base_mrec = NULL;
- ctx->base_attr = NULL;
+ *ctx = (ntfs_attr_search_ctx) {
+ .mrec = mrec,
+ /* Sanity checks are performed elsewhere. */
+ .attr = (ATTR_RECORD*)((u8*)mrec +
+ le16_to_cpu(mrec->attrs_offset)),
+ .is_first = TRUE,
+ .ntfs_ino = ni,
+ };
}
/**