#ifdef __linux__
optst->c_cflag &= ~CBAUD;
optst->c_cflag |= BOTHER;
- optst->c_ispeed = ispeed;
- optst->c_ospeed = ospeed;
+ optst->c_ispeed = lispeed;
+ optst->c_ospeed = lospeed;
#else
- cfsetispeed(optst, ispeed);
- cfsetospeed(optst, ospeed);
+ cfsetispeed(optst, lispeed);
+ cfsetospeed(optst, lospeed);
#endif
}
soft ^= 1; break;
case 'd':
tl = strtol(optarg, &endptr, 10);
- if (errno != 0 || *endptr != '\0' || t < 0) {
+ if (errno != 0 || *endptr != '\0' || tl < 0) {
fprintf(stderr, "%s: invalid character delay: %s\n", argv[0],optarg);
goto ustusage;
} else {