Skip to content

Commit d6b48ae

Browse files
committed
acarsmsg_t: remove unneeded member
'msn_seq' is only used once locally in outputmsg()
1 parent eb2cb90 commit d6b48ae

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

acarsdec.h

-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ typedef struct {
9191
float lvl;
9292
#ifdef HAVE_LIBACARS
9393
char msn[4];
94-
char msn_seq;
9594
la_proto_node *decoded_tree;
9695
la_reasm_status reasm_status;
9796
#endif

output.c

+3-2
Original file line numberDiff line numberDiff line change
@@ -752,6 +752,7 @@ void outputmsg(const msgblk_t *blk)
752752

753753
bool down = IS_DOWNLINK_BLK(msg.bid);
754754
#ifdef HAVE_LIBACARS
755+
char msn_seq;
755756
la_msg_dir msg_dir = down ? LA_MSG_DIR_AIR2GND : LA_MSG_DIR_GND2AIR;
756757
msg.reasm_status = LA_REASM_SKIPPED; // default value (valid for message with empty text)
757758
#endif
@@ -788,7 +789,7 @@ void outputmsg(const msgblk_t *blk)
788789
/* to store the MSN separately as prefix and seq character. */
789790
for (i = 0; i < sizeof(msg.msn)-1; i++)
790791
msg.msn[i] = msg.no[i];
791-
msg.msn_seq = msg.no[3];
792+
msn_seq = msg.no[3];
792793
#endif
793794
i = sizeof(msg.fid) - 1;
794795
if (text_len < i)
@@ -836,7 +837,7 @@ void outputmsg(const msgblk_t *blk)
836837
.msg_data = (uint8_t *)msg.txt,
837838
.msg_data_len = text_len,
838839
.total_pdu_len = 0, // not used
839-
.seq_num = down ? msg.msn_seq - 'A' : msg.bid - 'A',
840+
.seq_num = down ? msn_seq - 'A' : msg.bid - 'A',
840841
.seq_num_first = down ? 0 : SEQ_FIRST_NONE,
841842
.seq_num_wrap = seq_num_wrap,
842843
.is_final_fragment = msg.be != 0x17, // ETB means "more fragments"

0 commit comments

Comments
 (0)