mirror of https://github.com/nirenjan/libx52.git
fix(x52ctl): Remove unnecessary goto statements
The `goto cleanup` statements are not really needed, and can be safely replaced with `break` statements in x52ctl.pull/64/head
parent
08a6b0a736
commit
cdb00739ca
|
|
@ -168,7 +168,7 @@ int main(int argc, char **argv)
|
||||||
|
|
||||||
if (send_command(sock_fd, sargc, sargv)) {
|
if (send_command(sock_fd, sargc, sargv)) {
|
||||||
rc = EXIT_FAILURE;
|
rc = EXIT_FAILURE;
|
||||||
goto cleanup;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
fputs("\n> ", stdout);
|
fputs("\n> ", stdout);
|
||||||
|
|
@ -177,12 +177,9 @@ int main(int argc, char **argv)
|
||||||
} else {
|
} else {
|
||||||
if (send_command(sock_fd, argc - optind, &argv[optind])) {
|
if (send_command(sock_fd, argc - optind, &argv[optind])) {
|
||||||
rc = EXIT_FAILURE;
|
rc = EXIT_FAILURE;
|
||||||
goto cleanup;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
cleanup:
|
|
||||||
close(sock_fd);
|
close(sock_fd);
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue