Fix to use forward declation of a variable.
authorTatsuo Ishii <ishii@sraoss.co.jp>
Thu, 22 Feb 2024 11:35:36 +0000 (20:35 +0900)
committerTatsuo Ishii <ishii@sraoss.co.jp>
Thu, 22 Feb 2024 11:38:40 +0000 (20:38 +0900)
It is required by our coding standard (we follow PostgreSQL's coding
standard). Also fix small typo.

src/main/pgpool_main.c

index 598a9e5392ef8cd6bf39340f917a3b6ef2733b9c..edd8a3094066acc4d5973820f93fb8d569723e4a 100644 (file)
@@ -3575,12 +3575,13 @@ sync_backend_from_watchdog(void)
        int                     down_node_ids[MAX_NUM_BACKENDS];
        int                     down_node_ids_index = 0;
        int                     i;
+       WDPGBackendStatus *backendStatus;
 
        /*
         * Ask the watchdog to get all the backend states from the
         * Leader/Coordinator Pgpool-II node
         */
-       WDPGBackendStatus *backendStatus = get_pg_backend_status_from_leader_wd_node();
+       backendStatus = get_pg_backend_status_from_leader_wd_node();
 
        if (!backendStatus)
        {
@@ -3593,7 +3594,7 @@ sync_backend_from_watchdog(void)
        {
                /*
                 * -ve node count is returned by watchdog when the node itself is a
-                * leader and in that case we need to use the loacl backend node
+                * leader and in that case we need to use the local backend node
                 * status
                 */
                ereport(LOG,