From 6bef3d1d2216234454875052220ca0f477a820b4 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Tue, 6 Nov 2007 03:05:54 +0000 Subject: fbset: fix buglet where we were using wrong pointer readahead: stop using stdio.h *: style fixes --- util-linux/dmesg.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'util-linux/dmesg.c') diff --git a/util-linux/dmesg.c b/util-linux/dmesg.c index 1adb0fc2f..90b327b4c 100644 --- a/util-linux/dmesg.c +++ b/util-linux/dmesg.c @@ -27,7 +27,8 @@ int dmesg_main(int argc, char **argv) len = (flags & 2) ? xatoul_range(size, 2, INT_MAX) : 16384; buf = xmalloc(len); - if (0 > (len = klogctl(3 + (flags & 1), buf, len))) + len = klogctl(3 + (flags & 1), buf, len); + if (len < 0) bb_perror_msg_and_die("klogctl"); // Skip <#> at the start of lines, and make sure we end with a newline. -- cgit v1.2.3