commit 7f7189f54ffab105a294f511a3732f434a773ef8
parent b8d1f834376392a5ce088e719bb3089b32a75e4b
Author: sin <sin@2f30.org>
Date: Mon, 12 Aug 2013 11:29:21 +0100
Fix vertical spacing in dmesg.c
Diffstat:
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/dmesg.c b/dmesg.c
@@ -25,15 +25,19 @@ main(int argc, char *argv[])
n = dmesg_size();
if (n < 0)
eprintf("dmesg_size:");
+
buf = malloc(n);
if (!buf)
eprintf("malloc:");
+
n = dmesg_read(buf, n);
if (n < 0)
eprintf("dmesg_read:");
+
n = dmesg_show(STDOUT_FILENO, buf, n);
if (n < 0)
eprintf("dmesg_show:");
+
free(buf);
return 0;
}