summaryrefslogtreecommitdiff
path: root/parted
diff options
context:
space:
mode:
authorPetr Uzel <petr.uzel@suse.cz>2010-05-26 14:27:07 +0200
committerJim Meyering <meyering@redhat.com>2010-05-26 18:36:17 +0200
commitc0ca1f474d843a071fdc908d66bbe36eac3be0c4 (patch)
treecbd882bf5dd18ae302fcd6686eca208b694dd82f /parted
parent6f11884372056020511f223db2fbcb37c1d28794 (diff)
downloadparted-c0ca1f474d843a071fdc908d66bbe36eac3be0c4.tar.gz
parted: initialize align_type to default value
* parted/parted.c (do_align_check): Initialize align_type to default alignment; this prevents reading of uninitialized memory later in command_line_get_align_type()
Diffstat (limited to 'parted')
-rw-r--r--parted/parted.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/parted/parted.c b/parted/parted.c
index 04d765c..830075b 100644
--- a/parted/parted.c
+++ b/parted/parted.c
@@ -2080,7 +2080,7 @@ do_align_check (PedDevice **dev)
if (!disk)
return 0;
- enum AlignmentType align_type;
+ enum AlignmentType align_type = PA_OPTIMUM;
PedPartition *part = NULL;
bool aligned =
(command_line_get_align_type (_("alignment type(min/opt)"), &align_type)