mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
[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>
This commit is contained in:
parent
5d57bd39eb
commit
82da2c3727
1 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue