Signed-off-by: Sami Kerola <kerolasa@xxxxxx> --- sys-utils/dmesg.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys-utils/dmesg.c b/sys-utils/dmesg.c index 147a3ff..f95609f 100644 --- a/sys-utils/dmesg.c +++ b/sys-utils/dmesg.c @@ -612,7 +612,7 @@ static void safe_fwrite(const char *buf, size_t size, FILE *out) for (i = 0; i < size; i++) { const char *p = buf + i; int rc, hex = 0; - size_t len = 1; + size_t len; #ifdef HAVE_WIDECHAR wchar_t wc; @@ -629,6 +629,7 @@ static void safe_fwrite(const char *buf, size_t size, FILE *out) } i += len - 1; #else + len = 1; if (!isprint((unsigned int) *p) && !isspace((unsigned int) *p)) /* non-printable */ hex = 1; -- 2.0.1 -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html