Bugfix/clang tidy applied 2022 (#232)

* clang-tidy applied fixes to src folder
* clang-tidy applied fixes to apps folder

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
This commit is contained in:
Steve Karg
2022-02-27 19:14:17 -06:00
committed by GitHub
parent 5e70eeecfc
commit d0fe77c030
33 changed files with 211 additions and 123 deletions
+5 -3
View File
@@ -22,8 +22,9 @@
*/
bool days_is_leap_year(uint16_t year)
{
if ((year % 4) == 0 && ((year % 100) != 0 || (year % 400) == 0))
if ((year % 4) == 0 && ((year % 100) != 0 || (year % 400) == 0)) {
return true;
}
return (false);
}
@@ -42,10 +43,11 @@ uint8_t days_per_month(uint16_t year, uint8_t month)
uint8_t month_days[13] = { 0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30,
31 };
if ((month == 2) && days_is_leap_year(year))
if ((month == 2) && days_is_leap_year(year)) {
return (29);
else if (month >= 1 && month <= 12)
} else if (month >= 1 && month <= 12) {
return (month_days[month]);
}
return 0;
}