From 84f04477b260f1c11ba140f7028e649a86211a26 Mon Sep 17 00:00:00 2001 From: Andy Cedilnik Date: Wed, 6 Oct 2004 08:02:18 -0400 Subject: COMP: Fix C build problem in certain conditions --- Source/CTest/Curl/strerror.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Source/CTest/Curl/strerror.c b/Source/CTest/Curl/strerror.c index fafe9ec..ea5bcd8 100644 --- a/Source/CTest/Curl/strerror.c +++ b/Source/CTest/Curl/strerror.c @@ -547,12 +547,14 @@ const char *Curl_strerror(struct connectdata *conn, int err) } #endif /* end of HAVE_GLIBC_STRERROR_R */ #else /* HAVE_STRERROR_R */ - char *msg = strerror(err); - if ( !msg ) - { - msg = "Unknown System Error"; - } - strncpy(buf, msg, max); + { + char *msg = strerror(err); + if ( !msg ) + { + msg = "Unknown System Error"; + } + strncpy(buf, msg, max); + } #endif /* end of HAVE_STRERROR_R */ #endif /* end of ! Windows */ -- cgit v0.12