Skip to content

Commit 4f28236

Browse files
committed
Save a few bytes of flash
Signed-off-by: Samuel Cabrero <[email protected]>
1 parent ec9900e commit 4f28236

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

arduino-modbus-rtu-tcp-gateway/arduino-modbus-rtu-tcp-gateway.ino

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,10 @@ typedef struct {
4747
byte ip[4];
4848
byte subnet[4];
4949
byte gateway[4];
50+
#ifdef ENABLE_DHCP
5051
byte dns[4]; // only used if ENABLE_DHCP
5152
bool enableDhcp; // only used if ENABLE_DHCP
53+
#endif
5254
uint16_t tcpPort;
5355
uint16_t udpPort;
5456
uint16_t webPort;
@@ -67,8 +69,10 @@ const config_t DEFAULT_CONFIG = {
6769
DEFAULT_STATIC_IP,
6870
DEFAULT_SUBMASK,
6971
DEFAULT_GATEWAY,
72+
#ifdef ENABLE_DHCP
7073
DEFAULT_DNS,
7174
DEFAULT_AUTO_IP,
75+
#endif
7276
DEFAULT_TCP_PORT,
7377
DEFAULT_UDP_PORT,
7478
DEFAULT_WEB_PORT,

0 commit comments

Comments
 (0)