From: Samuel Thibault Date: Mon, 10 Feb 2025 19:09:20 +0000 (+0100) Subject: hurd: Drop useless buffer initialization in ttyname* X-Git-Tag: glibc-2.42~510 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=659fa18dde83be7e723dcdc1624a3a1f2c180665;p=thirdparty%2Fglibc.git hurd: Drop useless buffer initialization in ttyname* The RPC stub will write a string anyway. --- 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)