From: Alan Cox Date: Tue, 11 Nov 2014 12:36:44 +0000 (+0000) Subject: usermem: const v const pointer compares X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=bffe81123f92a31e18b899cd573ee4e51c0f84d4;p=FUZIX.git usermem: const v const pointer compares Remove warnings (cc65 is overly pedantic) --- diff --git a/Kernel/usermem.c b/Kernel/usermem.c index 41bb3de1..0cbec967 100644 --- a/Kernel/usermem.c +++ b/Kernel/usermem.c @@ -11,9 +11,9 @@ /* This checks to see if a user-supplied address is legitimate */ usize_t valaddr(const char *base, usize_t size) { - if (base < (char *)PROGBASE || base + size < base) + if (base < (const char *)PROGBASE || base + size < base) size = 0; - if (base + size > (char *)udata.u_top) + if (base + size > (const char *)udata.u_top) size = (char *)udata.u_top - base; if (size == 0) udata.u_error = EFAULT;