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. --- lib/sockunion.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lib/sockunion.c') diff --git a/lib/sockunion.c b/lib/sockunion.c index 78e02f26..7157b49c 100644 --- a/lib/sockunion.c +++ b/lib/sockunion.c @@ -236,7 +236,7 @@ sockunion_socket (union sockunion *su) sock = socket (su->sa.sa_family, SOCK_STREAM, 0); if (sock < 0) { - zlog (NULL, LOG_WARNING, "Can't make socket : %s", strerror (errno)); + zlog (NULL, LOG_WARNING, "Can't make socket : %s", safe_strerror (errno)); return -1; } @@ -377,7 +377,7 @@ sockunion_connect (int fd, union sockunion *peersu, unsigned short port, if (errno != EINPROGRESS) { zlog_info ("can't connect to %s fd %d : %s", - sockunion_log (&su), fd, strerror (errno)); + sockunion_log (&su), fd, safe_strerror (errno)); return connect_error; } } @@ -444,7 +444,7 @@ sockunion_bind (int sock, union sockunion *su, unsigned short port, ret = bind (sock, (struct sockaddr *)su, size); if (ret < 0) - zlog (NULL, LOG_WARNING, "can't bind socket : %s", strerror (errno)); + zlog (NULL, LOG_WARNING, "can't bind socket : %s", safe_strerror (errno)); return ret; } @@ -576,7 +576,7 @@ sockunion_getsockname (int fd) if (ret < 0) { zlog_warn ("Can't get local address and port by getsockname: %s", - strerror (errno)); + safe_strerror (errno)); return NULL; } @@ -630,7 +630,7 @@ sockunion_getpeername (int fd) if (ret < 0) { zlog (NULL, LOG_WARNING, "Can't get remote address and port: %s", - strerror (errno)); + safe_strerror (errno)); return NULL; } -- cgit v1.2.3