Reduce scope of variable to where it's used
authorAlan T. DeKok <aland@freeradius.org>
Tue, 22 Apr 2014 13:14:40 +0000 (09:14 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 22 Apr 2014 13:14:40 +0000 (09:14 -0400)
src/lib/valuepair.c

index d195494..36c4bf4 100644 (file)
@@ -2695,8 +2695,6 @@ int8_t paircmp_op(VALUE_PAIR const *a, FR_TOKEN op, VALUE_PAIR const *b)
  */
 int8_t paircmp(VALUE_PAIR *a, VALUE_PAIR *b)
 {
-       int compare;
-
        if (!a) return -1;
 
        VERIFY_VP(a);
@@ -2719,6 +2717,7 @@ int8_t paircmp(VALUE_PAIR *a, VALUE_PAIR *b)
                return -1;
 #else
                {
+                       int compare;
                        regex_t reg;
                        char buffer[MAX_STRING_LEN * 4 + 1];