about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/gethostid.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/gethostid.c')
-rw-r--r--sysdeps/unix/sysv/linux/gethostid.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/sysdeps/unix/sysv/linux/gethostid.c b/sysdeps/unix/sysv/linux/gethostid.c
index 5ef330b958..c7f894033d 100644
--- a/sysdeps/unix/sysv/linux/gethostid.c
+++ b/sysdeps/unix/sysv/linux/gethostid.c
@@ -101,11 +101,8 @@ gethostid ()
     if (herr != NETDB_INTERNAL || errno != ERANGE)
       return 0;
     else
-      {
-	/* Enlarge buffer.  */
-	buflen *= 2;
-	buffer = __alloca (buflen);
-      }
+      /* Enlarge buffer.  */
+      buffer = extend_alloca (buffer, buflen, 2 * buflen);
 
   in.s_addr = 0;
   memcpy (&in, hp->h_addr,