Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Olivier Michel <[email protected]>
  • Loading branch information
matl-hsk and omichel authored Sep 25, 2023
1 parent 7f12478 commit 097ba69
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/controller/launcher/webots_controller.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ static bool get_matlab_path() {
DIR *directory = opendir(matlab_directory);
if (directory == NULL) {
#ifdef __APPLE__
fprintf(stderr, "Could not open Applications folder to search for matlab installation. Please specify it manually using "
fprintf(stderr, "Could not open Applications folder to search for MATLAB installation. Please specify it manually using "
"the option '--matlab-path'.\n");
#else
fprintf(stderr, "No installation of MATLAB found. Please specify it manually using the option '--matlab-path'.\n");
Expand All @@ -206,7 +206,7 @@ static bool get_matlab_path() {
latest_version = malloc(directory_name_size);
strncpy(latest_version, directory_entry->d_name, directory_name_size);
} else if (strcmp(latest_version, directory_entry->d_name) < 0) {
memset(latest_version, '\0', directory_name_size);
latest_version = realloc(latest_version, directory_name_size);
strncpy(latest_version, directory_entry->d_name, directory_name_size);
}
}
Expand Down

0 comments on commit 097ba69

Please sign in to comment.