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:
parent
a99f6a716f
commit
48e7fb1a7c
@ -65,6 +65,10 @@ static totp_t totp_data[] = {
|
|||||||
// END OF KEY 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) {
|
static void _update_display(totp_state_t *totp_state) {
|
||||||
char buf[14];
|
char buf[14];
|
||||||
div_t result;
|
div_t result;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user