]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Return ENAMETOOLONG if buffer is too small.
authorUlrich Drepper <drepper@redhat.com>
Tue, 21 Jul 1998 12:17:51 +0000 (12:17 +0000)
committerUlrich Drepper <drepper@redhat.com>
Tue, 21 Jul 1998 12:17:51 +0000 (12:17 +0000)
sysdeps/unix/sysv/linux/gethostname.c

index 8a01fff073f379ec56dfcf166e42522020428b64..a7c707b0991044c9d294357441aa3bc2d2520fcc 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995, 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995, 1996, 1998 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
@@ -42,7 +42,7 @@ __gethostname (name, len)
 
   if (strlen (buf.nodename) + 1 > len)
     {
-      __set_errno (EINVAL);
+      __set_errno (ENAMETOOLONG);
       return -1;
     }