faces/totp: define TOTP data array size function

Computes the size of the array of TOTP records.
The compiler will likely evaluate it at compile time.
This commit is contained in:
Matheus Afonso Martins Moreira 2024-02-20 23:16:41 -03:00
parent a99f6a716f
commit 48e7fb1a7c

View file

@ -65,6 +65,10 @@ static totp_t totp_data[] = {
// END OF KEY DATA.
////////////////////////////////////////////////////////////////////////////////
static inline size_t _totp_num(void) {
return sizeof(totp_data) / sizeof(*totp_data);
}
static void _update_display(totp_state_t *totp_state) {
char buf[14];
div_t result;