summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/include/ip_checksum.h2
-rw-r--r--src/lib/compute_ip_checksum.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/include/ip_checksum.h b/src/include/ip_checksum.h
index a1e0ffabd1..f6ef560057 100644
--- a/src/include/ip_checksum.h
+++ b/src/include/ip_checksum.h
@@ -1,5 +1,5 @@
#ifndef IP_CHECKSUM_H
#define IP_CHECKSUM_H
-unsigned long compute_ip_checksum(void *addr, unsigned long length);
+unsigned long compute_ip_checksum(const void *addr, unsigned long length);
unsigned long add_ip_checksums(unsigned long offset, unsigned long sum, unsigned long new);
#endif /* IP_CHECKSUM_H */
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 <stdint.h>
#include <ip_checksum.h>
-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;