Skip to contentSkip to conversation

speakup: &&/|| confusion in silent_store()

PATCH New roel kluin 1 participant 1 message Jan 1, 2011 Staging

lore
Share & tools
lore

roel kluin

author
#0 lore raw

PATCH 1/1 speakup: &&/|| confusion in silent_store()

Fix test: the branch is always taken.

---
 drivers/staging/speakup/kobjects.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/staging/speakup/kobjects.c +1 -1
index cc79f9e..a082f8d 100644
@@ -332,7 +332,7 @@ static ssize_t silent_store(struct kobject *kobj, struct kobj_attribute *attr,
 	unsigned long flags;
 
 	len = strlen(buf);
-	if (len > 0 || len < 3) {
+	if (len > 0 && len < 3) {
 		ch = buf[0];
 		if (ch == '\n')
 			ch = '0';