mirror of
https://github.com/richardghirst/PiBits.git
synced 2024-11-28 12:24:11 +01:00
Use max_idx rather than hardcoded data.
This commit is contained in:
parent
1b8dbeed21
commit
0439809e27
@ -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');
|
end_of_line = strchr(str, '\n');
|
||||||
if (NULL == end_of_line)
|
if (NULL == end_of_line)
|
||||||
{
|
{
|
||||||
if (31 == *idx) {
|
if (max_idx == *idx) {
|
||||||
// Full buf without '\n'
|
// Full buf without '\n'
|
||||||
printk(KERN_WARNING "ServoBlaster: Failed to parse command (%s)\n", str);
|
printk(KERN_WARNING "ServoBlaster: Failed to parse command (%s)\n", str);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
Loading…
Reference in New Issue
Block a user