top: make rcfile duplicate fields check more efficient
Jeeze, there was no need to employ *both* strchr() and strrchr() when ensuring fields hadn't been duplicated. So let's avoid one of those function calls completely. Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
parent
949a3c9c2e
commit
291d98ee50
@ -3742,7 +3742,7 @@ static const char *config_file (FILE *fp, const char *name, float *delay) {
|
|||||||
#endif
|
#endif
|
||||||
// ensure there's been no manual alteration of fieldscur
|
// ensure there's been no manual alteration of fieldscur
|
||||||
for (n = 0 ; n < EU_MAXPFLGS; n++) {
|
for (n = 0 ; n < EU_MAXPFLGS; n++) {
|
||||||
if (strchr(w->rc.fieldscur, w->rc.fieldscur[n]) != strrchr(w->rc.fieldscur, w->rc.fieldscur[n]))
|
if (&w->rc.fieldscur[n] != strrchr(w->rc.fieldscur, w->rc.fieldscur[n]))
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
// be tolerant of missing release 3.3.10 graph modes additions
|
// be tolerant of missing release 3.3.10 graph modes additions
|
||||||
|
Loading…
Reference in New Issue
Block a user