Skip to contentSkip to conversation

emulator: fix request tests

PATCH In review Frédéric Danis 2 participants 2 messages Jun 15, 2011 – Jun 16, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 emulator: fix request tests

---
 src/emulator.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
src/emulator.c +2 -2
index c120ad3..8821afd 100644
@@ -433,7 +433,7 @@ static void brsf_cb(GAtServer *server, GAtServerRequestType type,
 		if (g_at_result_iter_next_number(&iter, &val) == FALSE)
 			goto fail;
 
-		if ((val < 0) && (val > 127))
+		if ((val < 0) || (val > 127))
 			goto fail;
 
 		em->r_features = val;
@@ -715,7 +715,7 @@ static void cmee_cb(GAtServer *server, GAtServerRequestType type,
 		if (g_at_result_iter_next_number(&iter, &val) == FALSE)
 			goto fail;
 
-		if (val < 0 && val > 1)
+		if (val != 0 && val != 1)
 			goto fail;
 
 		em->cmee_mode = val;
Signature · 1 line
1.7.1
#1 lore raw

Hi Frédéric,

Quoted 4 lines · Frédéric Danis
---
 src/emulator.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Patch has been applied with a minor style amendment.

Regards,
-Denis