]> sjero.net Git - wget/blobdiff - src/netrc.c
[svn] Remove K&R support.
[wget] / src / netrc.c
index bb4dc8c534d22fa7c0ceb861902c601a076f69bb..15cf0a68845ddd90bea630fdfecaea216f11737f 100644 (file)
@@ -36,12 +36,7 @@ so, delete this exception statement from your version.  */
 
 #include <stdio.h>
 #include <stdlib.h>
-#ifdef HAVE_STRING_H
-# include <string.h>
-#else
-# include <strings.h>
-#endif
-#include <sys/types.h>
+#include <string.h>
 #include <errno.h>
 
 #include "wget.h"
@@ -49,15 +44,11 @@ so, delete this exception statement from your version.  */
 #include "netrc.h"
 #include "init.h"
 
-#ifndef errno
-extern int errno;
-#endif
-
 #define NETRC_FILE_NAME ".netrc"
 
 acc_t *netrc_list;
 
-static acc_t *parse_netrc PARAMS ((const char *));
+static acc_t *parse_netrc (const char *);
 
 /* Return the correct user and password, given the host, user (as
    given in the URL), and password (as given in the URL).  May return
@@ -284,7 +275,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 ++;