]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
auth: set initial values in misc structs
authorSage Weil <sage@newdream.net>
Fri, 20 Nov 2009 00:03:30 +0000 (16:03 -0800)
committerSage Weil <sage@newdream.net>
Fri, 20 Nov 2009 00:03:30 +0000 (16:03 -0800)
Fixes a bunch of valgrind warnings.

src/auth/Auth.h

index f55d432adee1947119a740ce16bf4cc94fe46575..f5ad358cbc84f8be666a937bf5c6a67bba09c4f7 100644 (file)
@@ -127,7 +127,9 @@ struct AuthCapsInfo {
   bool allow_all;
   bufferlist caps;
 
- void encode(bufferlist& bl) const {
+  AuthCapsInfo() : allow_all(false) {}
+
+  void encode(bufferlist& bl) const {
     uint32_t a = (uint32_t)allow_all;
     ::encode(a, bl);
     ::encode(caps, bl);
@@ -153,7 +155,7 @@ struct AuthTicket {
   AuthCapsInfo caps;
   __u32 flags;
 
-  AuthTicket() : flags(0) {}
+  AuthTicket() : global_id(0), flags(0) {}
 
   void init_timestamps(utime_t now, double ttl) {
     created = now;
@@ -224,6 +226,8 @@ struct RotatingSecrets {
   map<uint64_t, ExpiringCryptoKey> secrets;
   version_t max_ver;
 
+  RotatingSecrets() : max_ver(0) {}
+
   void encode(bufferlist& bl) const {
     ::encode(secrets, bl);
     ::encode(max_ver, bl);