The RPC stub will write a string anyway.
---
 sysdeps/mach/hurd/ttyname.c   | 1 -
 sysdeps/mach/hurd/ttyname_r.c | 1 -
 2 files changed, 2 deletions(-)

diff --git a/sysdeps/mach/hurd/ttyname.c b/sysdeps/mach/hurd/ttyname.c
index 4c51492311..62c3bf7615 100644
--- a/sysdeps/mach/hurd/ttyname.c
+++ b/sysdeps/mach/hurd/ttyname.c
@@ -29,7 +29,6 @@ ttyname (int fd)
   error_t err;
   static char nodename[1024];  /* XXX */
 
-  nodename[0] = '\0';
   if (err = HURD_DPORT_USE (fd, __term_get_nodename (port, nodename)))
     {
       if (err == MIG_BAD_ID || err == EOPNOTSUPP)
diff --git a/sysdeps/mach/hurd/ttyname_r.c b/sysdeps/mach/hurd/ttyname_r.c
index 4abceb6adc..f0e3f65dbe 100644
--- a/sysdeps/mach/hurd/ttyname_r.c
+++ b/sysdeps/mach/hurd/ttyname_r.c
@@ -31,7 +31,6 @@ __ttyname_r (int fd, char *buf, size_t buflen)
   char nodename[1024]; /* XXX */
   size_t len;
 
-  nodename[0] = '\0';
   if (err = HURD_DPORT_USE (fd, __term_get_nodename (port, nodename)))
     {
       if (err == MIG_BAD_ID || err == EOPNOTSUPP)
-- 
2.47.2


Reply via email to