Whamcloud - gitweb
LU-6210 utils: Use C99 struct initializers in lfs_fid2path() 24/27524/2
authorSteve Guminski <stephenx.guminski@intel.com>
Fri, 14 Apr 2017 19:41:51 +0000 (15:41 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 19 Jul 2017 03:31:20 +0000 (03:31 +0000)
commit8f66e833b9042c8015bf7a5ce0dbe2fd8fb91af1
tree9fd154db2757287400f1ae4ca3de609b305984a1
parent0ff91d6ad8c71498e29f442119327e166f527281
LU-6210 utils: Use C99 struct initializers in lfs_fid2path()

This patch makes no functional changes.  Struct initializers that
use C89 or GCC-only syntax are updated to C99 syntax.  Variables of
type struct option are renamed to long_opts for consistency.

C89 positional initializers require values to be placed in the
correct order. This will cause errors if the fields of the struct
definition are reordered or fields are added or removed. C99 named
initializers avoid this problem, and also automatically clear any
values that are not explicitly set.

This patch updates lfs_fid2path() to use the C99 syntax.

Test-Parameters: trivial
Signed-off-by: Steve Guminski <stephenx.guminski@intel.com>
Change-Id: I65fb184a54aad142a87dd8f244e99a09a6482b71
Reviewed-on: https://review.whamcloud.com/27524
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
lustre/utils/lfs.c