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/irdp_main.c b/zebra/irdp_main.c
index 7b91696..8f0250b 100644
--- a/zebra/irdp_main.c
+++ b/zebra/irdp_main.c
@@ -104,16 +104,16 @@
if ( zserv_privs.change (ZPRIVS_RAISE) )
zlog_err ("irdp_sock_init: could not raise privs, %s",
- strerror (errno) );
+ safe_strerror (errno) );
irdp_sock = socket (AF_INET, SOCK_RAW, IPPROTO_ICMP);
if ( zserv_privs.change (ZPRIVS_LOWER) )
zlog_err ("irdp_sock_init: could not lower privs, %s",
- strerror (errno) );
+ safe_strerror (errno) );
if (irdp_sock < 0) {
- zlog_warn ("IRDP: can't create irdp socket %s", strerror(errno));
+ zlog_warn ("IRDP: can't create irdp socket %s", safe_strerror(errno));
return irdp_sock;
};
@@ -121,13 +121,13 @@
ret = setsockopt (irdp_sock, IPPROTO_IP, IP_TTL,
(void *) &i, sizeof (i));
if (ret < 0) {
- zlog_warn ("IRDP: can't do irdp sockopt %s", strerror(errno));
+ zlog_warn ("IRDP: can't do irdp sockopt %s", safe_strerror(errno));
return ret;
};
ret = setsockopt_ifindex (AF_INET, irdp_sock, 1);
if (ret < 0) {
- zlog_warn ("IRDP: can't do irdp sockopt %s", strerror(errno));
+ zlog_warn ("IRDP: can't do irdp sockopt %s", safe_strerror(errno));
return ret;
};