From 149883bec140286d19751fbae7550043f754f4bb Mon Sep 17 00:00:00 2001 From: Ben Kaduk Date: Wed, 27 Jun 2012 16:35:20 -0400 Subject: Minor cleanups relating to size_t being unsigned In order to use -1 as a sentinel value, we should explicitly cast to make it clear what we are doing. It might be better to use a less convoluted sentinel value such as SIZE_T_MAX, though. Additionally, since size_t is unsigned and at least as wide as an int, a loop with int index variable that compares against a size_t for its termination check could become an infinite loop. Make the loop index size_t for consistency. --- src/tests/gss-threads/gss-misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/tests') diff --git a/src/tests/gss-threads/gss-misc.c b/src/tests/gss-threads/gss-misc.c index e52ae288e..4fdbde31c 100644 --- a/src/tests/gss-threads/gss-misc.c +++ b/src/tests/gss-threads/gss-misc.c @@ -386,7 +386,7 @@ void display_ctx_flags(flags) void print_token(tok) gss_buffer_t tok; { - int i; + size_t i; unsigned char *p = tok->value; if (!display_file) -- cgit