Introduce ExprResolveRadioGroup helper
Just a tiny special-cased version of ExprResolveInteger. Signed-off-by: Daniel Stone <daniel@fooishbar.org>master
parent
26285a7bd9
commit
193e9b3913
|
@ -650,6 +650,13 @@ ExprResolveInteger(ExprDef * expr,
|
|||
return False;
|
||||
}
|
||||
|
||||
int
|
||||
ExprResolveRadioGroup(ExprDef * expr,
|
||||
ExprResult * val_rtrn)
|
||||
{
|
||||
return ExprResolveInteger(expr, val_rtrn, RadioLookup, NULL);
|
||||
}
|
||||
|
||||
int
|
||||
ExprResolveString(ExprDef * expr,
|
||||
ExprResult * val_rtrn)
|
||||
|
|
|
@ -116,6 +116,10 @@ extern int ExprResolveInteger(ExprDef * /* expr */ ,
|
|||
char * /* lookupPriv */
|
||||
);
|
||||
|
||||
extern int ExprResolveRadioGroup(ExprDef * /* expr */ ,
|
||||
ExprResult * /* val_rtrn */
|
||||
);
|
||||
|
||||
extern int ExprResolveFloat(ExprDef * /* expr */ ,
|
||||
ExprResult * /* val_rtrn */
|
||||
);
|
||||
|
|
|
@ -1061,7 +1061,7 @@ SetAllowNone(KeyInfo * key, ExprDef * arrayNdx, ExprDef * value)
|
|||
}
|
||||
else
|
||||
{
|
||||
if (!ExprResolveInteger(arrayNdx, &tmp, RadioLookup, NULL))
|
||||
if (!ExprResolveRadioGroup(arrayNdx, &tmp))
|
||||
{
|
||||
ERROR("Illegal index in group name definition\n");
|
||||
ACTION("Definition with non-integer array index ignored\n");
|
||||
|
|
Loading…
Reference in New Issue