This patch makes no functional changes. Struct initializers in the
mgs directory that use C89 or GCC-only syntax are updated to C99
syntax. Whitespace is corrected to match the coding style guidelines.
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 initializers have been updated:
lustre/mgs/mgs_handler.c:
struct lustre_handle lockh
struct lustre_handle conn
lustre/mgs/mgs_llog.c:
struct mgs_fsdb_handler_data d
Test-Parameters: trivial
Signed-off-by: Steve Guminski <stephenx.guminski@intel.com>
Change-Id: I36cbeaae50982b6f72d271997b229c46d085a6ee
Reviewed-on: https://review.whamcloud.com/23794
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
void mgs_revoke_lock(struct mgs_device *mgs, struct fs_db *fsdb, int type)
{
ldlm_completion_callback cp = NULL;
- struct lustre_handle lockh = { 0 };
+ struct lustre_handle lockh = {
+ .cookie = 0,
+ };
struct ldlm_res_id res_id;
__u64 flags = LDLM_FL_ATOMIC_CB;
int rc;
struct obd_connect_data *data, void *localdata)
{
struct obd_export *lexp;
- struct lustre_handle conn = { 0 };
+ struct lustre_handle conn = {
+ .cookie = 0,
+ };
int rc;
ENTRY;
struct mgs_device *mgs,
struct fs_db *fsdb)
{
- char *logname;
- struct llog_handle *loghandle;
- struct llog_ctxt *ctxt;
- struct mgs_fsdb_handler_data d = { fsdb, 0 };
+ char *logname;
+ struct llog_handle *loghandle;
+ struct llog_ctxt *ctxt;
+ struct mgs_fsdb_handler_data d = {
+ .fsdb = fsdb,
+ };
int rc;
ENTRY;