diff options
| author | Andreas Schulz <ats@FreeBSD.org> | 1994-12-27 00:53:14 +0000 |
|---|---|---|
| committer | Andreas Schulz <ats@FreeBSD.org> | 1994-12-27 00:53:14 +0000 |
| commit | 04dc4fc21cab2d2416554814d95f056e170ba850 (patch) | |
| tree | 83fbbc5998b5e43b2873d41902a2b7cc34a4d8c1 | |
| parent | d5a22d48c4d05ad06b6ba45f0fedac096dfef3f0 (diff) | |
Notes
| -rw-r--r-- | usr.bin/rwho/rwho.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/rwho/rwho.c b/usr.bin/rwho/rwho.c index 6191803bc82d..24545cfba98e 100644 --- a/usr.bin/rwho/rwho.c +++ b/usr.bin/rwho/rwho.c @@ -136,7 +136,8 @@ main(argc, argv) mp = myutmp; width = 0; for (i = 0; i < nusers; i++) { - int j = strlen(mp->myhost) + 1 + strlen(mp->myutmp.out_line); + /* append one for the blank and use 8 for the out_line */ + int j = strlen(mp->myhost) + 1 + 8; if (j > width) width = j; mp++; @@ -144,7 +145,7 @@ main(argc, argv) mp = myutmp; for (i = 0; i < nusers; i++) { char buf[BUFSIZ]; - (void)sprintf(buf, "%s:%-8.8s", mp->myhost, mp->myutmp.out_line); + (void)sprintf(buf, "%s:%-.8s", mp->myhost, mp->myutmp.out_line); printf("%-8.8s %-*s %.12s", mp->myutmp.out_name, width, |
