LU-12999 mgs: Cleanup string handling in name_create_mdt
To satisfy gcc8 -Werror=format-overflow sanity test the mdt_idx
before calling snprintf.
Lustre-change: https://review.whamcloud.com/36817
Lustre-commit:
298cdb5c0b6136b91e76c9c515bfbc2df99bae0b
Test-Parameters: trivial
Cray-bug-id: LUS-8186
Signed-off-by: Shaun Tancheff <stancheff@cray.com>
Change-Id: I2c8764d3715290ee2bd8c96cdc98b532f50632c6
Reviewed-on: https://review.whamcloud.com/43321
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Ben Evans <beevans@whamcloud.com>
Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>