diff options
author | Leonid Lisovskiy | 2011-10-18 00:35:47 +0200 |
---|---|---|
committer | Denys Vlasenko | 2011-10-18 00:35:47 +0200 |
commit | 6c9c0a1dc9de48b59c103600a1f574a4a234b3d6 (patch) | |
tree | bc758b649ccccc95e4020431457362991155b1bd /networking/udhcp/common.h | |
parent | cd06e06eee3ef89e45b60d7122e5518995c7f65e (diff) | |
download | busybox-6c9c0a1dc9de48b59c103600a1f574a4a234b3d6.zip busybox-6c9c0a1dc9de48b59c103600a1f574a4a234b3d6.tar.gz |
udhcp: IF_UDHCP_VERBOSE() macro - improve code readability
Signed-off-by: Leonid Lisovskiy <lly.dev@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking/udhcp/common.h')
-rw-r--r-- | networking/udhcp/common.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/networking/udhcp/common.h b/networking/udhcp/common.h index 80d97e8..7862668 100644 --- a/networking/udhcp/common.h +++ b/networking/udhcp/common.h @@ -248,6 +248,7 @@ struct option_set *udhcp_find_option(struct option_set *opt_list, uint8_t code) /*** Logging ***/ #if defined CONFIG_UDHCP_DEBUG && CONFIG_UDHCP_DEBUG >= 1 +# define IF_UDHCP_VERBOSE(...) __VA_ARGS__ extern unsigned dhcp_verbose; # define log1(...) do { if (dhcp_verbose >= 1) bb_info_msg(__VA_ARGS__); } while (0) # if CONFIG_UDHCP_DEBUG >= 2 @@ -263,6 +264,7 @@ void udhcp_dump_packet(struct dhcp_packet *packet) FAST_FUNC; # define log3(...) ((void)0) # endif #else +# define IF_UDHCP_VERBOSE(...) # define udhcp_dump_packet(...) ((void)0) # define log1(...) ((void)0) # define log2(...) ((void)0) |