Better handling of collision with AIX stpncpy() function.
[gnulib.git] / lib / mountlist.c
index a2c1c25..9051e81 100644 (file)
 
 #include <stdio.h>
 #include <sys/types.h>
+#include <stdlib.h>
+#include <string.h>
 
-
-#ifdef STDC_HEADERS
-# include <stdlib.h>
-#else
-void free ();
-#endif
-#if defined STDC_HEADERS || defined HAVE_STRING_H
-# include <string.h>
-#else
-# include <strings.h>
-#endif
 #include "xalloc.h"
 
 #ifndef strstr
@@ -621,6 +612,7 @@ read_filesystem_list (int need_fs_type)
 
     if (ferror (fp))
       {
+       /* The last fread() call must have failed.  */
        int saved_errno = errno;
        fclose (fp);
        errno = saved_errno;