sbase

suckless unix tools
git clone git://git.2f30.org/sbase
Log | Files | Refs | README | LICENSE

commit eddb6d39a56c1036e2fb15679b8e414f4ea7568a
parent 918269e057952cad6462417fad523390f5805647
Author: sin <sin@2f30.org>
Date:   Mon,  5 Aug 2013 16:12:01 +0100

Ignore tilde in ut_line

Diffstat:
Mwho.c | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/who.c b/who.c @@ -33,7 +33,8 @@ main(int argc, char **argv) eprintf("fopen:"); } while(fread(&usr, sizeof(usr), 1, ufp) == 1) { - if (!*usr.ut_name || !*usr.ut_line) + if (!*usr.ut_name || !*usr.ut_line || + usr.ut_line[0] == '~') continue; if (mflag && strcmp(usr.ut_line, strrchr(ttyname(STDIN_FILENO), '/') + 1))