int ret;
size_t len;
struct osl_object obj;
- struct osl_row *row;
for (p = query->data; p < (char *)query->data + query->size; p += len + 1) {
char c;
+ unsigned char bitnum;
len = strlen(p);
ret = -E_ATTR_SYNTAX;
if (c != '+' && c != '-')
break;
p[len - 1] = '\0';
- obj.data = p;
- obj.size = len + 1;
- ret = osl(osl_get_row(attribute_table, ATTCOL_NAME, &obj, &row));
- if (ret < 0)
- goto out;
- ret = osl(osl_get_object(attribute_table, row, ATTCOL_BITNUM,
- &obj));
+ ret = get_attribute_bitnum_by_name(p, &bitnum);
if (ret < 0)
goto out;
if (c == '+')
- add_mask |= (1UL << *(unsigned char *)obj.data);
+ add_mask |= (1UL << bitnum);
else
- del_mask |= (1UL << *(unsigned char *)obj.data);
+ del_mask |= (1UL << bitnum);
}
ret = -E_ATTR_SYNTAX;
if (!add_mask && !del_mask)