From 38c24b2bdfe4018d7864078226cbd70cd45d62d2 Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Tue, 6 Sep 2016 13:48:22 +0200 Subject: qmicli: remove unused helpers --- src/qmicli/qmicli-helpers.c | 46 --------------------------------------------- src/qmicli/qmicli-helpers.h | 4 ---- 2 files changed, 50 deletions(-) diff --git a/src/qmicli/qmicli-helpers.c b/src/qmicli/qmicli-helpers.c index ec72909..d1bc3ca 100644 --- a/src/qmicli/qmicli-helpers.c +++ b/src/qmicli/qmicli-helpers.c @@ -576,52 +576,6 @@ qmicli_read_uint_from_string (const gchar *str, return FALSE; } -gboolean -qmicli_read_uint16_from_string (const gchar *str, - guint16 *out) -{ - gulong num; - - if (!str || !str[0]) - return FALSE; - - for (num = 0; str[num]; num++) { - if (!g_ascii_isdigit (str[num])) - return FALSE; - } - - errno = 0; - num = strtoul (str, NULL, 10); - if (!errno && num <= G_MAXUINT16) { - *out = (guint16)num; - return TRUE; - } - return FALSE; -} - -gboolean -qmicli_read_uint8_from_string (const gchar *str, - guint8 *out) -{ - gulong num; - - if (!str || !str[0]) - return FALSE; - - for (num = 0; str[num]; num++) { - if (!g_ascii_isdigit (str[num])) - return FALSE; - } - - errno = 0; - num = strtoul (str, NULL, 10); - if (!errno && num <= G_MAXUINT8) { - *out = (guint8)num; - return TRUE; - } - return FALSE; -} - gchar * qmicli_get_supported_messages_list (const guint8 *data, gsize len) diff --git a/src/qmicli/qmicli-helpers.h b/src/qmicli/qmicli-helpers.h index 0bf9e76..f5cf1ff 100644 --- a/src/qmicli/qmicli-helpers.h +++ b/src/qmicli/qmicli-helpers.h @@ -69,10 +69,6 @@ gboolean qmicli_read_non_empty_string (const gchar *str, gchar **out); gboolean qmicli_read_uint_from_string (const gchar *str, guint *out); -gboolean qmicli_read_uint16_from_string (const gchar *str, - guint16 *out); -gboolean qmicli_read_uint8_from_string (const gchar *str, - guint8 *out); gboolean qmicli_read_yes_no_from_string (const gchar *str, gboolean *out); -- cgit v1.2.3