Skip to content

Commit

Permalink
MIC-E improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
wb2osz committed Oct 22, 2024
1 parent aede01d commit 44f576c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/decode_aprs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1424,7 +1424,7 @@ static void aprs_mic_e (decode_aprs_t *A, packet_t pp, unsigned char *info, int
if (ilen < sizeof(struct aprs_mic_e_s)) {
if ( ! A->g_quiet) {
text_color_set(DW_COLOR_ERROR);
dw_printf("MIC-E format must have at least %d characters in the information part.\n", sizeof(struct aprs_mic_e_s));
dw_printf("MIC-E format must have at least %d characters in the information part.\n", (int)(sizeof(struct aprs_mic_e_s)));
}
return;
}
Expand Down
4 changes: 2 additions & 2 deletions src/deviceid.c
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ static inline int strncmp_z (char *a, char *b, size_t len)
void deviceid_decode_mice (char *comment, char *trimmed, size_t trimmed_size, char *device, size_t device_size)
{
strlcpy (device, "UNKNOWN vendor/model", device_size);
strlcpy (trimmed, comment, sizeof(trimmed));
strlcpy (trimmed, comment, trimmed_size);
if (strlen(comment) < 1) {
return;
}
Expand Down Expand Up @@ -675,7 +675,7 @@ void deviceid_decode_mice (char *comment, char *trimmed, size_t trimmed_size, ch
// Not found.

strlcpy (device, "UNKNOWN vendor/model", device_size);
strlcpy (trimmed, comment, sizeof(trimmed));
strlcpy (trimmed, comment, trimmed_size);

} // end deviceid_decode_mice

Expand Down

0 comments on commit 44f576c

Please sign in to comment.