diff --git a/winsup/utils/ChangeLog b/winsup/utils/ChangeLog index 005594220..3cf8c803b 100644 --- a/winsup/utils/ChangeLog +++ b/winsup/utils/ChangeLog @@ -1,3 +1,8 @@ +2004-10-18 Bas van Gompel + + * cygcheck.cc (pretty_id): Don't let i become negative. Fix + printf-format. + 2004-10-17 Bas van Gompel * cygcheck.cc (pretty_id): Allocate space for ')' in uid and guid. diff --git a/winsup/utils/cygcheck.cc b/winsup/utils/cygcheck.cc index 24f881e85..7861871d0 100644 --- a/winsup/utils/cygcheck.cc +++ b/winsup/utils/cygcheck.cc @@ -836,11 +836,11 @@ pretty_id (const char *s, char *cygwin, size_t cyglen) printf ("\nOutput from %s (%s)\n", id, s); int n = 80 / (int) ++sz; - int i = n ? n - 2 : 0; + int i = n > 2 ? n - 2 : 0; sz = -sz; for (char **g = groups; g <= ng; g++) if ((g != ng) && (++i < n)) - printf ("%*s ", sz, *g); + printf ("%*s", sz, *g); else { puts (*g);