Skip to content

Commit

Permalink
Avoid C99isms for now.
Browse files Browse the repository at this point in the history
Fixes build on CentOS 6.  It's likely we'll want to use C99 in the
future, but it should be done conciously.
  • Loading branch information
Jonathan Perkin committed Apr 29, 2020
1 parent fd2561e commit bd300cb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkglist.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit bd300cb

Please sign in to comment.