diff --git a/sample/basic.cc b/sample/basic.cc index e307b0b7..ede3770d 100644 --- a/sample/basic.cc +++ b/sample/basic.cc @@ -13,6 +13,7 @@ // limitations under the License. #include +#include #include #include @@ -104,7 +105,7 @@ int main(int argc, const char** argv) { // check command-line arguments if (argc!=2) { std::printf(" USAGE: basic modelfile\n"); - return 0; + return EXIT_FAILURE; } // load and compile model @@ -186,5 +187,5 @@ int main(int argc, const char** argv) { glfwTerminate(); #endif - return 1; + return EXIT_SUCCESS; } diff --git a/sample/compile.cc b/sample/compile.cc index 14382393..f96fb63f 100644 --- a/sample/compile.cc +++ b/sample/compile.cc @@ -16,6 +16,7 @@ #include #include #include +#include #include #include @@ -49,7 +50,7 @@ int finish(const char* msg = 0, mjModel* m = 0) { std::cout << msg << std::endl; } - return 0; + return EXIT_SUCCESS; } diff --git a/sample/record.cc b/sample/record.cc index 522057f0..f1e39f2e 100644 --- a/sample/record.cc +++ b/sample/record.cc @@ -219,7 +219,7 @@ int main(int argc, const char** argv) { // check command-line arguments if (argc < 5 || argc > 6) { std::printf(" USAGE: record modelfile duration fps rgbfile [adddepth]\n"); - return 0; + return EXIT_FAILURE; } // parse numeric arguments @@ -321,5 +321,5 @@ int main(int argc, const char** argv) { closeMuJoCo(); closeOpenGL(); - return 1; + return EXIT_SUCCESS; } diff --git a/sample/testspeed.cc b/sample/testspeed.cc index 8074f68e..c845ffd9 100644 --- a/sample/testspeed.cc +++ b/sample/testspeed.cc @@ -14,6 +14,7 @@ #include #include +#include #include #include #include @@ -56,7 +57,7 @@ int finish(const char* msg = NULL, mjModel* m = NULL) { std::printf("%s\n", msg); } - return 0; + return EXIT_SUCCESS; } std::vector CtrlNoise(const mjModel* m, int nsteps, mjtNum ctrlnoise) {