mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-06-10 01:58:45 +00:00
style(all): reformat with clang-format 13.0
This commit is contained in:
parent
0e505ec78b
commit
d656f88572
@ -288,15 +288,14 @@ void display_avatar(int x, int y, const void *data, uint32_t datalen,
|
|||||||
if (px >= x0 && px <= x1 && py >= y0 && py <= y1) {
|
if (px >= x0 && px <= x1 && py >= y0 && py <= y1) {
|
||||||
int d = (px - AVATAR_IMAGE_SIZE / 2) * (px - AVATAR_IMAGE_SIZE / 2) +
|
int d = (px - AVATAR_IMAGE_SIZE / 2) * (px - AVATAR_IMAGE_SIZE / 2) +
|
||||||
(py - AVATAR_IMAGE_SIZE / 2) * (py - AVATAR_IMAGE_SIZE / 2);
|
(py - AVATAR_IMAGE_SIZE / 2) * (py - AVATAR_IMAGE_SIZE / 2);
|
||||||
// inside border area
|
|
||||||
if (d < AVATAR_BORDER_LOW) {
|
if (d < AVATAR_BORDER_LOW) {
|
||||||
|
// inside border area
|
||||||
PIXELDATA((decomp_out[0] << 8) | decomp_out[1]);
|
PIXELDATA((decomp_out[0] << 8) | decomp_out[1]);
|
||||||
} else
|
} else if (d > AVATAR_BORDER_HIGH) {
|
||||||
// outside border area
|
// outside border area
|
||||||
if (d > AVATAR_BORDER_HIGH) {
|
|
||||||
PIXELDATA(bgcolor);
|
PIXELDATA(bgcolor);
|
||||||
// border area
|
|
||||||
} else {
|
} else {
|
||||||
|
// border area
|
||||||
#if AVATAR_ANTIALIAS
|
#if AVATAR_ANTIALIAS
|
||||||
d = 31 * (d - AVATAR_BORDER_LOW) /
|
d = 31 * (d - AVATAR_BORDER_LOW) /
|
||||||
(AVATAR_BORDER_HIGH - AVATAR_BORDER_LOW);
|
(AVATAR_BORDER_HIGH - AVATAR_BORDER_LOW);
|
||||||
|
@ -223,9 +223,8 @@ int cryptoMessageVerify(const CoinInfo *coin, const uint8_t *message,
|
|||||||
len != address_prefix_bytes_len(coin->address_type) + 20) {
|
len != address_prefix_bytes_len(coin->address_type) + 20) {
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
} else
|
} else if (signature[0] >= 35 && signature[0] <= 38) {
|
||||||
// segwit-in-p2sh
|
// segwit-in-p2sh
|
||||||
if (signature[0] >= 35 && signature[0] <= 38) {
|
|
||||||
size_t len = base58_decode_check(address, coin->curve->hasher_base58,
|
size_t len = base58_decode_check(address, coin->curve->hasher_base58,
|
||||||
addr_raw, MAX_ADDR_RAW_SIZE);
|
addr_raw, MAX_ADDR_RAW_SIZE);
|
||||||
ecdsa_get_address_segwit_p2sh_raw(pubkey, coin->address_type_p2sh,
|
ecdsa_get_address_segwit_p2sh_raw(pubkey, coin->address_type_p2sh,
|
||||||
@ -235,9 +234,8 @@ int cryptoMessageVerify(const CoinInfo *coin, const uint8_t *message,
|
|||||||
len != address_prefix_bytes_len(coin->address_type_p2sh) + 20) {
|
len != address_prefix_bytes_len(coin->address_type_p2sh) + 20) {
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
} else
|
} else if (signature[0] >= 39 && signature[0] <= 42) {
|
||||||
// segwit
|
// segwit
|
||||||
if (signature[0] >= 39 && signature[0] <= 42) {
|
|
||||||
int witver = 0;
|
int witver = 0;
|
||||||
size_t len = 0;
|
size_t len = 0;
|
||||||
if (!coin->bech32_prefix ||
|
if (!coin->bech32_prefix ||
|
||||||
|
Loading…
Reference in New Issue
Block a user