summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/util/hashing.c
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2015-04-12 08:05:15 +0200
committer Miodrag Milanovic <mmicko@gmail.com>2015-04-12 08:05:43 +0200
commit7faba31b1b8dcd6caa5f1b651d2693106de08d35 (patch)
treec528d5479eee247ee5305df53a298a09b594fccc /src/lib/util/hashing.c
parent15a464dac99052edc0645374a77ecef8d1a65b0d (diff)
There is no implicit conversion to char* in std::string (nw)
Diffstat (limited to 'src/lib/util/hashing.c')
-rw-r--r--src/lib/util/hashing.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/util/hashing.c b/src/lib/util/hashing.c
index a29818910c2..d7be3af1427 100644
--- a/src/lib/util/hashing.c
+++ b/src/lib/util/hashing.c
@@ -84,7 +84,7 @@ const char *sha1_t::as_string(astring &buffer) const
buffer.reset();
for (int i = 0; i < ARRAY_LENGTH(m_raw); i++)
buffer.catformat("%02x", m_raw[i]);
- return buffer;
+ return buffer.c_str();
}
@@ -127,7 +127,7 @@ const char *md5_t::as_string(astring &buffer) const
buffer.reset();
for (int i = 0; i < ARRAY_LENGTH(m_raw); i++)
buffer.catformat("%02x", m_raw[i]);
- return buffer;
+ return buffer.c_str();
}
@@ -168,7 +168,7 @@ bool crc32_t::from_string(const char *string, int length)
const char *crc32_t::as_string(astring &buffer) const
{
- return buffer.format("%08x", m_raw);
+ return buffer.format("%08x", m_raw).c_str();
}
@@ -220,7 +220,7 @@ bool crc16_t::from_string(const char *string, int length)
const char *crc16_t::as_string(astring &buffer) const
{
- return buffer.format("%04x", m_raw);
+ return buffer.format("%04x", m_raw).c_str();
}