Skip to content

Commit 44f576c

Browse files
committed
MIC-E improvements
1 parent aede01d commit 44f576c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/decode_aprs.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1424,7 +1424,7 @@ static void aprs_mic_e (decode_aprs_t *A, packet_t pp, unsigned char *info, int
14241424
if (ilen < sizeof(struct aprs_mic_e_s)) {
14251425
if ( ! A->g_quiet) {
14261426
text_color_set(DW_COLOR_ERROR);
1427-
dw_printf("MIC-E format must have at least %d characters in the information part.\n", sizeof(struct aprs_mic_e_s));
1427+
dw_printf("MIC-E format must have at least %d characters in the information part.\n", (int)(sizeof(struct aprs_mic_e_s)));
14281428
}
14291429
return;
14301430
}

src/deviceid.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,7 @@ static inline int strncmp_z (char *a, char *b, size_t len)
620620
void deviceid_decode_mice (char *comment, char *trimmed, size_t trimmed_size, char *device, size_t device_size)
621621
{
622622
strlcpy (device, "UNKNOWN vendor/model", device_size);
623-
strlcpy (trimmed, comment, sizeof(trimmed));
623+
strlcpy (trimmed, comment, trimmed_size);
624624
if (strlen(comment) < 1) {
625625
return;
626626
}
@@ -675,7 +675,7 @@ void deviceid_decode_mice (char *comment, char *trimmed, size_t trimmed_size, ch
675675
// Not found.
676676

677677
strlcpy (device, "UNKNOWN vendor/model", device_size);
678-
strlcpy (trimmed, comment, sizeof(trimmed));
678+
strlcpy (trimmed, comment, trimmed_size);
679679

680680
} // end deviceid_decode_mice
681681

0 commit comments

Comments
 (0)