summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2013-08-05 22:40:28 +0200
committerMichael Vogt <mvo@debian.org>2013-08-05 22:40:28 +0200
commit4ccd3b3ce69d6a6598e1773689a44fdec78a85cc (patch)
tree3cc7a8172109c69fa6fdd10296932a6aa152f595
parent163dc55bd6891008adcdf6d683a94e890a00f8c7 (diff)
fix some unitialized data members
-rw-r--r--apt-pkg/cdrom.h2
-rw-r--r--apt-pkg/contrib/sha2.h4
-rw-r--r--apt-pkg/tagfile.h2
3 files changed, 5 insertions, 3 deletions
diff --git a/apt-pkg/cdrom.h b/apt-pkg/cdrom.h
index 4fc3d3928..7d19eb813 100644
--- a/apt-pkg/cdrom.h
+++ b/apt-pkg/cdrom.h
@@ -18,7 +18,7 @@ class pkgCdromStatus /*{{{*/
int totalSteps;
public:
- pkgCdromStatus() {};
+ pkgCdromStatus() : totalSteps(0) {};
virtual ~pkgCdromStatus() {};
// total steps
diff --git a/apt-pkg/contrib/sha2.h b/apt-pkg/contrib/sha2.h
index 51c921dbd..8e0c99a1b 100644
--- a/apt-pkg/contrib/sha2.h
+++ b/apt-pkg/contrib/sha2.h
@@ -60,10 +60,11 @@ class SHA256Summation : public SHA2SummationBase
res.Set(Sum);
return res;
};
- SHA256Summation()
+ SHA256Summation()
{
SHA256_Init(&ctx);
Done = false;
+ memset(&Sum, 0, sizeof(Sum));
};
};
@@ -96,6 +97,7 @@ class SHA512Summation : public SHA2SummationBase
{
SHA512_Init(&ctx);
Done = false;
+ memset(&Sum, 0, sizeof(Sum));
};
};
diff --git a/apt-pkg/tagfile.h b/apt-pkg/tagfile.h
index 4718f5101..126f4219d 100644
--- a/apt-pkg/tagfile.h
+++ b/apt-pkg/tagfile.h
@@ -84,7 +84,7 @@ class pkgTagSection
Stop = this->Stop;
};
- pkgTagSection() : Section(0), TagCount(0), Stop(0) {};
+ pkgTagSection() : Section(0), TagCount(0), Stop(0), d(NULL) {};
virtual ~pkgTagSection() {};
};