summaryrefslogtreecommitdiff
path: root/sbin/dhclient
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2017-09-20 22:05:11 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2017-09-20 22:05:11 +0000
commitadad3a42ee8ed235e1f490dcc638ad5757f4d124 (patch)
tree967069c3eab4450b6907144f001dfcb835c0b401 /sbin/dhclient
parent4e6779828ed94f02e2a2c57a394b1a7d03ce3abc (diff)
Fix some spacing. A couple of log_warx() -> log_warn() to
use standard error messages for malloc errors.
Diffstat (limited to 'sbin/dhclient')
-rw-r--r--sbin/dhclient/dhclient.c8
-rw-r--r--sbin/dhclient/dispatch.c6
2 files changed, 6 insertions, 8 deletions
diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c
index a3bd4bfaf4f..7eaacb252eb 100644
--- a/sbin/dhclient/dhclient.c
+++ b/sbin/dhclient/dhclient.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dhclient.c,v 1.509 2017/09/20 19:21:00 krw Exp $ */
+/* $OpenBSD: dhclient.c,v 1.510 2017/09/20 22:05:10 krw Exp $ */
/*
* Copyright 2004 Henning Brauer <henning@openbsd.org>
@@ -1241,8 +1241,7 @@ packet_to_lease(struct interface_info *ifi, struct option_data *options)
packet->sname[0]) {
lease->server_name = malloc(DHCP_SNAME_LEN + 1);
if (lease->server_name == NULL) {
- log_warnx("%s: lease declined - no memory for SNAME",
- log_procname);
+ log_warn("%s: lease declined - SNAME", log_procname);
goto decline;
}
memcpy(lease->server_name, packet->sname, DHCP_SNAME_LEN);
@@ -1261,8 +1260,7 @@ packet_to_lease(struct interface_info *ifi, struct option_data *options)
/* Don't count on the NUL terminator. */
lease->filename = malloc(DHCP_FILE_LEN + 1);
if (lease->filename == NULL) {
- log_warnx("%s: lease declined - no memory for filename",
- log_procname);
+ log_warn("%s: lease declined - filename", log_procname);
goto decline;
}
memcpy(lease->filename, packet->file, DHCP_FILE_LEN);
diff --git a/sbin/dhclient/dispatch.c b/sbin/dhclient/dispatch.c
index aff71a2b471..f5916c9be55 100644
--- a/sbin/dhclient/dispatch.c
+++ b/sbin/dhclient/dispatch.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dispatch.c,v 1.145 2017/09/20 18:28:14 krw Exp $ */
+/* $OpenBSD: dispatch.c,v 1.146 2017/09/20 22:05:10 krw Exp $ */
/*
* Copyright 2004 Henning Brauer <henning@openbsd.org>
@@ -106,8 +106,8 @@ dispatch(struct interface_info *ifi, int routefd)
*/
howlong = ifi->timeout - cur_time;
if (howlong > INT_MAX / 1000)
- howlong = INT_MAX / 1000;
- to_msec = howlong * 1000;
+ howlong = INT_MAX / 1000;
+ to_msec = howlong * 1000;
} else
to_msec = -1;