diff options
author | Joey Castillo <joeycastillo@utexas.edu> | 2022-04-10 14:45:21 -0400 |
---|---|---|
committer | Joey Castillo <joeycastillo@utexas.edu> | 2022-04-10 14:45:21 -0400 |
commit | 5cb68923b9cf27e72a55f5533b9f4045c75eda72 (patch) | |
tree | 808f4206d457b5581a1862f778354aa62a555aee /movement/watch_faces/clock/simple_clock_face.c | |
parent | d502a030e1f17b7f805c4e0144dcde5aaec79a66 (diff) | |
download | Sensor-Watch-5cb68923b9cf27e72a55f5533b9f4045c75eda72.tar.gz Sensor-Watch-5cb68923b9cf27e72a55f5533b9f4045c75eda72.tar.bz2 Sensor-Watch-5cb68923b9cf27e72a55f5533b9f4045c75eda72.zip |
static analysis: use parentheses around binary operators
Diffstat (limited to 'movement/watch_faces/clock/simple_clock_face.c')
-rw-r--r-- | movement/watch_faces/clock/simple_clock_face.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/movement/watch_faces/clock/simple_clock_face.c b/movement/watch_faces/clock/simple_clock_face.c index ac9e2a1f..23f36672 100644 --- a/movement/watch_faces/clock/simple_clock_face.c +++ b/movement/watch_faces/clock/simple_clock_face.c @@ -82,11 +82,11 @@ bool simple_clock_face_loop(movement_event_t event, movement_settings_t *setting // ...and set the LAP indicator if low. if (state->battery_low) watch_set_indicator(WATCH_INDICATOR_LAP); - if (date_time.reg >> 6 == previous_date_time >> 6 && event.event_type != EVENT_LOW_ENERGY_UPDATE) { + if ((date_time.reg >> 6) == (previous_date_time >> 6) && event.event_type != EVENT_LOW_ENERGY_UPDATE) { // everything before seconds is the same, don't waste cycles setting those segments. pos = 8; sprintf(buf, "%02d", date_time.unit.second); - } else if (date_time.reg >> 12 == previous_date_time >> 12 && event.event_type != EVENT_LOW_ENERGY_UPDATE) { + } else if ((date_time.reg >> 12) == (previous_date_time >> 12) && event.event_type != EVENT_LOW_ENERGY_UPDATE) { // everything before minutes is the same. pos = 6; sprintf(buf, "%02d%02d", date_time.unit.minute, date_time.unit.second); |