In case there is an error reading the contents of permission
file. gettimeofday() is correctly not called on 'idgot'.
However, this means that 'idgot' timeval is left uninitialized.
This patch Initialize 'idgot' timeval to 0 so that in case as
above the value is printed as zero and not garbage.
Test-Parameters: trivial
CoverityID: 397122 ("Uninitialized scalar variable")
Fixes:
d5b26443 ("LU-16615 utils: add messages in l_getidentity")
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: Ie3d5dff1f02ede83690472e60cc14c12ec5d978a
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55402
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
struct identity_downcall_data *data = NULL;
glob_t path;
unsigned long uid;
- struct timeval start, idgot, fini;
+ struct timeval start, idgot = {0}, fini;
int fd, rc = -EINVAL, size, maxgroups;
bool alreadyfailed = false;