Răsfoiți Sursa

Bluetooth: make baswap src const

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Loic Poulain 8 ani în urmă
părinte
comite
65bce46298
2 a modificat fișierele cu 4 adăugiri și 4 ștergeri
  1. 1 1
      include/net/bluetooth/bluetooth.h
  2. 3 3
      net/bluetooth/lib.c

+ 1 - 1
include/net/bluetooth/bluetooth.h

@@ -233,7 +233,7 @@ static inline void bacpy(bdaddr_t *dst, const bdaddr_t *src)
 	memcpy(dst, src, sizeof(bdaddr_t));
 	memcpy(dst, src, sizeof(bdaddr_t));
 }
 }
 
 
-void baswap(bdaddr_t *dst, bdaddr_t *src);
+void baswap(bdaddr_t *dst, const bdaddr_t *src);
 
 
 /* Common socket structures and functions */
 /* Common socket structures and functions */
 
 

+ 3 - 3
net/bluetooth/lib.c

@@ -30,10 +30,10 @@
 
 
 #include <net/bluetooth/bluetooth.h>
 #include <net/bluetooth/bluetooth.h>
 
 
-void baswap(bdaddr_t *dst, bdaddr_t *src)
+void baswap(bdaddr_t *dst, const bdaddr_t *src)
 {
 {
-	unsigned char *d = (unsigned char *) dst;
-	unsigned char *s = (unsigned char *) src;
+	const unsigned char *s = (const unsigned char *)src;
+	unsigned char *d = (unsigned char *)dst;
 	unsigned int i;
 	unsigned int i;
 
 
 	for (i = 0; i < 6; i++)
 	for (i = 0; i < 6; i++)