Skip to content

Commit

Permalink
Fix nasa#2317, Correct unbalanced brackets in CFE_MSG_CMD_HDR_INIT
Browse files Browse the repository at this point in the history
…macro
  • Loading branch information
thnkslprpt committed May 2, 2023
1 parent c9b10f3 commit 547ad5a
Showing 1 changed file with 8 additions and 18 deletions.
26 changes: 8 additions & 18 deletions modules/msg/option_inc/default_cfe_msg_hdr_priext.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,24 +54,14 @@
/**
* \brief Macro to initialize a command header, useful in tables that define commands
*/
#define CFE_MSG_CMD_HDR_INIT(mid, size, fc, cksum) \
{ \
.Msg.CCSDS = \
{ \
.Pri = \
{ \
.StreamId = {(((mid)&0x80)<<5, (mid)&0x7F}, \
.Sequence = {0xC0, 0}, \
.Length = {((size)-7)>>8, ((size)-7)&0xFF} \
}, \
.Ext = \
{ \
.Subsystem = {0, ((mid)>>8)&0xFF}, \
.SystemId = {0, 0) \
} \
}, \
CFE_MSG_CMD_HDR_SEC_INIT(fc, cksum) \
}
#define CFE_MSG_CMD_HDR_INIT(mid, size, fc, cksum) \
{ \
.Msg.CCSDS = {.Pri = {.StreamId = {((mid)&0x80) << 5, (mid)&0x7F}, \
.Sequence = {0xC0, 0}, \
.Length = {((size)-7) >> 8, ((size)-7) & 0xFF}}, \
.Ext = {.Subsystem = {0, ((mid) >> 8) & 0xFF}, .SystemId = {0, 0}}}, \
CFE_MSG_CMD_HDR_SEC_INIT(fc, cksum) \
}

/*
* Type Definitions
Expand Down

0 comments on commit 547ad5a

Please sign in to comment.