ref: 6b8f9267ec3a0b62a6a1d2e112f508de61c25900
parent: 7199311132404ce721b7c76fdb8f08dff507d42a
author: cancel <cancel@cancel.fm>
date: Sun Jan 5 22:50:20 EST 2020
Cleanup
--- a/tui_main.c
+++ b/tui_main.c
@@ -2513,8 +2513,8 @@
exit(0);
}
case Argopt_portmidi_output_device: {
- int dev_id = atoi(optarg);
- if (dev_id < 0 || (dev_id == 0 && strcmp(optarg, "0"))) {
+ int dev_id;
+ if (!read_int(optarg, &dev_id) || dev_id < 0) {
fprintf(stderr,
"Bad portmidi-output-device argument %s.\n"
"Must be 0 or positive integer.\n",