Skip to content

Commit

Permalink
Change pack type from UINT8_C to uint8_t
Browse files Browse the repository at this point in the history
See the stdint.h file:
```
\# define UINT8_C(c) c
\# define UINT16_C(c)  c
\# define UINT32_C(c)  c ## U
```

The UINT8_C is a macro, it will be replaced by the value of c.
The size of UINT8_C is 4 and the size of uint8_t is 1.

Tested:
```
1. send ipmi command on the serial port to get static IPv6 router prefix length.
~# ipmitool raw 0x0c 0x02 0x01 0x43 0x00 0x00
 11 00
2. set static IPv6 router address on the bios setup and reboot bios check the
result of static IPv6 router prefix length.
The static IPv6 router address and prefix length can be successfully displayed
on the bios setup.
```

Signed-off-by: Jian Zhang <[email protected]>
Change-Id: I1320e466217d5a3db75a7b99545eed922b00b6e2
  • Loading branch information
zhangjian3032 authored and Jian Zhang committed Feb 4, 2024
1 parent cfd7fa8 commit 796e824
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion transporthandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1325,7 +1325,7 @@ RspType<message::Payload> getLan(Context::ptr ctx, uint4_t channelBits,
}
case LanParam::IPv6StaticRouter1PrefixLength:
{
ret.pack(UINT8_C(0));
ret.pack(uint8_t{0});
return responseSuccess(std::move(ret));
}
case LanParam::IPv6StaticRouter1PrefixValue:
Expand Down

0 comments on commit 796e824

Please sign in to comment.