From 5bec421726ca4fb31e3426b315ba94aac38da045 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Mon, 6 Oct 2014 17:13:06 +0200 Subject: [PATCH] bin/xbps-rindex/index-add.c: add assertions to make coverity happy (CID 62741) --- bin/xbps-rindex/index-add.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bin/xbps-rindex/index-add.c b/bin/xbps-rindex/index-add.c index 172d09cd..473b9054 100644 --- a/bin/xbps-rindex/index-add.c +++ b/bin/xbps-rindex/index-add.c @@ -49,6 +49,7 @@ index_add(struct xbps_handle *xhp, int argc, char **argv, bool force) int rv = 0, ret = 0; bool flush = false, found = false; + assert(argv); /* * Read the repository data or create index dictionaries otherwise. */ @@ -79,6 +80,8 @@ index_add(struct xbps_handle *xhp, int argc, char **argv, bool force) for (int i = 0; i < argc; i++) { const char *arch = NULL; char *sha256 = NULL, *pkgver = NULL, *pkgname = NULL; + + assert(argv[i]); /* * Read metadata props plist dictionary from binary package. */