summaryrefslogtreecommitdiffstats
path: root/dimension/lexer.l
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2010-05-05 20:09:38 -0600
committerTavian Barnes <tavianator@gmail.com>2010-05-05 22:47:44 -0600
commit6c2943e735c99579b5b861f67f2d98e5ddd6306f (patch)
treee882a1dda2726dd9dfca3fe2dd44750b17b1edda /dimension/lexer.l
parentb14506e501770aeaf54d1160c0073398cc29a038 (diff)
downloaddimension-6c2943e735c99579b5b861f67f2d98e5ddd6306f.tar.xz
Use C99 for loop initializers.
Diffstat (limited to 'dimension/lexer.l')
-rw-r--r--dimension/lexer.l6
1 files changed, 2 insertions, 4 deletions
diff --git a/dimension/lexer.l b/dimension/lexer.l
index 1abb4b8..6198fea 100644
--- a/dimension/lexer.l
+++ b/dimension/lexer.l
@@ -422,8 +422,7 @@ void
dmnsn_delete_tokens(dmnsn_array *tokens)
{
dmnsn_token token;
- unsigned int i;
- for (i = 0; i < dmnsn_array_size(tokens); ++i) {
+ for (size_t i = 0; i < dmnsn_array_size(tokens); ++i) {
dmnsn_array_get(tokens, i, &token);
dmnsn_delete_token(token);
}
@@ -455,7 +454,6 @@ void
dmnsn_print_token_sexpr(FILE *file, const dmnsn_array *tokens)
{
dmnsn_token token;
- unsigned int i;
if (dmnsn_array_size(tokens) == 0) {
fprintf(file, "()");
@@ -464,7 +462,7 @@ dmnsn_print_token_sexpr(FILE *file, const dmnsn_array *tokens)
dmnsn_array_get(tokens, 0, &token);
dmnsn_print_token(file, token);
- for (i = 1; i < dmnsn_array_size(tokens); ++i) {
+ for (size_t i = 1; i < dmnsn_array_size(tokens); ++i) {
fprintf(file, " ");
dmnsn_array_get(tokens, i, &token);
dmnsn_print_token(file, token);