]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ReplicatedBackend.cc: init 'Message *commit' to NULL
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Tue, 24 Mar 2015 08:50:47 +0000 (09:50 +0100)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Wed, 15 Apr 2015 10:34:50 +0000 (12:34 +0200)
Init variable with NULL to make sure it crashes in error
case (would be a bug) if NDEBUG disable the assert() call.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/osd/ReplicatedBackend.cc

index b48702590971abf61babeaf4c385fb054b750da0..48bface83ff57e7fdf4909942fe6e4019c6d0e15 100644 (file)
@@ -1267,7 +1267,7 @@ void ReplicatedBackend::sub_op_modify_commit(RepModifyRef rm)
   get_parent()->update_last_complete_ondisk(rm->last_complete);
 
   Message *m = rm->op->get_req();
-  Message *commit;
+  Message *commit = NULL;
   if (m->get_type() == MSG_OSD_SUBOP) {
     // doesn't have CLIENT SUBOP feature ,use Subop
     MOSDSubOpReply  *reply = new MOSDSubOpReply(