From 0439809e27c6c4d99ec5a32f7590cc9ddc493d43 Mon Sep 17 00:00:00 2001 From: Robin Mallinson Date: Wed, 21 Nov 2012 01:48:14 +0000 Subject: [PATCH] Use max_idx rather than hardcoded data. --- ServoBlaster/servoblaster.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ServoBlaster/servoblaster.c b/ServoBlaster/servoblaster.c index b935cc0..30dbb1c 100644 --- a/ServoBlaster/servoblaster.c +++ b/ServoBlaster/servoblaster.c @@ -474,7 +474,7 @@ static ssize_t dev_write(struct file *filp,const char *buf,size_t count,loff_t * end_of_line = strchr(str, '\n'); if (NULL == end_of_line) { - if (31 == *idx) { + if (max_idx == *idx) { // Full buf without '\n' printk(KERN_WARNING "ServoBlaster: Failed to parse command (%s)\n", str); return -EINVAL;