diff options
author | rwatson <rwatson@FreeBSD.org> | 2009-06-20 20:22:11 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2009-06-20 20:22:11 +0000 |
commit | a2017ad896da15f833ab0425cd951f279fab9a98 (patch) | |
tree | 28a158a243f290e8cfad7ffad6cbb9ef38d13cb1 /usr.sbin/getpmac | |
parent | d10b0f80a775fd6f010a2ce8adffcf4f33a8d04a (diff) | |
download | FreeBSD-src-a2017ad896da15f833ab0425cd951f279fab9a98.zip FreeBSD-src-a2017ad896da15f833ab0425cd951f279fab9a98.tar.gz |
If the label being printed by getpmac(8) is empty, then don't print a
carriage return.
Obtained from: TrustedBSD Project
MFC after: 3 days
Diffstat (limited to 'usr.sbin/getpmac')
-rw-r--r-- | usr.sbin/getpmac/getpmac.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/getpmac/getpmac.c b/usr.sbin/getpmac/getpmac.c index 6e81558..216b539 100644 --- a/usr.sbin/getpmac/getpmac.c +++ b/usr.sbin/getpmac/getpmac.c @@ -119,7 +119,8 @@ main(int argc, char *argv[]) exit(EX_DATAERR); } - printf("%s\n", string); + if (strlen(string) > 0) + printf("%s\n", string); mac_free(label); free(string); |