From f495cc1e93710c233292a503720ec235a61b685c Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Wed, 18 Mar 2020 17:32:50 +0100 Subject: Applied official linux kernel code style guidelines Due to my change to vim and the clang-format plugin this was needed! --- src/kernel/lib/stdlib/htoi.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'src/kernel/lib/stdlib/htoi.c') diff --git a/src/kernel/lib/stdlib/htoi.c b/src/kernel/lib/stdlib/htoi.c index cc77e16..dcc4b63 100644 --- a/src/kernel/lib/stdlib/htoi.c +++ b/src/kernel/lib/stdlib/htoi.c @@ -4,20 +4,20 @@ int htoi(char *str) { - size_t s_str = strlen(str); + size_t s_str = strlen(str); - size_t i = 0; - int ret = 0; - for (; i < s_str; i++) { - char c = str[i]; - int aux = 0; - if (c >= '0' && c <= '9') - aux = c - '0'; - else if (c >= 'A' && c <= 'F') - aux = (c - 'A') + 10; + size_t i = 0; + int ret = 0; + for (; i < s_str; i++) { + char c = str[i]; + int aux = 0; + if (c >= '0' && c <= '9') + aux = c - '0'; + else if (c >= 'A' && c <= 'F') + aux = (c - 'A') + 10; - ret += aux * pow(16, (int) ((s_str - i) - 1)); - } + ret += aux * pow(16, (int)((s_str - i) - 1)); + } - return ret; + return ret; } \ No newline at end of file -- cgit v1.2.3