summaryrefslogtreecommitdiff
path: root/str.c
diff options
context:
space:
mode:
Diffstat (limited to 'str.c')
-rw-r--r--str.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/str.c b/str.c
index 1d3e7ac..9ab94ca 100644
--- a/str.c
+++ b/str.c
@@ -143,6 +143,7 @@ int str2mac(const char *str, uint8_t *mac, size_t len)
if (len < 6)
return -ENOSPC;
+ errno = 0;
count = sscanf(str, "%02X:%02X:%02X:%02X:%02X:%02X",
&tmp[0], &tmp[1], &tmp[2], &tmp[3], &tmp[4], &tmp[5]);