mirror of https://github.com/nirenjan/libx52.git
Always return 1 from x52cli for any failure
Prior to this change, on failure condition, x52cli would exit with a code that mapped directly to the return code of the function. This was inconsistent with the behaviour if the initialization or connect steps failed for any reason.cpp
parent
a119fe2c60
commit
44fba0c6cd
|
@ -541,6 +541,7 @@ int main(int argc, char **argv)
|
||||||
rc = (*(cmd->handler))(x52, args);
|
rc = (*(cmd->handler))(x52, args);
|
||||||
if (rc != LIBX52_SUCCESS) {
|
if (rc != LIBX52_SUCCESS) {
|
||||||
fprintf(stderr, "Error: %s\n", libx52_strerror(rc));
|
fprintf(stderr, "Error: %s\n", libx52_strerror(rc));
|
||||||
|
rc = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
libx52_update(x52);
|
libx52_update(x52);
|
||||||
|
|
Loading…
Reference in New Issue