Fix bool/int type confusion
authorPeter Eisentraut
Wed, 16 Aug 2017 04:22:32 +0000 (00:22 -0400)
committerPeter Eisentraut
Thu, 14 Sep 2017 15:45:11 +0000 (11:45 -0400)
Using ++ on a bool variable doesn't work well when stdbool.h is in use.
The original BSD code appears to use int here, so use that instead.

Reviewed-by: Thomas Munro
src/timezone/localtime.c

index 08642d12363abe6a96c1dbd2c061b16694708c0c..82c18e85446bc2ae1839f269d92d937cbdb9399a 100644 (file)
@@ -1379,7 +1379,7 @@ timesub(const pg_time_t *timep, int32 offset,
    int         y;
    const int  *ip;
    int64       corr;
-   bool        hit;
+   int         hit;
    int         i;
 
    corr = 0;