Commit f66b2050 authored by David Brown's avatar David Brown Committed by David Brown
Browse files

sim: Match structure definition better



This padding field is defined as a u8 and a u16.  Clarify the marshaling
code to match instead of just looping over bytes.

Signed-off-by: default avatarDavid Brown <david.brown@linaro.org>
parent cae9e2a8
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -291,9 +291,8 @@ impl ManifestGen for TlvGen {

                // The dependency.
                protected_tlv.push(dep.id);
                for _ in 0 .. 3 {
                protected_tlv.push(0);
                }
                protected_tlv.write_u16::<LittleEndian>(0).unwrap();
                protected_tlv.push(dep.version.major);
                protected_tlv.push(dep.version.minor);
                protected_tlv.write_u16::<LittleEndian>(dep.version.revision).unwrap();