Commit 0f5f29d1fa7dc304bc8be4f0d73771d9501c2bcd

Con Kolivas 2014-06-12T12:41:51

Allow zero length strings to be passed to valid_hex

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/util.c b/util.c
index 60afe8f..683ce09 100644
--- a/util.c
+++ b/util.c
@@ -730,10 +730,6 @@ static bool _valid_hex(char *s, const char *file, const char *func, const int li
 		return ret;
 	}
 	len = strlen(s);
-	if (unlikely(!len)) {
-		applog(LOG_ERR, "Zero length string passed to valid_hex from"IN_FMT_FFL, file, func, line);
-		return ret;
-	}
 	for (i = 0; i < len; i++) {
 		unsigned char idx = s[i];