From 6099b3b56956322567323c11fd698b2328c6826b Mon Sep 17 00:00:00 2001 From: ajs Date: Sat, 20 Nov 2004 02:06:59 +0000 Subject: 2004-11-19 Andrew J. Schorr * global: Replace strerror with safe_strerror. And vtysh/vtysh.c needs to include "log.h" to pick up the declaration. --- ripd/rip_interface.c | 4 ++-- ripd/ripd.c | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'ripd') diff --git a/ripd/rip_interface.c b/ripd/rip_interface.c index c1c0a45a..55848faa 100644 --- a/ripd/rip_interface.c +++ b/ripd/rip_interface.c @@ -86,7 +86,7 @@ ipv4_multicast_join (int sock, if (ret < 0) zlog (NULL, LOG_INFO, "can't setsockopt IP_ADD_MEMBERSHIP %s", - strerror (errno)); + safe_strerror (errno)); return ret; } @@ -193,7 +193,7 @@ rip_interface_multicast_set (int sock, struct connected *connected) sock,inet_ntoa(from.sin_addr), (int)ntohs(from.sin_port), connected->ifp->name, - strerror (errno)); + safe_strerror (errno)); } if (ripd_privs.change (ZPRIVS_LOWER)) diff --git a/ripd/ripd.c b/ripd/ripd.c index 0f854cf3..e239fd4e 100644 --- a/ripd/ripd.c +++ b/ripd/ripd.c @@ -1350,7 +1350,7 @@ rip_send_packet (u_char * buf, int size, struct sockaddr_in *to, if (send_sock < 0) { zlog_warn("rip_send_packet could not create socket %s", - strerror(errno)); + safe_strerror(errno)); return -1; } sockopt_broadcast (send_sock); @@ -1370,7 +1370,7 @@ rip_send_packet (u_char * buf, int size, struct sockaddr_in *to, ntohs (sin.sin_port)); if (ret < 0) - zlog_warn ("can't send packet : %s", strerror (errno)); + zlog_warn ("can't send packet : %s", safe_strerror (errno)); if (!to) close(send_sock); @@ -1604,7 +1604,7 @@ setsockopt_pktinfo (int sock) ret = setsockopt(sock, IPPROTO_IP, IP_PKTINFO, &val, sizeof(val)); if (ret < 0) - zlog_warn ("Can't setsockopt IP_PKTINFO : %s", strerror (errno)); + zlog_warn ("Can't setsockopt IP_PKTINFO : %s", safe_strerror (errno)); return ret; } @@ -1662,7 +1662,7 @@ rip_read_new (struct thread *t) ret = rip_recvmsg (sock, buf, RIP_PACKET_MAXSIZ, &from, (int *)&ifindex); if (ret < 0) { - zlog_warn ("Can't read RIP packet: %s", strerror (errno)); + zlog_warn ("Can't read RIP packet: %s", safe_strerror (errno)); return ret; } @@ -1701,7 +1701,7 @@ rip_read (struct thread *t) (struct sockaddr *) &from, &fromlen); if (len < 0) { - zlog_info ("recvfrom failed: %s", strerror (errno)); + zlog_info ("recvfrom failed: %s", safe_strerror (errno)); return len; } -- cgit v1.2.1