From 30c64be4ce1c3082c0dc0399ce0a5418698ad0cc Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Sat, 3 Dec 2016 21:05:53 -0600 Subject: lib/compute_ip_checksum: mark data buffer as const compute_ip_checksum() doesn't manipulate the data it is passed. Therefore, mark it as const. BUG=chrome-os-partner:56151 Change-Id: I54cff9695a886bacd6314aa441d96aaa7a991101 Signed-off-by: Aaron Durbin Reviewed-on: https://review.coreboot.org/17714 Tested-by: build bot (Jenkins) Reviewed-by: Duncan Laurie Reviewed-by: Furquan Shaikh Reviewed-by: Paul Menzel --- src/lib/compute_ip_checksum.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lib') diff --git a/src/lib/compute_ip_checksum.c b/src/lib/compute_ip_checksum.c index 58a6bf1ee4..347b83f220 100644 --- a/src/lib/compute_ip_checksum.c +++ b/src/lib/compute_ip_checksum.c @@ -1,9 +1,9 @@ #include #include -unsigned long compute_ip_checksum(void *addr, unsigned long length) +unsigned long compute_ip_checksum(const void *addr, unsigned long length) { - uint8_t *ptr; + const uint8_t *ptr; volatile union { uint8_t byte[2]; uint16_t word; -- cgit v1.2.3