bozo: Make nextRestart, nextDay local vars

The global variables nextRestart and nextDay are only referenced in
BozoDaemon(), a function that never returns. There is no reason for
these to be globals, so move them to be local variables to make it
obvious that there are no concerns with locking, and no possible issues
with accessing these vars from different functions or different threads.

Change-Id: I38a8fc2227455dc3d7bc2899aa20cfa5475b4ad4
Reviewed-on: https://gerrit.openafs.org/15835
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
This commit is contained in:
Andrew Deason 2024-08-19 17:04:47 -05:00 committed by Benjamin Kaduk
parent 87555080c3
commit d53f37689f

View File

@ -90,8 +90,6 @@ char *DoPidFiles = NULL;
int DoSyslogFacility = LOG_DAEMON;
#endif
int DoTransarcLogs = 0;
static afs_int32 nextRestart;
static afs_int32 nextDay;
struct ktime bozo_nextRestartKT, bozo_nextDayKT;
int bozo_newKTs = 1;
@ -616,6 +614,8 @@ static void *
BozoDaemon(void *unused)
{
afs_int32 now;
afs_int32 nextRestart = 0;
afs_int32 nextDay = 0;
while (1) {
#ifdef AFS_PTHREAD_ENV