From faa52bdcc0221de2d8fae950e409a8ac5e05bfcd Mon Sep 17 00:00:00 2001 From: Aaron Marcher Date: Wed, 28 Mar 2018 19:46:27 +0200 Subject: Format error messages properly Make use of strerror(errno) and format all errors equally: function ['parameters']: error message --- components/load_avg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'components/load_avg.c') diff --git a/components/load_avg.c b/components/load_avg.c index 5e1571d..526dc71 100644 --- a/components/load_avg.c +++ b/components/load_avg.c @@ -10,7 +10,7 @@ load_avg(const char *fmt) double avgs[3]; if (getloadavg(avgs, 3) < 0) { - fprintf(stderr, "Failed to get the load avg"); + fprintf(stderr, "getloadavg: Could not obtain load average.\n"); return NULL; } -- cgit v1.2.3