summaryrefslogtreecommitdiff
path: root/testing/misc_tools.c
diff options
context:
space:
mode:
authorCoren[m] <Break@Ocean>2013-09-16 10:37:22 +0200
committerCoren[m] <Break@Ocean>2013-09-16 10:37:22 +0200
commitab2805a23baad56d9efddada992d60fab3ed22af (patch)
treebb6e3ebe5c0f107d38920b8de363888c2ed652b4 /testing/misc_tools.c
parent7a69f2de287747eb31e143fd502951dd7d4ab2de (diff)
Fix warnings of -Wall -Wextra
Diffstat (limited to 'testing/misc_tools.c')
-rw-r--r--testing/misc_tools.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/testing/misc_tools.c b/testing/misc_tools.c
index 81f5ed8a..d05c88f6 100644
--- a/testing/misc_tools.c
+++ b/testing/misc_tools.c
@@ -36,10 +36,9 @@
36/* TODO: rewrite */ 36/* TODO: rewrite */
37unsigned char *hex_string_to_bin(char hex_string[]) 37unsigned char *hex_string_to_bin(char hex_string[])
38{ 38{
39 size_t len = strlen(hex_string); 39 size_t i, len = strlen(hex_string);
40 unsigned char *val = malloc(len); 40 unsigned char *val = malloc(len);
41 char *pos = hex_string; 41 char *pos = hex_string;
42 int i;
43 42
44 for (i = 0; i < len; ++i, pos += 2) 43 for (i = 0; i < len; ++i, pos += 2)
45 sscanf(pos, "%2hhx", &val[i]); 44 sscanf(pos, "%2hhx", &val[i]);