Commit 19717d05 authored by Maciej W. Rozycki's avatar Maciej W. Rozycki Committed by David S. Miller

declance: Remove `incompatible pointer type' warnings

Revert damage caused by 43d620c8:

.../declance.c: In function 'cp_to_buf':
.../declance.c:347: warning: assignment from incompatible pointer type
.../declance.c:348: warning: assignment from incompatible pointer type
.../declance.c: In function 'cp_from_buf':
.../declance.c:406: warning: assignment from incompatible pointer type
.../declance.c:407: warning: assignment from incompatible pointer type

Also add a `const' qualifier where applicable and adjust formatting.
Signed-off-by: default avatarMaciej W. Rozycki <macro@linux-mips.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1a5465f5
...@@ -344,8 +344,8 @@ static void cp_to_buf(const int type, void *to, const void *from, int len) ...@@ -344,8 +344,8 @@ static void cp_to_buf(const int type, void *to, const void *from, int len)
} }
clen = len & 1; clen = len & 1;
rtp = tp; rtp = (unsigned char *)tp;
rfp = fp; rfp = (const unsigned char *)fp;
while (clen--) { while (clen--) {
*rtp++ = *rfp++; *rtp++ = *rfp++;
} }
...@@ -372,8 +372,8 @@ static void cp_to_buf(const int type, void *to, const void *from, int len) ...@@ -372,8 +372,8 @@ static void cp_to_buf(const int type, void *to, const void *from, int len)
* do the rest, if any. * do the rest, if any.
*/ */
clen = len & 15; clen = len & 15;
rtp = (unsigned char *) tp; rtp = (unsigned char *)tp;
rfp = (unsigned char *) fp; rfp = (const unsigned char *)fp;
while (clen--) { while (clen--) {
*rtp++ = *rfp++; *rtp++ = *rfp++;
} }
...@@ -403,8 +403,8 @@ static void cp_from_buf(const int type, void *to, const void *from, int len) ...@@ -403,8 +403,8 @@ static void cp_from_buf(const int type, void *to, const void *from, int len)
clen = len & 1; clen = len & 1;
rtp = tp; rtp = (unsigned char *)tp;
rfp = fp; rfp = (const unsigned char *)fp;
while (clen--) { while (clen--) {
*rtp++ = *rfp++; *rtp++ = *rfp++;
...@@ -433,8 +433,8 @@ static void cp_from_buf(const int type, void *to, const void *from, int len) ...@@ -433,8 +433,8 @@ static void cp_from_buf(const int type, void *to, const void *from, int len)
* do the rest, if any. * do the rest, if any.
*/ */
clen = len & 15; clen = len & 15;
rtp = (unsigned char *) tp; rtp = (unsigned char *)tp;
rfp = (unsigned char *) fp; rfp = (const unsigned char *)fp;
while (clen--) { while (clen--) {
*rtp++ = *rfp++; *rtp++ = *rfp++;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment