summaryrefslogtreecommitdiffstats
path: root/lib/libstand/printf.c
diff options
context:
space:
mode:
authordanfe <danfe@FreeBSD.org>2015-01-23 07:30:57 +0000
committerdanfe <danfe@FreeBSD.org>2015-01-23 07:30:57 +0000
commitd20a416d73ddf444f93a59ee260047f046a1884a (patch)
tree7261049881704c1c328ee01cb2b8bbdac0b51790 /lib/libstand/printf.c
parent920fd43d82ba6bcbf7d076a3736808df4e8d6b39 (diff)
downloadFreeBSD-src-d20a416d73ddf444f93a59ee260047f046a1884a.zip
FreeBSD-src-d20a416d73ddf444f93a59ee260047f046a1884a.tar.gz
Fix usage example in kvprintf(9) and its copy in libstand(3): trailing '\n'
in bitfield argument is wrong, as it will be treated as bit 10, causing any code printing >=10 bits with bit 10 on as having a trailing comma. Newline (intended one) should be part of the format string (already present in the examples). Also fix grammar and kill EOL whitespace in comment while here. PR: 195005 Approved by: bdrewery
Diffstat (limited to 'lib/libstand/printf.c')
-rw-r--r--lib/libstand/printf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libstand/printf.c b/lib/libstand/printf.c
index 157b327..fef5341 100644
--- a/lib/libstand/printf.c
+++ b/lib/libstand/printf.c
@@ -187,7 +187,7 @@ ksprintn(char *nbuf, uintmax_t num, int base, int *lenp, int upper)
* the next characters (up to a control character, i.e. a character <= 32),
* give the name of the register. Thus:
*
- * kvprintf("reg=%b\n", 3, "\10\2BITTWO\1BITONE\n");
+ * kvprintf("reg=%b\n", 3, "\10\2BITTWO\1BITONE");
*
* would produce output:
*
@@ -500,7 +500,7 @@ number:
while (percent < fmt)
PCHAR(*percent++);
/*
- * Since we ignore an formatting argument it is no
+ * Since we ignore a formatting argument it is no
* longer safe to obey the remaining formatting
* arguments as the arguments will no longer match
* the format specs.
OpenPOWER on IntegriCloud