From 835b293d35a209d38047126443d41fa7090daa4c Mon Sep 17 00:00:00 2001 From: Justus Winter Date: Mon, 19 Jun 2017 21:20:57 +0200 Subject: Use our own variant of 'assert' and 'assert_perror'. Our variants print stack traces on failures. This will make locating errors much easier. --- eth-multiplexer/ethernet.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'eth-multiplexer/ethernet.c') diff --git a/eth-multiplexer/ethernet.c b/eth-multiplexer/ethernet.c index 1f3a57c4..ce46c599 100644 --- a/eth-multiplexer/ethernet.c +++ b/eth-multiplexer/ethernet.c @@ -24,7 +24,7 @@ #include #include -#include +#include #include #include @@ -112,7 +112,7 @@ get_ethernet_address (mach_port_t port, char *address) error_t err; int net_address[2]; size_t count = 2; - assert (count * sizeof (int) >= ETH_ALEN); + assert_backtrace (count * sizeof (int) >= ETH_ALEN); err = device_get_status (port, NET_ADDRESS, net_address, &count); if (err) @@ -130,7 +130,7 @@ int ethernet_open (char *dev_name, device_t master_device, { error_t err; - assert (ether_port == MACH_PORT_NULL); + assert_backtrace (ether_port == MACH_PORT_NULL); err = ports_create_port (etherreadclass, etherport_bucket, sizeof (struct port_info), &readpt); -- cgit v1.2.3