From d8963eaf12b513dad65debece9bd52c2750578e2 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Tue, 3 Jun 2014 23:44:00 +0200 Subject: [PATCH] util: constify memdup() Signed-off-by: Felix Fietkau --- util.c | 2 +- util.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/util.c b/util.c index 1708a40..4684b70 100644 --- a/util.c +++ b/util.c @@ -185,7 +185,7 @@ socket_setup(int fd, const char *ip) } void* -memdup(void *d, int l) +memdup(const void *d, int l) { void *r = malloc(l); if (!r) diff --git a/util.h b/util.h index fe9f1ea..689e3fd 100644 --- a/util.h +++ b/util.h @@ -24,7 +24,7 @@ extern struct uloop_fd listener; extern const char *iface_ip; extern int iface_index; -void *memdup(void *d, int l); +void *memdup(const void *d, int l); extern void signal_setup(void); extern int socket_setup(int fd, const char *ip); -- 2.25.1