From: Steve Guminski Date: Mon, 9 Jan 2017 13:33:13 +0000 (-0500) Subject: LU-6210 mdd: Change positional struct initializers to C99 X-Git-Tag: 2.9.54~28 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=refs%2Fchanges%2F47%2F23747%2F3;p=fs%2Flustre-release.git LU-6210 mdd: Change positional struct initializers to C99 This patch makes no functional changes. Struct initializers in the mdd directory that use C89 or GCC-only syntax are updated to C99 syntax. The C99 syntax prevents incorrect initialization if values are accidently placed in the wrong position, allows changes in the struct definition, and clears any members that are not given an explicit value. The following struct initializer has been updated: lustre/mdd/mdd_dir.c: static struct lu_name lname_dotdot Test-Parameters: trivial Signed-off-by: Steve Guminski Change-Id: I390a67c9c7182ca1e1aee7aa926e7d2509f73cbf Reviewed-on: https://review.whamcloud.com/23747 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: James Simmons Reviewed-by: Dmitry Eremin Reviewed-by: Oleg Drokin --- diff --git a/lustre/mdd/mdd_dir.c b/lustre/mdd/mdd_dir.c index 4dbb755..b37c795 100644 --- a/lustre/mdd/mdd_dir.c +++ b/lustre/mdd/mdd_dir.c @@ -49,8 +49,8 @@ static const char dot[] = "."; static const char dotdot[] = ".."; static struct lu_name lname_dotdot = { - (char *) dotdot, - sizeof(dotdot) - 1 + .ln_name = (char *) dotdot, + .ln_namelen = sizeof(dotdot) - 1, }; static inline int