about summary refs log tree commit diff
path: root/sysdeps/generic
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/generic')
-rw-r--r--sysdeps/generic/ifreq.h5
-rw-r--r--sysdeps/generic/utimes.c4
2 files changed, 4 insertions, 5 deletions
diff --git a/sysdeps/generic/ifreq.h b/sysdeps/generic/ifreq.h
index c96d1c8789..f750065cd3 100644
--- a/sysdeps/generic/ifreq.h
+++ b/sysdeps/generic/ifreq.h
@@ -44,10 +44,10 @@ __ifreq (struct ifreq **ifreqs, int *num_ifs, int sockfd)
     }
 
   ifc.ifc_buf = NULL;
-  rq_len = RQ_IFS * sizeof (struct ifreq);
+  rq_len = RQ_IFS * sizeof (struct ifreq) / 2; /* Doubled in the loop.  */
   do
     {
-      ifc.ifc_len = rq_len;
+      ifc.ifc_len = rq_len *= 2;
       ifc.ifc_buf = realloc (ifc.ifc_buf, ifc.ifc_len);
       if (ifc.ifc_buf == NULL || __ioctl (fd, SIOCGIFCONF, &ifc) < 0)
 	{
@@ -60,7 +60,6 @@ __ifreq (struct ifreq **ifreqs, int *num_ifs, int sockfd)
 	  *ifreqs = NULL;
 	  return;
 	}
-      rq_len *= 2;
     }
   while (rq_len < sizeof (struct ifreq) + ifc.ifc_len);
 
diff --git a/sysdeps/generic/utimes.c b/sysdeps/generic/utimes.c
index 67dd16c51b..e4a6f0427f 100644
--- a/sysdeps/generic/utimes.c
+++ b/sysdeps/generic/utimes.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995, 1996, 1997, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1991,95,96,97,2000,02 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -27,7 +27,7 @@ __utimes (file, tvp)
      const char *file;
      const struct timeval tvp[2];
 {
-  if (file == NULL || tvp == NULL)
+  if (file == NULL)
     {
       __set_errno (EINVAL);
       return -1;