Skip to content

Commit ace7d30

Browse files
committed
Fix PVS warnings
1 parent 3683bf4 commit ace7d30

File tree

1 file changed

+10
-23
lines changed

1 file changed

+10
-23
lines changed

lib/lfrfid/protocols/protocol_noralsy.c

Lines changed: 10 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -168,10 +168,7 @@ bool protocol_noralsy_write_data(ProtocolNoralsy* protocol, void* data) {
168168
return result;
169169
}
170170

171-
static void protocol_noralsy_render_data_internal(
172-
ProtocolNoralsy* protocol,
173-
FuriString* result,
174-
bool brief) {
171+
static void protocol_noralsy_render_data_internal(ProtocolNoralsy* protocol, FuriString* result) {
175172
UNUSED(protocol);
176173
uint32_t raw2 = bit_lib_get_bits_32(protocol->data, 32, 32);
177174
uint32_t raw3 = bit_lib_get_bits_32(protocol->data, 64, 32);
@@ -181,31 +178,21 @@ static void protocol_noralsy_render_data_internal(
181178

182179
uint8_t year = (raw2 & 0x000ff000) >> 12;
183180
bool tag_is_gen_z = (year > 0x60);
184-
if(brief) {
185-
furi_string_printf(
186-
result,
187-
"Card ID: %07lx\n"
188-
"Year: %s%02x",
189-
cardid,
190-
tag_is_gen_z ? "19" : "20",
191-
year);
192-
} else {
193-
furi_string_printf(
194-
result,
195-
"Card ID: %07lx\n"
196-
"Year: %s%02x",
197-
cardid,
198-
tag_is_gen_z ? "19" : "20",
199-
year);
200-
}
181+
furi_string_printf(
182+
result,
183+
"Card ID: %07lx\n"
184+
"Year: %s%02x",
185+
cardid,
186+
tag_is_gen_z ? "19" : "20",
187+
year);
201188
}
202189

203190
void protocol_noralsy_render_data(ProtocolNoralsy* protocol, FuriString* result) {
204-
protocol_noralsy_render_data_internal(protocol, result, false);
191+
protocol_noralsy_render_data_internal(protocol, result);
205192
}
206193

207194
void protocol_noralsy_render_brief_data(ProtocolNoralsy* protocol, FuriString* result) {
208-
protocol_noralsy_render_data_internal(protocol, result, true);
195+
protocol_noralsy_render_data_internal(protocol, result);
209196
}
210197

211198
const ProtocolBase protocol_noralsy = {

0 commit comments

Comments
 (0)