From: Adam Dickmeiss Date: Thu, 13 Aug 2015 13:23:42 +0000 (+0200) Subject: refactor: move definition to inner scope X-Git-Tag: v1.12.0~3 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=08c69986d79d39c2a42480d443a7e1f826f2ebd9;p=pazpar2-moved-to-github.git refactor: move definition to inner scope --- diff --git a/src/pazpar2_config.c b/src/pazpar2_config.c index a122f8d..6983450 100644 --- a/src/pazpar2_config.c +++ b/src/pazpar2_config.c @@ -1145,15 +1145,14 @@ static void info_service_metadata(struct conf_service *service, WRBUF w) static void info_service_databases(struct conf_service *service, WRBUF w) { - struct database *db; - struct setting *s; - int i; if (service->databases) { + struct database *db; wrbuf_puts(w, " \n"); for(db = service->databases; db; db = db->next) { + int i; wrbuf_puts(w, " id) { @@ -1164,7 +1163,7 @@ static void info_service_databases(struct conf_service *service, WRBUF w) wrbuf_puts(w, ">\n"); for (i = 0; i < db->num_settings; i++) { - s = db->settings[i]; + struct setting *s = db->settings[i]; while (s != NULL) { wrbuf_puts(w, " service; int i; - struct setting *S; - + wrbuf_puts(w, " \n"); for (; s; s = s->next) { @@ -1205,7 +1203,7 @@ void info_services(struct conf_server *server, WRBUF w) { for (i=0; isettings->num_settings; i++) { - S = s->settings->settings[i]; + struct setting *S = s->settings->settings[i]; while (S != NULL) { wrbuf_puts(w, "