Thread (2 messages) 2 messages, 2 authors, 2015-05-11

Re: rtc: mc13xxx: fix obfuscated and wrong format string

From: Alexandre Belloni <hidden>
Date: 2015-05-11 07:26:19
Also in: lkml

On 20/02/2015 at 14:47:30 +0100, Rasmus Villemoes wrote :
According to C99, %2.s means 'print two spaces' (a precision of
. without following digits or * means 0). The kernel's printf
implementation, however, treats that case as if no precision was
given, but relying on that quirk is rather silly. Also, since no -
(aka left-justify) flag is given, the field with of 2 would then cause
the alarm->enabled case to come out as "o n". Deobfuscate it.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
---
 drivers/rtc/rtc-mc13xxx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Rebased and applied on rtc-next, thanks.


-- 
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help