fix wrong usage of idx_fmt (detected by a compiler warning)
authorMatthias Braun <matze@braunis.de>
Tue, 25 Mar 2008 09:28:18 +0000 (09:28 +0000)
committerMatthias Braun <matze@braunis.de>
Tue, 25 Mar 2008 09:28:18 +0000 (09:28 +0000)
[r19023]

format_check.c

index 2e85c0b..d5ea272 100644 (file)
@@ -145,7 +145,8 @@ static bool atend(vchar_t *self) {
 /**
  * Check printf-style format.
  */
-static void check_format_arguments(const call_argument_t *arg, unsigned idx_fmt, unsigned idx_param)
+static void check_format_arguments(const call_argument_t *arg, unsigned idx_fmt,
+               unsigned idx_param)
 {
        const call_argument_t *fmt_arg;
        unsigned idx = 0;
@@ -177,7 +178,7 @@ static void check_format_arguments(const call_argument_t *arg, unsigned idx_fmt,
                return;
        }
        /* find the real args */
-       for(; idx < idx_fmt; ++idx)
+       for(; idx < idx_param; ++idx)
                arg = arg->next;
 
        const source_position_t *pos = &fmt_expr->base.source_position;