diff --git a/universal7885-common/debug-tools/dlopener/dlopener.c b/universal7885-common/debug-tools/dlopener/dlopener.c index dcf5105..8fd59d7 100644 --- a/universal7885-common/debug-tools/dlopener/dlopener.c +++ b/universal7885-common/debug-tools/dlopener/dlopener.c @@ -1,27 +1,26 @@ #include -#include #include +#include int main(int argc, char *argv[]) { const char *path; - int status = -EINVAL; void *handle = NULL; + int ret = EXIT_FAILURE; if (argc <= 1) { printf("Please specify a module to load!\n"); - return status; + return ret; } path = argv[1]; handle = dlopen(path, RTLD_NOW); if (handle == NULL) { - char const *err_str = dlerror(); + const char *err_str = dlerror(); printf("load: module=%s\n%s\n", path, err_str ? err_str : "unknown"); - status = -EINVAL; } else { printf("load: module=%s %s\n", path, "Success!"); + ret = EXIT_SUCCESS; } - - return status; + return ret; }