diff options
Diffstat (limited to 'payloads')
-rw-r--r-- | payloads/libpayload/include/libpayload.h | 2 | ||||
-rw-r--r-- | payloads/libpayload/libc/ipchecksum.c | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/payloads/libpayload/include/libpayload.h b/payloads/libpayload/include/libpayload.h index 6f07ffa4a4..e75d5da5fd 100644 --- a/payloads/libpayload/include/libpayload.h +++ b/payloads/libpayload/include/libpayload.h @@ -151,7 +151,7 @@ int tolower(int c); int toupper(int c); /* libc/ipchecksum.c */ -unsigned short ipchksum(const unsigned short *ptr, unsigned long nbytes); +unsigned short ipchksum(const void *ptr, unsigned long nbytes); /* libc/malloc.c */ void free(void *ptr); 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) { |