summaryrefslogtreecommitdiffstats
path: root/vespalib/src/tests
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2018-05-11 10:48:42 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2018-05-11 10:48:42 +0000
commit87a29dd8820b52aa444b8408fd18c576d5ec98da (patch)
tree70e85cdb2e59e092c8a5c1862defd17c061731e8 /vespalib/src/tests
parentfa5d559d9dafe248712bd98e6cfcbb91b2b20f59 (diff)
Use memcpy when not working with strings
Diffstat (limited to 'vespalib/src/tests')
-rw-r--r--vespalib/src/tests/websocket/websocket_test.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/vespalib/src/tests/websocket/websocket_test.cpp b/vespalib/src/tests/websocket/websocket_test.cpp
index 204ab8e0842..e0f96019ba5 100644
--- a/vespalib/src/tests/websocket/websocket_test.cpp
+++ b/vespalib/src/tests/websocket/websocket_test.cpp
@@ -84,7 +84,7 @@ TEST("require that basic reserve/commit/obtain/evict buffer cycle works") {
TEST("require that buffer moves contained data when more space is needed") {
Buffer buffer;
- strncpy(buffer.reserve(3), "xyz", 3);
+ memcpy(buffer.reserve(3), "xyz", 3);
buffer.commit(3);
EXPECT_EQUAL('x', *buffer.obtain());
buffer.evict(1);