Coverity:CID165843: Unitialised member in SystemEventConsumerMessage 93/76393/3
authorJim Walker <jim@couchbase.com>
Thu, 6 Apr 2017 12:05:04 +0000 (13:05 +0100)
committerDave Rigby <daver@couchbase.com>
Thu, 6 Apr 2017 20:23:45 +0000 (20:23 +0000)
vbid member was not initialised

Change-Id: I0e685cf3008e2bc446ced39a460b94e024596073
Reviewed-on: http://review.couchbase.org/76393
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Build Bot <build@couchbase.com>
src/dcp/consumer.cc
src/dcp/response.h

index 80bed23..af25bcc 100644 (file)
@@ -1190,6 +1190,7 @@ ENGINE_ERROR_CODE DcpConsumer::systemEvent(uint32_t opaque,
                             opaque,
                             SystemEvent(event),
                             bySeqno,
+                            vbucket,
                             key,
                             eventData));
         } catch (const std::bad_alloc&) {
index b7baf89..3b71076 100644 (file)
@@ -413,11 +413,13 @@ public:
     SystemEventConsumerMessage(uint32_t opaque,
                                SystemEvent ev,
                                uint64_t seqno,
+                               uint16_t vbucket,
                                cb::const_byte_buffer _key,
                                cb::const_byte_buffer _eventData)
         : SystemEventMessage(opaque),
           event(ev),
           bySeqno(seqno),
+          vbid(vbucket),
           key(reinterpret_cast<const char*>(_key.data()), _key.size()),
           eventData(_eventData.begin(), _eventData.end()) {
         if (seqno > std::numeric_limits<int64_t>::max()) {