forked from len0rd/rockbox
otp: Correct some 64-bit time_t warnings
Change-Id: Ic2c00168170cee797a8ac7de1df2cb6650a9184d
This commit is contained in:
parent
48392bab94
commit
dc72190d88
1 changed files with 4 additions and 4 deletions
|
@ -44,7 +44,7 @@ struct account_t {
|
||||||
|
|
||||||
union {
|
union {
|
||||||
uint64_t hotp_counter;
|
uint64_t hotp_counter;
|
||||||
int totp_period;
|
unsigned long totp_period;
|
||||||
};
|
};
|
||||||
|
|
||||||
int digits;
|
int digits;
|
||||||
|
@ -528,12 +528,12 @@ static void show_code(int acct)
|
||||||
#if CONFIG_RTC
|
#if CONFIG_RTC
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
rb->splashf(0, "%0*d (%ld seconds(s) left)", accounts[acct].digits,
|
rb->splashf(0, "%0*d (%lu seconds(s) left)", accounts[acct].digits,
|
||||||
TOTP(accounts[acct].secret,
|
TOTP(accounts[acct].secret,
|
||||||
accounts[acct].sec_len,
|
accounts[acct].sec_len,
|
||||||
accounts[acct].totp_period,
|
accounts[acct].totp_period,
|
||||||
accounts[acct].digits),
|
accounts[acct].digits),
|
||||||
accounts[acct].totp_period - get_utc() % accounts[acct].totp_period);
|
accounts[acct].totp_period - (unsigned long) get_utc() % accounts[acct].totp_period);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
else
|
else
|
||||||
|
@ -693,7 +693,7 @@ static void edit_menu(int acct)
|
||||||
if(accounts[acct].is_totp)
|
if(accounts[acct].is_totp)
|
||||||
rb->snprintf(data_buf, sizeof(data_buf), "%d", (int)accounts[acct].hotp_counter);
|
rb->snprintf(data_buf, sizeof(data_buf), "%d", (int)accounts[acct].hotp_counter);
|
||||||
else
|
else
|
||||||
rb->snprintf(data_buf, sizeof(data_buf), "%d", accounts[acct].totp_period);
|
rb->snprintf(data_buf, sizeof(data_buf), "%lu", accounts[acct].totp_period);
|
||||||
|
|
||||||
if(rb->kbd_input(data_buf, sizeof(data_buf), NULL) < 0)
|
if(rb->kbd_input(data_buf, sizeof(data_buf), NULL) < 0)
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue