Browse Source

[2535] Replace 0x30 with '0' to make code more readable

Mukund Sivaraman 12 years ago
parent
commit
c6c569cae9
1 changed files with 3 additions and 3 deletions
  1. 3 3
      src/lib/dns/rdata/generic/detail/txt_like.h

+ 3 - 3
src/lib/dns/rdata/generic/detail/txt_like.h

@@ -192,9 +192,9 @@ public:
                  ++c_it) {
                  ++c_it) {
                 if ((*c_it < 0x20) || (*c_it >= 0x7f)) {
                 if ((*c_it < 0x20) || (*c_it >= 0x7f)) {
                     s.push_back('\\');
                     s.push_back('\\');
-                    s.push_back(0x30 + ((*c_it / 100) % 10));
-                    s.push_back(0x30 + ((*c_it / 10) % 10));
-                    s.push_back(0x30 + (*c_it % 10));
+                    s.push_back('0' + ((*c_it / 100) % 10));
+                    s.push_back('0' + ((*c_it / 10) % 10));
+                    s.push_back('0' + (*c_it % 10));
                     continue;
                     continue;
                 }
                 }
                 if ((*c_it == '"') || (*c_it == ';') || (*c_it == '\\')) {
                 if ((*c_it == '"') || (*c_it == ';') || (*c_it == '\\')) {