From: Paul Jackson Date: Sun, 30 Oct 2005 23:03:19 +0000 (-0800) Subject: [PATCH] lib/string.c cleanup: restore useful memmove const X-Git-Tag: v2.6.15-rc1~59^2~15^2~41 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=82da2c372712c772134d01317aa2517c923a74f8;p=linux-2.6 [PATCH] lib/string.c cleanup: restore useful memmove const A couple of (char *) casts removed in a previous cleanup patch in lib/string.c:memmove() were actually useful, as they suppressed a couple of warnings: assignment discards qualifiers from pointer target type Fix by declaring the local variable const in the first place, so casts aren't needed to strip the const qualifier. Signed-off-by: Paul Jackson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/lib/string.c b/lib/string.c index d7a5ff9b81..037a48aced 100644 --- a/lib/string.c +++ b/lib/string.c @@ -488,7 +488,8 @@ EXPORT_SYMBOL(memcpy); */ void *memmove(void *dest, const void *src, size_t count) { - char *tmp, *s; + char *tmp; + const char *s; if (dest <= src) { tmp = dest;