From c6031f3287d3adab6acb527e788997d087db4539 Mon Sep 17 00:00:00 2001 From: Stefan Wahren Date: Sun, 20 May 2012 02:39:29 +0200 Subject: [PATCH] Added missing header file --- mbus/mbus-protocol-aux.c | 6 ++++++ mbus/mbus-tcp.c | 1 + 2 files changed, 7 insertions(+) diff --git a/mbus/mbus-protocol-aux.c b/mbus/mbus-protocol-aux.c index 25b5a80..1dc761f 100644 --- a/mbus/mbus-protocol-aux.c +++ b/mbus/mbus-protocol-aux.c @@ -943,6 +943,12 @@ mbus_vif_unit_normalize(int vif, double value, char **unit_out, double *value_ou int mbus_vib_unit_normalize(mbus_value_information_block *vib, double value, char **unit_out, double *value_out, char **quantity_out) { + if (vib == NULL || unit_out == NULL || value_out == NULL || quantity_out == NULL) + { + MBUS_ERROR("%s: Invalid parameter.\n", __PRETTY_FUNCTION__); + return -1; + } + MBUS_DEBUG("%s: vib_unit_normalize - VIF=0x%02X\n", __PRETTY_FUNCTION__, vib->vif); if (vib->vif == 0xFD) /* first type of VIF extention: see table 8.4.4 a */ diff --git a/mbus/mbus-tcp.c b/mbus/mbus-tcp.c index a1fd098..e820090 100644 --- a/mbus/mbus-tcp.c +++ b/mbus/mbus-tcp.c @@ -19,6 +19,7 @@ #include #include +#include #include #include