From: asterix Date: Thu, 12 Aug 2010 15:52:54 +0000 (+0000) Subject: Fix kprintf descriptor and typo. X-Git-Tag: 2.6.0~214 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=66852289e528cf501dc5d06830240d99ffac4aac;p=bertos.git Fix kprintf descriptor and typo. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4176 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/bertos/drv/kdebug.c b/bertos/drv/kdebug.c index 9c210343..2125e2a1 100644 --- a/bertos/drv/kdebug.c +++ b/bertos/drv/kdebug.c @@ -274,11 +274,11 @@ void kdump(const void *_buf, size_t len) { const unsigned char *buf = (const unsigned char *)_buf; - kprintf("Dumping buffer at addr [%p], %z bytes", buf, len); + kprintf("Dumping buffer at addr [%p], %zu bytes", buf, len); size_t i=0; while (len--) { - if ((i % 16) == 0) + if ((i++ % 16) == 0) kputs("\n"); kprintf("%02X ", *buf++); }