]> sjero.net Git - wget/commitdiff
[svn] Remove unnecessary assignments to silence warnings from Borland C.
authorhniksic <devnull@localhost>
Sun, 8 May 2005 16:25:42 +0000 (09:25 -0700)
committerhniksic <devnull@localhost>
Sun, 8 May 2005 16:25:42 +0000 (09:25 -0700)
src/ChangeLog
src/netrc.c
src/url.c

index 07b53de5370ed02278e461f7cf9e063c33c0c9a0..9d6ce3d12fa44c6201a0b980b86bdaea983d08ab 100644 (file)
@@ -1,3 +1,17 @@
+2005-05-08  Hrvoje Niksic  <hniksic@xemacs.org>
+
+       * netrc.c (parse_netrc): Explicitly check for assignment != NULL
+       to silence warning from Borland C.
+
+       * url.c (sync_path): Don't unnecessarily increment p.
+       (url_parse): Don't unnecessarily set url_encode to NULL just
+       prior to return from the function.
+
+2005-05-08  Hrvoje Niksic  <hniksic@xemacs.org>
+
+       * log.c (escnonprint_internal): Place variable declarations
+       before other statements.
+
 2005-05-08  Hrvoje Niksic  <hniksic@xemacs.org>
 
        * html-url.c: Include recur.h.
index bb4dc8c534d22fa7c0ceb861902c601a076f69bb..23a23ca47ac1445a048dc7907435ca20c5e546aa 100644 (file)
@@ -284,7 +284,7 @@ parse_netrc (const char *path)
   premature_token = NULL;
 
   /* While there are lines in the file...  */
-  while ((line = read_whole_line (fp)))
+  while ((line = read_whole_line (fp)) != NULL)
     {
       ln ++;
 
index 31148735dc9fbd0fa13cbbcb45643bf0db43abb6..aa3b59788954d4199875e518614a905cb38c6748 100644 (file)
--- a/src/url.c
+++ b/src/url.c
@@ -874,7 +874,6 @@ url_parse (const char *url, int *error)
       else
        u->url = url_encoded;
     }
-  url_encoded = NULL;
 
   return u;
 
@@ -1067,7 +1066,7 @@ sync_path (struct url *u)
       *p++ = '/';
       memcpy (p, efile, filelen);
       p += filelen;
-      *p++ = '\0';
+      *p = '\0';
     }
 
   u->path = newpath;