From: Matheus Afonso Martins Moreira Date: Wed, 6 Mar 2024 00:08:10 +0000 (-0300) Subject: movement: convert can_sleep an automatic variable X-Git-Url: https://git.earman.xyz/?a=commitdiff_plain;h=6ca553e648ff0b4e72520057f1e353759949dcbe;p=sensor-watch.git movement: convert can_sleep an automatic variable It is a simple boolean value and its scope is limited to the function. There is no reason that I can think of for it to be a static variable. --- diff --git a/movement/movement.c b/movement/movement.c index d780a2f..c64df0c 100644 --- a/movement/movement.c +++ b/movement/movement.c @@ -509,7 +509,7 @@ bool app_loop(void) { } // default to being allowed to sleep by the face. - static bool can_sleep = true; + bool can_sleep = true; if (event.event_type) { event.subsecond = movement_state.subsecond;