]> sjero.net Git - wget/blobdiff - src/netrc.c
[svn] Retired the `boolean' type. Renamed FREE_MAYBE to xfree_null and moved the
[wget] / src / netrc.c
index b358936a7d8e11d9814193f13d8612741e490ee4..af2b2b492a839d50720534a3775a87e10f85a02b 100644 (file)
@@ -15,7 +15,17 @@ GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
 along with Wget; if not, write to the Free Software
-Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+In addition, as a special exception, the Free Software Foundation
+gives permission to link the code of its release of Wget with the
+OpenSSL project's "OpenSSL" library (or with modified versions of it
+that use the same license as the "OpenSSL" library), and distribute
+the linked executables.  You must obey the GNU General Public License
+in all respects for all of the code used other than "OpenSSL".  If you
+modify this file, you may extend this exception to your version of the
+file, but you are not obligated to do so.  If you do not wish to do
+so, delete this exception statement from your version.  */
 
 /* This file used to be kept in synch with the code in Fetchmail, but
    the latter has diverged since.  */
@@ -235,7 +245,8 @@ maybe_add_to_list (acc_t **newentry, acc_t **list)
    null-terminated string once character to the left.
    Used in processing \ and " constructs in the netrc file */
 static void
-shift_left(char *string){
+shift_left(char *string)
+{
   char *p;
   
   for (p=string; *p; ++p)
@@ -317,9 +328,13 @@ parse_netrc (const char *path)
            p ++;
          }
 
-         /* if field was quoted, squash the trailing quotation mark */
+         /* If field was quoted, squash the trailing quotation mark
+            and reset quote flag.  */
          if (quote)
-           shift_left(p);
+           {
+             shift_left (p);
+             quote = 0;
+           }
 
          /* Null-terminate the token, if it isn't already.  */
          if (*p)
@@ -440,9 +455,9 @@ free_netrc(acc_t *l)
   while (l)
     {
       t = l->next;
-      FREE_MAYBE (l->acc);
-      FREE_MAYBE (l->passwd);
-      FREE_MAYBE (l->host);
+      xfree_null (l->acc);
+      xfree_null (l->passwd);
+      xfree_null (l->host);
       xfree (l);
       l = t;
     }