From b967e34d70895b799d16f5d45a9a5228d7eb73a3 Mon Sep 17 00:00:00 2001
From: "Dmitry V. Levin" <ldv@altlinux.org>
Date: Mon, 24 Dec 2018 10:19:24 +0000
Subject: [PATCH 161/294] 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.
---
 xlat.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/xlat.c b/xlat.c
index 16bfb94..62245f9 100644
--- a/xlat.c
+++ b/xlat.c
@@ -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);
-- 
1.8.3.1

