dt.cfix logic error

This commit is contained in:
Jacek Jendrzej
2015-01-28 18:17:50 +01:00
parent ed03bf9f6e
commit 2074dc4a5d

View File

@@ -129,14 +129,14 @@ int main(int argc, char **argv)
}
else if (sscanf(argv[x], "-ls%X", &b) == 1)
{
if ((b > 0) || (b <= 8)) {
if ((b > 0) && (b <= 8)) {
if (ioctl(fd, IOC_FP_LED_CTRL, b | 0x80))
perror("IOC_FP_LED_CTRL");
}
}
else if (sscanf(argv[x], "-lc%X", &b) == 1)
{
if ((b > 0) || (b <= 8)) {
if ((b > 0) && (b <= 8)) {
if (ioctl(fd, IOC_FP_LED_CTRL, b))
perror("IOC_FP_LED_CTRL");
}