diff options
author | Stefan Reinauer <stepan@coresystems.de> | 2008-08-16 15:16:36 +0000 |
---|---|---|
committer | Stefan Reinauer <stepan@openbios.org> | 2008-08-16 15:16:36 +0000 |
commit | 11e45cd3ff43401e4eb8a58b71638b6922d4595c (patch) | |
tree | 0c3f0490642d491dbedff9b9246356b866a3633c /payloads/libpayload/libc/ipchecksum.c | |
parent | 67b35cb163debfbc0bfec6e7d252b23eebca51a8 (diff) |
trivial fix: ipchksum takes an unspecified input blob, not explicitly a number of shorts.
Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3512 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'payloads/libpayload/libc/ipchecksum.c')
-rw-r--r-- | payloads/libpayload/libc/ipchecksum.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/payloads/libpayload/libc/ipchecksum.c b/payloads/libpayload/libc/ipchecksum.c index f430c965a5..8d67921b03 100644 --- a/payloads/libpayload/libc/ipchecksum.c +++ b/payloads/libpayload/libc/ipchecksum.c @@ -4,6 +4,7 @@ * It has originally been taken from the FreeBSD project. * * Copyright (c) 2001 Charles Mott <cm@linktel.net> + * Copyright (c) 2008 coresystems GmbH * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -30,9 +31,10 @@ #include <libpayload.h> -unsigned short ipchksum(const unsigned short *ptr, unsigned long nbytes) +unsigned short ipchksum(const void *vptr, unsigned long nbytes) { int sum, oddbyte; + const unsigned short *ptr = vptr; sum = 0; while (nbytes > 1) { |