Diff between 385a7bd5ac048204f6ba98fe68d3e0109b3e4906 and 4b273e5d98611ae8aa2c0cd1f4bfe105efeb717b

Changed Files

File Additions Deletions Status
lib/bluetooth.c +2 -5 modified

Full Patch

diff --git a/lib/bluetooth.c b/lib/bluetooth.c
index d092d01..d9360dc 100644
--- a/lib/bluetooth.c
+++ b/lib/bluetooth.c
@@ -82,7 +82,6 @@ int ba2str(const bdaddr_t *ba, char *str)
 
 int str2ba(const char *str, bdaddr_t *ba)
 {
-	bdaddr_t b;
 	int i;
 
 	if (bachk(str) < 0) {
@@ -90,10 +89,8 @@ int str2ba(const char *str, bdaddr_t *ba)
 		return -1;
 	}
 
-	for (i = 0; i < 6; i++, str += 3)
-		b.b[i] = strtol(str, NULL, 16);
-
-	baswap(ba, &b);
+	for (i = 5; i >= 0; i--, str += 3)
+		ba->b[i] = strtol(str, NULL, 16);
 
 	return 0;
 }