xlat_idx: do not issue warnings for holes in indices

Some xlat indices like evdev_abs have holes, avoid issuing warnings
about them.

* xlat.c (xlat_idx): Do not issue warnings for holes in the index.
This commit is contained in:
Дмитрий Левин 2018-12-24 10:19:24 +00:00
parent d0ae0b3dca
commit b967e34d70

3
xlat.c
View File

@ -249,6 +249,9 @@ xlat_idx(const struct xlat *xlat, size_t nmemb, uint64_t val)
return NULL;
if (val != pos[val].val) {
if (pos[val].val == 0)
return NULL; /* a hole in the index */
error_func_msg("Unexpected xlat value %" PRIu64
" at index %" PRIu64,
pos[val].val, val);