From: Felix Fietkau Date: Tue, 3 Jun 2014 21:44:00 +0000 (+0200) Subject: util: constify memdup() X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fmdnsd.git;a=commitdiff_plain;h=d8963eaf12b513dad65debece9bd52c2750578e2 util: constify memdup() Signed-off-by: Felix Fietkau --- 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);