summaryrefslogtreecommitdiff
path: root/cpp/src/tests/Uuid.cpp
diff options
context:
space:
mode:
authorAndrew Stitcher <astitcher@apache.org>2012-05-24 04:14:37 +0000
committerAndrew Stitcher <astitcher@apache.org>2012-05-24 04:14:37 +0000
commit985967e9cbea31050df52c09b4779671cf8da365 (patch)
tree0921a16a4102cce2f35519577add6703b00f013c /cpp/src/tests/Uuid.cpp
parentafadf76e64d735239b803b1aef7018bb17c8b11e (diff)
downloadqpid-python-985967e9cbea31050df52c09b4779671cf8da365.tar.gz
NO-JIRA: Remove final vestiges of non-portable alloca().
Fixed unit_test changes to avoid incorrect array initialisation. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1342135 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/tests/Uuid.cpp')
-rw-r--r--cpp/src/tests/Uuid.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/cpp/src/tests/Uuid.cpp b/cpp/src/tests/Uuid.cpp
index d7d1f00e3c..aa9580e25e 100644
--- a/cpp/src/tests/Uuid.cpp
+++ b/cpp/src/tests/Uuid.cpp
@@ -19,7 +19,6 @@
#include "qpid/framing/Uuid.h"
#include "qpid/framing/Buffer.h"
#include "qpid/types/Uuid.h"
-#include "qpid/sys/alloca.h"
#include "unit_test.h"
@@ -97,12 +96,12 @@ QPID_AUTO_TEST_CASE(testUuidIOstream) {
}
QPID_AUTO_TEST_CASE(testUuidEncodeDecode) {
- char* buff = static_cast<char*>(::alloca(Uuid::size()));
- Buffer wbuf(buff, Uuid::size());
+ std::vector<char> buff(Uuid::size());
+ Buffer wbuf(&buff[0], Uuid::size());
Uuid uuid(sample.c_array());
uuid.encode(wbuf);
- Buffer rbuf(buff, Uuid::size());
+ Buffer rbuf(&buff[0], Uuid::size());
Uuid decoded;
decoded.decode(rbuf);
BOOST_CHECK_EQUAL(string(sample.begin(), sample.end()),