Silence the gcc Wmaybe-uninitialized report on ret variable, and avoid
an extra check since run_tests() already returns EXIT_FAILURE or
EXIT_SUCCESS
Signed-off-by: Djalal Harouni <tixxdz@opendz.org>
int main(int argc, char *argv[])
{
- int c, ret;
+ int c, ret = -EINVAL;
enum {
ARG_VERSION = 0x100,
default:
printf("Unknown option code %c", c);
- return -EINVAL;
+ return ret;
}
}
for (c = 0; c < arg_count; c++)
ret = run_tests();
- return ret > 0 ? EXIT_FAILURE : EXIT_SUCCESS;
+ return ret;
}