Skip to content

Commit

Permalink
clarify variable initializations
Browse files Browse the repository at this point in the history
  • Loading branch information
CoolSpy3 committed Jan 12, 2025
1 parent 01845f1 commit 1ab4473
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/api/controllers/robot_window_html/robot_window_html.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
int main(int argc, char **argv) {
ts_setup(argv[0]);

const char *configure_message;
for (;;) { // receive message sent by the robot window.
wb_robot_step(TIME_STEP);
if ((configure_message = wb_robot_wwi_receive_text())) {
const char *configure_message = wb_robot_wwi_receive_text();
if (configure_message) {
if (strcmp(configure_message, "configure") == 0) {
wb_robot_wwi_send_text("test wwi functions from robot_window_html controller.");
break;
Expand All @@ -21,10 +21,10 @@ int main(int argc, char **argv) {
}
}

const char *test_message;
for (;;) { // receive message sent by Webots.
wb_robot_step(TIME_STEP);
if ((test_message = wb_robot_wwi_receive_text())) {
const char *test_message = wb_robot_wwi_receive_text();
if (test_message) {
if (strcmp(test_message, "Answer: test wwi functions from robot_window_html controller.") == 0)
break;
else
Expand Down

0 comments on commit 1ab4473

Please sign in to comment.