aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorPaul Jackson <pj@sgi.com>2005-10-30 18:03:19 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-10-30 20:37:27 -0500
commit82da2c372712c772134d01317aa2517c923a74f8 (patch)
tree89e30cd1d0191acc1fa1a03658226bdaa126a077 /lib
parent5d57bd39eb3dbf2866b5f5cee8fbd7a29b00c56f (diff)
[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 <pj@sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/string.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/string.c b/lib/string.c
index d7a5ff9b81ea..037a48acedbb 100644
--- a/lib/string.c
+++ b/lib/string.c
@@ -488,7 +488,8 @@ EXPORT_SYMBOL(memcpy);
488 */ 488 */
489void *memmove(void *dest, const void *src, size_t count) 489void *memmove(void *dest, const void *src, size_t count)
490{ 490{
491 char *tmp, *s; 491 char *tmp;
492 const char *s;
492 493
493 if (dest <= src) { 494 if (dest <= src) {
494 tmp = dest; 495 tmp = dest;