2004-11-19 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* global: Replace strerror with safe_strerror. And vtysh/vtysh.c
needs to include "log.h" to pick up the declaration.
diff --git a/zebra/kernel_socket.c b/zebra/kernel_socket.c
index 27b8895..60542c6 100644
--- a/zebra/kernel_socket.c
+++ b/zebra/kernel_socket.c
@@ -798,7 +798,7 @@
if (errno == ENETUNREACH)
return ZEBRA_ERR_RTUNREACH;
- zlog_warn ("write : %s (%d)", strerror (errno), errno);
+ zlog_warn ("write : %s (%d)", safe_strerror (errno), errno);
return -1;
}
return 0;
@@ -896,7 +896,7 @@
if (nbytes <= 0)
{
if (nbytes < 0 && errno != EWOULDBLOCK && errno != EAGAIN)
- zlog_warn ("routing socket error: %s", strerror (errno));
+ zlog_warn ("routing socket error: %s", safe_strerror (errno));
return 0;
}