Whamcloud - gitweb
LU-17000 utils: Initialize 'idgot' time before using 02/55402/2
authorArshad Hussain <arshad.hussain@aeoncomputing.com>
Wed, 12 Jun 2024 09:35:17 +0000 (05:35 -0400)
committerOleg Drokin <green@whamcloud.com>
Tue, 25 Jun 2024 03:32:11 +0000 (03:32 +0000)
commit3afd41ff59d2d265d26256c4a2ec19cd26bdef44
treee2f59b8d5c8b39b5d63fde8dec9e5c5ab6836634
parentc123251df70561aa51e390fec928cae04532f2ce
LU-17000 utils: Initialize 'idgot' time before using

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>
lustre/utils/l_getidentity.c