Currently, if you pass in an rmlvo with an empty string for layout or
variant, it would not match layout and variant rules even with
wildcards. But if the rules file had set an appropriate default, and someone
passes in the empty string, than he should get the default.
NULL in this case signifies not wanting to match against the layout or
variant at all, and so the rule should still fail to match NULLs.
Signed-off-by: Ran Benita <ran234@gmail.com>
- if (mdefs->layout[rule->layout_num] == NULL ||
- *mdefs->layout[rule->layout_num] == '\0')
+ if (mdefs->layout[rule->layout_num] == NULL)
return 0;
if (strcmp(rule->layout, "*") == 0) {
return 0;
if (strcmp(rule->layout, "*") == 0) {
- if (mdefs->variant[rule->variant_num] == NULL ||
- *mdefs->variant[rule->variant_num] == '\0')
+ if (mdefs->variant[rule->variant_num] == NULL)
return 0;
if (strcmp(rule->variant, "*") == 0) {
return 0;
if (strcmp(rule->variant, "*") == 0) {