Fix a declaration after statement
[jansson.git] / src / error.c
index 074a68e..a7c8cbb 100644 (file)
@@ -18,10 +18,12 @@ void jsonp_error_init(json_error_t *error, const char *source)
 
 void jsonp_error_set_source(json_error_t *error, const char *source)
 {
+    size_t length;
+
     if(!error || !source)
         return;
 
-    size_t length = strlen(source);
+    length = strlen(source);
     if(length < JSON_ERROR_SOURCE_LENGTH)
         strcpy(error->source, source);
     else {