From: Daniel Stenberg Date: Thu, 6 May 2004 07:32:30 +0000 (+0000) Subject: removed the unused 'len' variable, made use of the ptr pointer even if no X-Git-Tag: curl-7_12_0~179 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=af72f198ba486858d0794e272bb090b50db04a57;p=thirdparty%2Fcurl.git 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 --- diff --git a/lib/version.c b/lib/version.c index 150d52b31f..3f981e2b59 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");