summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <meyering@fb.com>2015-09-24 18:28:16 -0700
committerJim Meyering <meyering@fb.com>2016-08-30 07:57:21 -0700
commitd7ee241c2328394eb2c9cbb15af7167d61a4bb4a (patch)
tree577c6da77212014c6423a5aef698fe1360ef6d7e
parentdef5cd571be5c9bc0788a7c459b1700a1363ab4a (diff)
downloadcoreutils-d7ee241c2328394eb2c9cbb15af7167d61a4bb4a.tar.xz
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.
-rw-r--r--src/tr.c4
1 files changed, 2 insertions, 2 deletions
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;