qmicli: remove unused helpers

This commit is contained in:
Aleksander Morgado 2016-09-06 13:48:22 +02:00
parent cb0f12a10e
commit 38c24b2bdf
2 changed files with 0 additions and 50 deletions

View File

@ -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)

View File

@ -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);