From: Jim Meyering Date: Fri, 25 Sep 2015 01:28:16 +0000 (-0700) Subject: maint: tr: tweak/make-consistent a pair of loop indices X-Git-Tag: v8.26~77 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d7ee241c2328394eb2c9cbb15af7167d61a4bb4a;p=thirdparty%2Fcoreutils.git 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. --- diff --git a/src/tr.c b/src/tr.c index 05918c4424..ebb0e47fea 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;