Skip to content

Commit 60758d1

Browse files
committed
clarify variable initializations
1 parent 6684f7c commit 60758d1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/api/controllers/robot_window_html/robot_window_html.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
int main(int argc, char **argv) {
1010
ts_setup(argv[0]);
1111

12-
const char *configure_message;
1312
for (;;) { // receive message sent by the robot window.
1413
wb_robot_step(TIME_STEP);
15-
if ((configure_message = wb_robot_wwi_receive_text())) {
14+
const char *configure_message = wb_robot_wwi_receive_text();
15+
if (configure_message) {
1616
if (strcmp(configure_message, "configure") == 0) {
1717
wb_robot_wwi_send_text("test wwi functions from robot_window_html controller.");
1818
break;
@@ -21,10 +21,10 @@ int main(int argc, char **argv) {
2121
}
2222
}
2323

24-
const char *test_message;
2524
for (;;) { // receive message sent by Webots.
2625
wb_robot_step(TIME_STEP);
27-
if ((test_message = wb_robot_wwi_receive_text())) {
26+
const char *test_message = wb_robot_wwi_receive_text();
27+
if (test_message) {
2828
if (strcmp(test_message, "Answer: test wwi functions from robot_window_html controller.") == 0)
2929
break;
3030
else

0 commit comments

Comments
 (0)