File bluez-tools-csr-Fix-wrong-error-check.patch of Package bluez.17280

From 7cd5494b694580c350d071d137384d1140c44d94 Mon Sep 17 00:00:00 2001
From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Date: Thu, 19 Jun 2014 16:55:31 +0300
Subject: [PATCH] tools/csr: Fix wrong error check

---
 tools/csr.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tools/csr.c b/tools/csr.c
index b4ea1fbbe..36af921e0 100644
--- a/tools/csr.c
+++ b/tools/csr.c
@@ -2750,10 +2750,12 @@ static int parse_line(char *str)
 	char *off, *end;
 
 	pskey = strtol(str + 1, NULL, 16);
-	off = strstr(str, "=") + 1;
+	off = strstr(str, "=");
 	if (!off)
 		return -EIO;
 
+	off++;
+
 	while (1) {
 		value = strtol(off, &end, 16);
 		if (value == 0 && off == end)
-- 
2.14.1
openSUSE Build Service is sponsored by