iocshRegisterVariable() avoid spurious redefinition warning
Compare the contents, not the container.
This commit is contained in:
@@ -181,7 +181,7 @@ void epicsStdCall iocshRegisterVariable (const iocshVarDef *piocshVarDef)
|
||||
for (l = NULL, p = iocshVariableHead ; p != NULL ; l = p, p = p->next) {
|
||||
i = strcmp (piocshVarDef->name, p->pVarDef->name);
|
||||
if (i == 0) {
|
||||
if (p->pVarDef != piocshVarDef) {
|
||||
if ((p->pVarDef->type != piocshVarDef->type) && (p->pVarDef->pval != piocshVarDef->pval)) {
|
||||
errlogPrintf("Warning: iocshRegisterVariable redefining %s.\n",
|
||||
piocshVarDef->name);
|
||||
p->pVarDef = piocshVarDef;
|
||||
|
||||
Reference in New Issue
Block a user