]> granicus.if.org Git - curl/commitdiff
removed the unused 'len' variable, made use of the ptr pointer even if no
authorDaniel Stenberg <daniel@haxx.se>
Thu, 6 May 2004 07:32:30 +0000 (07:32 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 6 May 2004 07:32:30 +0000 (07:32 +0000)
extra lib is used to prevent compiler warnings ("variable set but not used")
on that case

lib/version.c

index 150d52b31faa869276be31c43b54e8c55a7f73df..3f981e2b59a464405b6f3ad8745e59289e12c6e8 100644 (file)
@@ -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");