From f7be137d94b1ecfb559a96ca8182ced812390107 Mon Sep 17 00:00:00 2001
From: Filip Matusiak <filip.matusiak@iopsys.eu>
Date: Tue, 20 May 2025 12:04:18 +0200
Subject: [PATCH] Remove local implementation of strtob and use libwifi instead

---
 src/utils/utils.c | 19 -------------------
 src/utils/utils.h |  1 -
 2 files changed, 20 deletions(-)

diff --git a/src/utils/utils.c b/src/utils/utils.c
index f6487c56e..a15324608 100644
--- a/src/utils/utils.c
+++ b/src/utils/utils.c
@@ -69,25 +69,6 @@ int hex2byte(const char *hex)
 	return (a << 4) | b;
 }
 
-/* convert hex string to byte array */
-unsigned char *strtob(char *str, int len, unsigned char *bytes)
-{
-	size_t i;
-
-	for (i = 0; i < len; i++) {
-		int a;
-
-		a = hex2byte(str);
-		if (a < 0)
-			return NULL;
-
-		str += 2;
-		bytes[i] = a;
-	}
-
-	return bytes;
-}
-
 /* Convert "00:11:22:33:44:55" --> \x001122334455 */
 unsigned char *hwaddr_aton(const char *macstr, unsigned char *mac)
 {
diff --git a/src/utils/utils.h b/src/utils/utils.h
index c81f77295..5fb2c52fb 100644
--- a/src/utils/utils.h
+++ b/src/utils/utils.h
@@ -35,7 +35,6 @@ int hwaddr_from_ip(char *ifname, char *ipstr, unsigned char *hw);
 
 /* bytes from-to hexstring helper functions */
 int hex2byte(const char *hex);
-unsigned char *strtob(char *str, int len, unsigned char *bytes);
 
 /* utility wrappers over json-c functions */
 int json_get_bool(struct json_object *object, const char *key);
-- 
GitLab