Commit 50136971e118f1065a3602d78b5f8e583c0e29fb
Committed by
Stéphane Raimbault
1 parent
d1bf0811
tests/unit-test-client.c: Fix curly braces.
Showing
1 changed file
with
2 additions
and
2 deletions
tests/unit-test-client.c
| ... | ... | @@ -49,7 +49,7 @@ int main(int argc, char *argv[]) |
| 49 | 49 | if (argc > 1) { |
| 50 | 50 | if (strcmp(argv[1], "tcp") == 0) { |
| 51 | 51 | use_backend = TCP; |
| 52 | - if (strcmp(argv[1], "tcppi") == 0) { | |
| 52 | + } else if (strcmp(argv[1], "tcppi") == 0) { | |
| 53 | 53 | use_backend = TCP_PI; |
| 54 | 54 | } else if (strcmp(argv[1], "rtu") == 0) { |
| 55 | 55 | use_backend = RTU; |
| ... | ... | @@ -66,7 +66,7 @@ int main(int argc, char *argv[]) |
| 66 | 66 | ctx = modbus_new_tcp("127.0.0.1", 1502); |
| 67 | 67 | } else if (use_backend == TCP_PI) { |
| 68 | 68 | ctx = modbus_new_tcp_pi("::1", "1502"); |
| 69 | - } else | |
| 69 | + } else { | |
| 70 | 70 | ctx = modbus_new_rtu("/dev/ttyUSB1", 115200, 'N', 8, 1); |
| 71 | 71 | } |
| 72 | 72 | if (ctx == NULL) { | ... | ... |