Summary: | kvprintf(9) and friends usage examples: trailing '\n' in bitfield argument is wrong (will be treated as bit 10) | ||||||
---|---|---|---|---|---|---|---|
Product: | Base System | Reporter: | Alexey Dokuchaev <danfe> | ||||
Component: | misc | Assignee: | freebsd-bugs (Nobody) <bugs> | ||||
Status: | Closed FIXED | ||||||
Severity: | Affects Only Me | ||||||
Priority: | --- | ||||||
Version: | CURRENT | ||||||
Hardware: | Any | ||||||
OS: | Any | ||||||
Attachments: |
|
A commit references this bug: Author: danfe Date: Fri Jan 23 07:30:59 UTC 2015 New revision: 277560 URL: https://svnweb.freebsd.org/changeset/base/277560 Log: 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 Changes: head/lib/libstand/libstand.3 head/lib/libstand/printf.c head/share/man/man9/printf.9 head/sys/kern/subr_prf.c Committed as 277560. |
Created attachment 149399 [details] %b format usage fix Consider attached patch, which fixes usage example in kvprintf(9) and friends: trailing '\n' in bitfield argument looks 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 examples).