const char *name = longopts[i].name;
char *opt = argv[optind]+1;
if (*opt == '-') opt++;
- while (*name && *name++ == *opt++);
+ for (; *name && *name == *opt; name++, opt++);
if (*name || (*opt && *opt != '=')) continue;
if (*opt == '=') {
if (!longopts[i].has_arg) continue;