Fix getttyname on Linux when called for different devices.
commitd94760f944cebf05b239dd0b65c3b40a5577013b
authorUlrich Drepper <drepper@redhat.com>
Thu, 29 Oct 2009 18:02:34 +0000 (29 11:02 -0700)
committerUlrich Drepper <drepper@redhat.com>
Thu, 29 Oct 2009 18:02:34 +0000 (29 11:02 -0700)
tree8fc13b428f505fc948b55cc9bc92ea711d58f9a2
parent8d55628106730c5e318fa3673b69588509d983f2
Fix getttyname on Linux when called for different devices.

If a second call to ttyname is not for the same type of device (e.g.,
serial vs ptty) the prefix of the buffer was wrong.  Don't rely on
the previous content, always reinitialize it.
ChangeLog
sysdeps/unix/sysv/linux/ttyname.c