1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-22 23:48:12 +00:00

prodtest: style

This commit is contained in:
Jan Pochyla 2017-10-27 17:26:14 +02:00
parent 3851404d04
commit 836508657d

View File

@ -166,10 +166,10 @@ static void test_touch(const char *args)
display_clear(); display_clear();
switch (column) { switch (column) {
case 1: display_bar(0, 0, 120, 120, 0xFFFF); break; case 1: display_bar(0, 0, 120, 120, 0xFFFF); break;
case 2: display_bar(120, 0, 120, 120, 0xFFFF); break; case 2: display_bar(120, 0, 120, 120, 0xFFFF); break;
case 3: display_bar(120, 120, 120, 120, 0xFFFF); break; case 3: display_bar(120, 120, 120, 120, 0xFFFF); break;
default: display_bar(0, 120, 120, 120, 0xFFFF); break; default: display_bar(0, 120, 120, 120, 0xFFFF); break;
} }
display_refresh(); display_refresh();
@ -247,7 +247,7 @@ static void test_otp_write(const char *args)
{ {
char data[32]; char data[32];
memset(data, 0, sizeof(data)); memset(data, 0, sizeof(data));
strncpy(data, args, 31); strncpy(data, args, sizeof(data) - 1);
flash_otp_write(0, 0, (const uint8_t *) data, sizeof(data)); flash_otp_write(0, 0, (const uint8_t *) data, sizeof(data));
flash_otp_lock(0); flash_otp_lock(0);
vcp_printf("OK"); vcp_printf("OK");