/* TODO: enters endless loop on wrong parameters */
- if ((lp = getenv(PSTR(ENV_PINALIAS))) != NULL) {
+ if ((lp = getenv_str(PSTR(ENV_PINALIAS))) != NULL) {
pin_names[namestr] = strdup(lp);
ptr = strtok_P(pin_names[namestr], delim1);
while (ptr != NULL) {
(void) cmdtp; (void) flag;
/* reset getopt() */
- optind = 1;
+ optind = 0;
int opt;
while ((opt = getopt(argc, argv, PSTR("s"))) != -1) {