diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2018-01-25 15:43:52 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2018-01-25 15:43:52 +0000 |
commit | 602775af697e8df38f1530970e01f8d31c7bd702 (patch) | |
tree | 7a6e14423fdafcc674ead232a8b1af05f65d0880 /sbin/dhclient/dhcpd.h | |
parent | 2f7a5774269ab3788a8c5681eb7d4cad0f3146b2 (diff) |
Add DPRINTF() and use it to replace log_debug() statements inside
#ifdef DEBUG/#endif blocks.
Suggestions on correct idiom (C99 vs gcc) from millert@
ok tom@
Diffstat (limited to 'sbin/dhclient/dhcpd.h')
-rw-r--r-- | sbin/dhclient/dhcpd.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sbin/dhclient/dhcpd.h b/sbin/dhclient/dhcpd.h index 7e31a0ac6b7..dd90342bb8f 100644 --- a/sbin/dhclient/dhcpd.h +++ b/sbin/dhclient/dhcpd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: dhcpd.h,v 1.245 2018/01/04 03:02:05 krw Exp $ */ +/* $OpenBSD: dhcpd.h,v 1.246 2018/01/25 15:43:51 krw Exp $ */ /* * Copyright (c) 2004 Henning Brauer <henning@openbsd.org> @@ -149,6 +149,12 @@ struct interface_info { struct client_lease_tq lease_db; }; +#if DEBUG +#define DPRINTF(...) log_debug(__VA_ARGS__) +#else +#define DPRINTF(...) do {} while(0) +#endif + #define _PATH_DHCLIENT_CONF "/etc/dhclient.conf" #define _PATH_LEASE_DB "/var/db/dhclient.leases" |