diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2017-04-08 17:00:11 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2017-04-08 17:00:11 +0000 |
commit | 3671db10b65fbcc93e69089cb7a1539e771907fb (patch) | |
tree | d32125c288a8fb5b833f6fd08d2e918ba046d602 /sbin/dhclient/dhcpd.h | |
parent | 8bb4b819075ff6b187f139175d645088d0ecad32 (diff) |
Replace a mess of snprintf() dances with easier to read code using
strlcat(). Shorter, clearer, fewer signed vs unsigned questions.
Shrink static buffer for the string version of an option value from
32K to 8K. Since the string version of the entire lease is constructed
in a 8K buffer, bigger option values are pointless.
Use 8K of the saved space for a static buffer for pretty_print_string()
and use it rather scribbling intermediate values into the final
destination.
No intentional functional change.
Diffstat (limited to 'sbin/dhclient/dhcpd.h')
-rw-r--r-- | sbin/dhclient/dhcpd.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/dhclient/dhcpd.h b/sbin/dhclient/dhcpd.h index 8eaac8486e6..6104b8a0be4 100644 --- a/sbin/dhclient/dhcpd.h +++ b/sbin/dhclient/dhcpd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: dhcpd.h,v 1.166 2017/04/07 15:03:00 krw Exp $ */ +/* $OpenBSD: dhcpd.h,v 1.167 2017/04/08 17:00:10 krw Exp $ */ /* * Copyright (c) 2004 Henning Brauer <henning@openbsd.org> @@ -188,7 +188,7 @@ extern struct in_addr active_addr; int cons_options(struct interface_info *, struct option_data *); char *pretty_print_option(unsigned int, struct option_data *, int); char *pretty_print_domain_search(unsigned char *, size_t); -int pretty_print_string(unsigned char *, size_t, unsigned char *, size_t, int); +char *pretty_print_string(unsigned char *, size_t, int); int pretty_print_classless_routes(unsigned char *, size_t, unsigned char *, size_t); void do_packet(struct interface_info *, unsigned int, struct in_addr, |