Skip to content

Commit eea0f6f

Browse files
Tomasz Bursztykanashif
authored andcommitted
net/dhcpv4: Avoid ifdefs when using net_dhcpv4_init()
Just provide a macro of value 0 in case CONFIG_NET_DHCPV4 is unset. Signed-off-by: Tomasz Bursztyka <[email protected]>
1 parent 417d349 commit eea0f6f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

subsys/net/ip/dhcpv4.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,14 @@ enum dhcpv4_msg_type {
118118
*/
119119
#define DHCPV4_INITIAL_DELAY_MIN 1
120120

121+
#if defined(CONFIG_NET_DHCPV4)
122+
121123
int net_dhcpv4_init(void);
122124

125+
#else
126+
127+
#define net_dhcpv4_init() 0
128+
129+
#endif /* CONFIG_NET_DHCPV4 */
130+
123131
#endif /* __INTERNAL_DHCPV4_H */

0 commit comments

Comments
 (0)