Skip to content
Snippets Groups Projects
Commit f7be137d authored by Filip Matusiak's avatar Filip Matusiak
Browse files

Remove local implementation of strtob and use libwifi instead

parent 3a5d3272
No related branches found
No related tags found
No related merge requests found
......@@ -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)
{
......
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment