]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rgw: Initialize pointer field in RGWLC
authorJos Collin <jcollin@redhat.com>
Thu, 29 Jun 2017 15:15:07 +0000 (20:45 +0530)
committerJos Collin <jcollin@redhat.com>
Wed, 12 Jul 2017 16:03:04 +0000 (21:33 +0530)
Fixes the Coverity Scan Report:
CID 1396146 (#1 of 1): Uninitialized pointer field (UNINIT_CTOR)
2. uninit_member: Non-static class member max_objs is not initialized in this constructor nor in any functions that it calls.
4. uninit_member: Non-static class member obj_names is not initialized in this constructor nor in any functions that it calls.

Signed-off-by: Jos Collin <jcollin@redhat.com>
src/rgw/rgw_lc.h

index 7ff6505a7b5c08af8dfb3f36d1a38e78289c400c..4c07198ca521108e1967933b36ba3177b0b0a652 100644 (file)
@@ -242,8 +242,8 @@ WRITE_CLASS_ENCODER(RGWLifecycleConfiguration)
 class RGWLC {
   CephContext *cct;
   RGWRados *store;
-  int max_objs;
-  string *obj_names;
+  int max_objs{0};
+  string *obj_names{nullptr};
   std::atomic<bool> down_flag = { false };
   string cookie;