ftdi-gpio: correct the interface name and fix -Wlogical-op warning

Correct parsing of 'B' interface name from config and also fix:

  ftdi-gpio.c: In function ‘ftdi_gpio_parse_config’:
  ftdi-gpio.c:104:31: warning: logical ‘and’ of equal expressions [-Wlogical-op]
    104 |         if (*interface != 'A' &&
        |                               ^~

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
This commit is contained in:
Krzysztof Kozlowski
2023-05-07 11:30:58 +02:00
committed by Bjorn Andersson
parent 432e9b2192
commit 04ce8ca01d

View File

@@ -102,7 +102,7 @@ static void ftdi_gpio_parse_config(struct ftdi_gpio *ftdi_gpio, char *control_de
// Interface
interface = c + 1;
if (*interface != 'A' &&
*interface != 'A' &&
*interface != 'B' &&
*interface != 'C' &&
*interface != 'D') {
errx(1, "Invalid interface '%c'", *interface);