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.fix-issue-63
parent
08a6b0a736
commit
cdb00739ca
|
|
@ -168,7 +168,7 @@ int main(int argc, char **argv)
|
|||
|
||||
if (send_command(sock_fd, sargc, sargv)) {
|
||||
rc = EXIT_FAILURE;
|
||||
goto cleanup;
|
||||
break;
|
||||
}
|
||||
|
||||
fputs("\n> ", stdout);
|
||||
|
|
@ -177,12 +177,9 @@ int main(int argc, char **argv)
|
|||
} else {
|
||||
if (send_command(sock_fd, argc - optind, &argv[optind])) {
|
||||
rc = EXIT_FAILURE;
|
||||
goto cleanup;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
cleanup:
|
||||
close(sock_fd);
|
||||
return rc;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue