From dd5b4a9420c9f32faf6a6615e904178310156258 Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Sun, 9 Nov 2014 00:55:57 +0100 Subject: libqmi,message: avoid printing error in stderr --- src/libqmi-glib/qmi-message.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/libqmi-glib/qmi-message.c b/src/libqmi-glib/qmi-message.c index 2c0905e..b38e7ce 100644 --- a/src/libqmi-glib/qmi-message.c +++ b/src/libqmi-glib/qmi-message.c @@ -800,12 +800,8 @@ qmi_message_new_from_raw (GByteArray *raw, /* We need to have read the length reported by the QMUX header (plus the * initial 1-byte marker) */ message_len = GUINT16_FROM_LE (((struct full_message *)raw->data)->qmux.length); - if (raw->len < (message_len + 1)) { - g_printerr ("\ngot '%u' bytes, need '%u' bytes\n", - (guint)raw->len, - (guint)(message_len + 1)); + if (raw->len < (message_len + 1)) return NULL; - } /* Ok, so we should have all the data available already */ self = g_byte_array_sized_new (message_len + 1); -- cgit v1.1