aboutsummaryrefslogtreecommitdiff
path: root/libmm-glib/mm-common-helpers.c
diff options
context:
space:
mode:
Diffstat (limited to 'libmm-glib/mm-common-helpers.c')
-rw-r--r--libmm-glib/mm-common-helpers.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libmm-glib/mm-common-helpers.c b/libmm-glib/mm-common-helpers.c
index 0245fd52..43fff922 100644
--- a/libmm-glib/mm-common-helpers.c
+++ b/libmm-glib/mm-common-helpers.c
@@ -1686,18 +1686,18 @@ mm_utils_hex2byte (const gchar *hex)
return (a << 4) | b;
}
-gchar *
+guint8 *
mm_utils_hexstr2bin (const gchar *hex,
gssize len,
gsize *out_len,
GError **error)
{
const gchar *ipos = hex;
- g_autofree gchar *buf = NULL;
+ g_autofree guint8 *buf = NULL;
gsize i;
gint a;
- gchar *opos
-;
+ guint8 *opos;
+
if (len < 0)
len = strlen (hex);
@@ -1723,7 +1723,7 @@ mm_utils_hexstr2bin (const gchar *hex,
ipos[0], ipos[1]);
return NULL;
}
- *opos++ = a;
+ *opos++ = (guint8)a;
ipos += 2;
}
*out_len = len / 2;