From af72f198ba486858d0794e272bb090b50db04a57 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 6 May 2004 07:32:30 +0000 Subject: removed the unused 'len' variable, made use of the ptr pointer even if no extra lib is used to prevent compiler warnings ("variable set but not used") on that case --- lib/version.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'lib/version.c') diff --git a/lib/version.c b/lib/version.c index 150d52b31..3f981e2b5 100644 --- a/lib/version.c +++ b/lib/version.c @@ -98,10 +98,9 @@ static void getssl_version(char *ptr, long *num) char *curl_version(void) { static char version[200]; - char *ptr; - int len = sizeof(version); - strcpy(version, LIBCURL_NAME "/" LIBCURL_VERSION ); - ptr=strchr(version, '\0'); + char *ptr=version; + strcpy(ptr, LIBCURL_NAME "/" LIBCURL_VERSION ); + ptr=strchr(ptr, '\0'); #ifdef USE_SSLEAY { @@ -110,7 +109,6 @@ char *curl_version(void) ptr=strchr(version, '\0'); } #endif - len -= strlen(version); #ifdef HAVE_KRB4 sprintf(ptr, " krb4"); -- cgit v1.2.3