summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRod Smith <rodsmith@rodsbooks.com>2023-03-10 13:28:00 -0500
committerRod Smith <rodsmith@rodsbooks.com>2023-03-10 13:28:00 -0500
commitcb4bf320748f701a0ed835d4a410f2960f1ce0bd (patch)
tree0c0581fa231e4e497c842a27c96759a6575bf320
parent0e7d63502f6ea68b5c56036c493e72e83b3f145d (diff)
downloadsgdisk-master.tar.gz
Minor code cleanup based on valgrind analysisHEADmaster
-rw-r--r--NEWS2
-rw-r--r--gpt.cc1
2 files changed, 3 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 5c6dfa1..29d99e3 100644
--- a/NEWS
+++ b/NEWS
@@ -18,6 +18,8 @@
- Make explicit casts in gptcurses.cc to eliminate compiler warnings about
mis-matched types in printw() statements.
+- Minor code cleanup based on valgrind analysis.
+
- In previous versions, rEFInd accepted only integer values for partition
start points, end points, and sizes, and it interpreted decimal values
incorrectly. That is, if you typed "+9.5G" as the partition end point,
diff --git a/gpt.cc b/gpt.cc
index 76cd9ad..24d6918 100644
--- a/gpt.cc
+++ b/gpt.cc
@@ -80,6 +80,7 @@ GPTData::GPTData(void) {
beQuiet = 0;
whichWasUsed = use_new;
mainHeader.numParts = 0;
+ mainHeader.firstUsableLBA = 0;
mainHeader.lastUsableLBA = 0;
numParts = 0;
SetGPTSize(NUM_GPT_ENTRIES);