From 37cef588d339191f4ed0b8f1f11822f0231dcd78 Mon Sep 17 00:00:00 2001 From: Steve Guminski Date: Mon, 9 Jan 2017 08:33:13 -0500 Subject: [PATCH] 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 --- lustre/mdd/mdd_dir.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 -- 1.8.3.1