summaryrefslogtreecommitdiff
path: root/testing/misc_tools.c
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2014-02-09 09:43:16 -0500
committerirungentoo <irungentoo@gmail.com>2014-02-09 09:43:16 -0500
commit7a2ed25d3622ea92be0a7e00dc0415d9f0e953a4 (patch)
tree500a7d5b78edfef6722a3ff5a76955508574b2b5 /testing/misc_tools.c
parentc498c206ed8eb2bd24031ddbe10956ff8bc9a82d (diff)
Astyled and removed some useless files.
Diffstat (limited to 'testing/misc_tools.c')
-rw-r--r--testing/misc_tools.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/testing/misc_tools.c b/testing/misc_tools.c
index 5e322a90..ad6b2bff 100644
--- a/testing/misc_tools.c
+++ b/testing/misc_tools.c
@@ -37,12 +37,12 @@
37// You are responsible for freeing the return value! 37// You are responsible for freeing the return value!
38uint8_t *hex_string_to_bin(char *hex_string) 38uint8_t *hex_string_to_bin(char *hex_string)
39{ 39{
40 // byte is represented by exactly 2 hex digits, so lenth of binary string 40 // byte is represented by exactly 2 hex digits, so lenth of binary string
41 // is half of that of the hex one. only hex string with even length 41 // is half of that of the hex one. only hex string with even length
42 // valid. the more proper implementation would be to check if strlen(hex_string) 42 // valid. the more proper implementation would be to check if strlen(hex_string)
43 // is odd and return error code if it is. we assume strlen is even. if it's not 43 // is odd and return error code if it is. we assume strlen is even. if it's not
44 // then the last byte just won't be written in 'ret'. 44 // then the last byte just won't be written in 'ret'.
45 size_t i, len = strlen(hex_string)/2; 45 size_t i, len = strlen(hex_string) / 2;
46 uint8_t *ret = malloc(len); 46 uint8_t *ret = malloc(len);
47 char *pos = hex_string; 47 char *pos = hex_string;
48 48