svn commit: r194555 - head/usr.sbin/getpmac
Robert Watson
rwatson at FreeBSD.org
Sat Jun 20 20:22:13 UTC 2009
Author: rwatson
Date: Sat Jun 20 20:22:11 2009
New Revision: 194555
URL: http://svn.freebsd.org/changeset/base/194555
Log:
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
Modified:
head/usr.sbin/getpmac/getpmac.c
Modified: head/usr.sbin/getpmac/getpmac.c
==============================================================================
--- head/usr.sbin/getpmac/getpmac.c Sat Jun 20 19:09:41 2009 (r194554)
+++ head/usr.sbin/getpmac/getpmac.c Sat Jun 20 20:22:11 2009 (r194555)
@@ -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);
More information about the svn-src-head
mailing list