summaryrefslogtreecommitdiff
path: root/src/libmbim-glib/mbim-utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libmbim-glib/mbim-utils.c')
-rw-r--r--src/libmbim-glib/mbim-utils.c36
1 files changed, 0 insertions, 36 deletions
diff --git a/src/libmbim-glib/mbim-utils.c b/src/libmbim-glib/mbim-utils.c
index a7541ae..f360542 100644
--- a/src/libmbim-glib/mbim-utils.c
+++ b/src/libmbim-glib/mbim-utils.c
@@ -39,42 +39,6 @@
**/
/*****************************************************************************/
-
-gchar *
-__mbim_utils_str_hex (gconstpointer mem,
- gsize size,
- gchar delimiter)
-{
- const guint8 *data = mem;
- gsize i;
- gsize j;
- gsize new_str_length;
- gchar *new_str;
-
- /* Get new string length. If input string has N bytes, we need:
- * - 1 byte for last NUL char
- * - 2N bytes for hexadecimal char representation of each byte...
- * - N-1 bytes for the separator ':'
- * So... a total of (1+2N+N-1) = 3N bytes are needed... */
- new_str_length = 3 * size;
-
- /* Allocate memory for new array and initialize contents to NUL */
- new_str = g_malloc0 (new_str_length);
-
- /* Print hexadecimal representation of each byte... */
- for (i = 0, j = 0; i < size; i++, j += 3) {
- /* Print character in output string... */
- snprintf (&new_str[j], 3, "%02X", data[i]);
- /* And if needed, add separator */
- if (i != (size - 1) )
- new_str[j + 2] = delimiter;
- }
-
- /* Set output string */
- return new_str;
-}
-
-/*****************************************************************************/
gboolean
__mbim_user_allowed (uid_t uid,
GError **error)