Skip to content
Commit 3b3d8e44 authored by Mike Fleetwood's avatar Mike Fleetwood Committed by Curtis Gedak
Browse files

Stop relying on specific values of PED_PARTITION_* enum

The expressions used in the call to Set() were comparing
lp_partition->type to 0 for the type parameter and passing it as a bool
for the inside_extended parameter.  Libparted lp_partition->type is
actually an enumeration.  The code was only working because of the
specific values assigned to the symbolic names, PED_PARTITION_NORMAL = 0
and PED_PARTITION_EXTENDED is non-zero (true).

Make the code use the symbolic names and not depend on the actual
enumeration values, which should be considered changeable and private to
libparted.
parent 7870a92b
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment