summaryrefslogtreecommitdiffstats
path: root/src/storage_number.c
diff options
context:
space:
mode:
authorLennart Weller <lhw@ring0.de>2016-05-25 10:36:24 +0000
committerLennart Weller <lhw@ring0.de>2016-05-25 10:36:24 +0000
commitb4f64f72a3e4bf590c60b0cbd6cd365aa1a58542 (patch)
treee6706c727a1fedb44da614453ad3e429a7403a9b /src/storage_number.c
parentImported Upstream version 1.1.0 (diff)
downloadnetdata-b4f64f72a3e4bf590c60b0cbd6cd365aa1a58542.tar.xz
netdata-b4f64f72a3e4bf590c60b0cbd6cd365aa1a58542.zip
Imported Upstream version 1.2.0upstream/1.2.0
Diffstat (limited to 'src/storage_number.c')
-rw-r--r--src/storage_number.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/storage_number.c b/src/storage_number.c
index 225cf0348..b5c5f4067 100644
--- a/src/storage_number.c
+++ b/src/storage_number.c
@@ -129,7 +129,7 @@ static char *print_calculated_number_lu_r(char *str, unsigned long uvalue) {
char *wstr = str;
// print each digit
- do *wstr++ = (char)(48 + (uvalue % 10)); while(uvalue /= 10);
+ do *wstr++ = (char)('0' + (uvalue % 10)); while(uvalue /= 10);
return wstr;
}
@@ -137,7 +137,7 @@ static char *print_calculated_number_llu_r(char *str, unsigned long long uvalue)
char *wstr = str;
// print each digit
- do *wstr++ = (char)(48 + (uvalue % 10)); while((uvalue /= 10) && uvalue > (unsigned long long)0xffffffff);
+ do *wstr++ = (char)('0' + (uvalue % 10)); while((uvalue /= 10) && uvalue > (unsigned long long)0xffffffff);
if(uvalue) return print_calculated_number_lu_r(wstr, uvalue);
return wstr;
}
@@ -164,7 +164,7 @@ int print_calculated_number(char *str, calculated_number value)
else
wstr = print_calculated_number_lu_r(str, uvalue);
#else
- do *wstr++ = (char)(48 + (uvalue % 10)); while(uvalue /= 10);
+ do *wstr++ = (char)('0' + (uvalue % 10)); while(uvalue /= 10);
#endif
// make sure we have 6 bytes at least