summaryrefslogtreecommitdiffstats
path: root/plugins/check_load.c
diff options
context:
space:
mode:
authorAnders Kaseorg <andersk@mit.edu>2012-06-29 00:57:48 -0400
committerHolger Weiss <holger@zedat.fu-berlin.de>2012-06-29 13:39:11 +0200
commit028d50d6f99e647a325a0a68303016382c4bbdc9 (patch)
tree1d9a14635602169d137409becfa108cd6bdb371c /plugins/check_load.c
parent9976876584e5a1df6e1c9315212c3d274df7a12e (diff)
downloadmonitoring-plugins-028d50d6f99e647a325a0a68303016382c4bbdc9.tar.gz
Die when asprintf fails
Fixes many instances of warning: ignoring return value of 'asprintf', declared with attribute warn_unused_result [-Wunused-result] Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Diffstat (limited to 'plugins/check_load.c')
-rw-r--r--plugins/check_load.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/check_load.c b/plugins/check_load.c
index 1bdb06aa..780ffffe 100644
--- a/plugins/check_load.c
+++ b/plugins/check_load.c
@@ -186,7 +186,7 @@ main (int argc, char **argv)
186 /* we got this far, so assume OK until we've measured */ 186 /* we got this far, so assume OK until we've measured */
187 result = STATE_OK; 187 result = STATE_OK;
188 188
189 asprintf(&status_line, _("load average: %.2f, %.2f, %.2f"), la1, la5, la15); 189 xasprintf(&status_line, _("load average: %.2f, %.2f, %.2f"), la1, la5, la15);
190 190
191 for(i = 0; i < 3; i++) { 191 for(i = 0; i < 3; i++) {
192 if(la[i] > cload[i]) { 192 if(la[i] > cload[i]) {