* Advance p until we get something that's not part of
* the dictionary attribute name.
*/
- for (p = name; fr_dict_attr_allowed_chars[(int)*p] || (*p == '.') || (*p == '-'); p++);
+ for (p = name; fr_dict_attr_allowed_chars[(uint8_t)*p] || (*p == '.') || (*p == '-'); p++);
len = p - name;
if (len > FR_DICT_ATTR_MAX_NAME_LEN) {
* Advance p until we get something that's not part of
* the dictionary attribute name.
*/
- for (p = name; fr_dict_attr_allowed_chars[(int)*p] && (*p != '.'); p++);
+ for (p = name; fr_dict_attr_allowed_chars[(uint8_t)*p] && (*p != '.'); p++);
len = p - name;
if (len > FR_DICT_ATTR_MAX_NAME_LEN) {
* Advance p until we get something that's not part of
* the dictionary attribute name.
*/
- for (p = name; fr_dict_attr_allowed_chars[(int)*p]; p++);
+ for (p = name; fr_dict_attr_allowed_chars[(uint8_t)*p]; p++);
len = p - name;
if (len > FR_DICT_ATTR_MAX_NAME_LEN) {
quote = '\0';
q = p;
- while (fr_dict_attr_allowed_chars[(int)*q] != '\0') q++;
+ while (fr_dict_attr_allowed_chars[(uint8_t)*q] != '\0') q++;
break;
}
* This is arguably easier than trying to figure
* out which operators come after the attribute
* name. Yes, our "lexer" is bad.
- *
- * sizeof() is for coverity.
*/
- if ((*t >= sizeof(fr_dict_attr_allowed_chars)) || !fr_dict_attr_allowed_chars[*t]) break;
+ if (!fr_dict_attr_allowed_chars[(uint8_t)*t]) break;
/*
* Attribute:=value is NOT
* e.g. LDAP-Group and SQL-Group.
*/
for (i = 0; i < c->data.map->lhs->len; i++) {
- if (!fr_dict_attr_allowed_chars[(unsigned char) c->data.map->lhs->name[i]]) {
+ if (!fr_dict_attr_allowed_chars[(uint8_t) c->data.map->lhs->name[i]]) {
may_be_attr = false;
break;
}
* Copy the name to a field for later resolution
*/
vpt->type = TMPL_TYPE_ATTR_UNDEFINED;
- for (q = p; fr_dict_attr_allowed_chars[(int) *q]; q++);
+ for (q = p; fr_dict_attr_allowed_chars[(uint8_t) *q]; q++);
if (q == p) {
fr_strerror_printf("Invalid attribute name");
slen = -(p - name);
for (p = vpt->name; *p != '\0'; p++) {
if (*p == ' ') break;
if (*p == '\'') break;
- if (!fr_dict_attr_allowed_chars[(int) *p]) break;
+ if (!fr_dict_attr_allowed_chars[(uint8_t) *p]) break;
}
c = *p ? '"' : '\0';