diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2004-10-18 10:25:38 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2004-10-18 10:25:38 +0000 |
commit | eedf24742c9c261a49f9ffdb7a2bc28ff5992fc2 (patch) | |
tree | befa62116783008940223a69cc2e1ef1bf0797ab /winsup | |
parent | b64293e62a6094050d51b7360492b81b7d643f3b (diff) | |
download | newlib-eedf24742c9c261a49f9ffdb7a2bc28ff5992fc2.zip newlib-eedf24742c9c261a49f9ffdb7a2bc28ff5992fc2.tar.gz newlib-eedf24742c9c261a49f9ffdb7a2bc28ff5992fc2.tar.bz2 |
* cygcheck.cc (pretty_id): Don't let i become negative. Fix
printf-format.
Diffstat (limited to 'winsup')
-rw-r--r-- | winsup/utils/ChangeLog | 5 | ||||
-rw-r--r-- | winsup/utils/cygcheck.cc | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/winsup/utils/ChangeLog b/winsup/utils/ChangeLog index 0055942..3cf8c80 100644 --- a/winsup/utils/ChangeLog +++ b/winsup/utils/ChangeLog @@ -1,3 +1,8 @@ +2004-10-18 Bas van Gompel <cygwin-patch.buzz@bavag.tmfweb.nl> + + * cygcheck.cc (pretty_id): Don't let i become negative. Fix + printf-format. + 2004-10-17 Bas van Gompel <cygwin-patch.buzz@bavag.tmfweb.nl> * cygcheck.cc (pretty_id): Allocate space for ')' in uid and guid. diff --git a/winsup/utils/cygcheck.cc b/winsup/utils/cygcheck.cc index 24f881e..7861871 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); |