diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2009-07-04 13:46:33 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2009-07-04 13:46:33 -0400 |
commit | 523e5a995e1502deebd94efba44a1b5cb0007794 (patch) | |
tree | c3fdb8f37722b1737c4a83ea02f7a5542549410e /src/pnpbios.c | |
parent | d282af77b61af2172608b893a7a31fb686ec4643 (diff) | |
download | seabios-523e5a995e1502deebd94efba44a1b5cb0007794.tar.gz |
Use "p->sum -= checksum()" style for setting checksums.
Some code cleared the original checksum and then calculated a new one,
others manipulated the checksum range to not include the old
checksum. However, this was error prone - use the "-=" syntax
consistently to reduce possible errors.
Diffstat (limited to 'src/pnpbios.c')
-rw-r--r-- | src/pnpbios.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pnpbios.c b/src/pnpbios.c index cf78f007..7d9ece50 100644 --- a/src/pnpbios.c +++ b/src/pnpbios.c @@ -99,5 +99,5 @@ pnp_setup() PNPHEADER.real_ip = (u32)entry_pnp_real - BUILD_BIOS_ADDR; PNPHEADER.prot_ip = (u32)entry_pnp_prot - BUILD_BIOS_ADDR; - PNPHEADER.checksum = -checksum(&PNPHEADER, sizeof(PNPHEADER)); + PNPHEADER.checksum -= checksum(&PNPHEADER, sizeof(PNPHEADER)); } |