From bd300cb736ec1fa3244d1465ec5e18fbb42c432b Mon Sep 17 00:00:00 2001 From: Jonathan Perkin Date: Wed, 29 Apr 2020 11:10:04 +0100 Subject: [PATCH] Avoid C99isms for now. Fixes build on CentOS 6. It's likely we'll want to use C99 in the future, but it should be done conciously. --- pkglist.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkglist.c b/pkglist.c index 0e4f469..0eb815f 100644 --- a/pkglist.c +++ b/pkglist.c @@ -337,7 +337,7 @@ search_pkg(const char *pattern) Pkglist *plist; struct pkg_sort *psort; regex_t re; - int rc; + int i, rc; char eb[64], is_inst, outpkg[BUFSIZ]; int matched = 0, pcount = 0; char sfmt[10], pfmt[10]; @@ -379,7 +379,7 @@ search_pkg(const char *pattern) qsort(psort, pcount, sizeof(struct pkg_sort), pkg_sort_cmp); - for (int i = 0; i < pcount; i++) { + for (i = 0; i < pcount; i++) { snprintf(outpkg, BUFSIZ, sfmt, psort[i].full, psort[i].flag); printf(pfmt, outpkg, psort[i].comment);