From d7ee241c2328394eb2c9cbb15af7167d61a4bb4a Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Thu, 24 Sep 2015 18:28:16 -0700 Subject: maint: tr: tweak/make-consistent a pair of loop indices * src/tr.c (unquote): Use indices of type "unsigned int", rather than a mix or "size_t" and "int", presuming that no command-line- specified string will have length longer than UINT_MAX. --- src/tr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/tr.c b/src/tr.c index 05918c442..ebb0e47fe 100644 --- a/src/tr.c +++ b/src/tr.c @@ -436,8 +436,8 @@ unquote (char const *s, struct E_string *es) es->s = xmalloc (len); es->escaped = xcalloc (len, sizeof es->escaped[0]); - size_t j = 0; - for (int i = 0; s[i]; i++) + unsigned int j = 0; + for (unsigned int i = 0; s[i]; i++) { unsigned char c; int oct_digit; -- cgit v1.2.3-54-g00ecf