+/*
+ * (C) Copyright 2014 Leo C. <erbl259-lmu@yahoo.de>
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
#include "common.h"
#include <stdlib.h>
#include <string.h>
memset(pin_names, 0, sizeof(pin_names));
pin_names_width = 0;
-/* TODO: enters endless loop on wron parameters */
+/* 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) {