Whamcloud - gitweb
LU-6210 mdd: Change positional struct initializers to C99 47/23747/3
authorSteve Guminski <stephenx.guminski@intel.com>
Mon, 9 Jan 2017 13:33:13 +0000 (08:33 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 1 Mar 2017 05:11:10 +0000 (05:11 +0000)
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 <stephenx.guminski@intel.com>
Change-Id: I390a67c9c7182ca1e1aee7aa926e7d2509f73cbf
Reviewed-on: https://review.whamcloud.com/23747
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/mdd/mdd_dir.c

index 4dbb755..b37c795 100644 (file)
@@ -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