[LTP] [COMMITTED] [PATCH] metadata: metaparse: Fix warn messages

Cyril Hrubis chrubis@suse.cz
Wed Feb 16 13:24:47 CET 2022


Since we added -I option the filename is no longer argv[1] but
argv[optind].

Fixes: 36d6d745ccdc ("docparse: Implement #define and #include")
Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
---
 metadata/metaparse.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/metadata/metaparse.c b/metadata/metaparse.c
index f71d8628d..2384c73c8 100644
--- a/metadata/metaparse.c
+++ b/metadata/metaparse.c
@@ -876,7 +876,7 @@ int main(int argc, char *argv[])
 			for (j = 0; implies[i].implies[j]; j++) {
 				if (data_node_hash_get(res, implies[i].implies[j]))
 					fprintf(stderr, "%s: useless tag: %s\n",
-						argv[1], implies[i].implies[j]);
+						argv[optind], implies[i].implies[j]);
 			}
 		}
 	}
-- 
2.34.1



More information about the ltp mailing list