Skip to content

Commit f505eda

Browse files
author
Neil Conway
committed
Code cleanup: use "bool" for Boolean variables, rather than "int".
1 parent 97d12b4 commit f505eda

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

src/backend/utils/adt/datetime.c

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/utils/adt/datetime.c,v 1.178 2007/03/01 14:52:03 petere Exp $
11+
* $PostgreSQL: pgsql/src/backend/utils/adt/datetime.c,v 1.179 2007/05/27 20:32:16 neilc Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -32,10 +32,10 @@
3232

3333
static int DecodeNumber(int flen, char *field, bool haveTextMonth,
3434
int fmask, int *tmask,
35-
struct pg_tm * tm, fsec_t *fsec, int *is2digits);
35+
struct pg_tm * tm, fsec_t *fsec, bool *is2digits);
3636
static int DecodeNumberField(int len, char *str,
3737
int fmask, int *tmask,
38-
struct pg_tm * tm, fsec_t *fsec, int *is2digits);
38+
struct pg_tm * tm, fsec_t *fsec, bool *is2digits);
3939
static int DecodeTime(char *str, int fmask, int *tmask,
4040
struct pg_tm * tm, fsec_t *fsec);
4141
static int DecodeTimezone(char *str, int *tzp);
@@ -668,8 +668,8 @@ DecodeDateTime(char **field, int *ftype, int nf,
668668
int dterr;
669669
int mer = HR24;
670670
bool haveTextMonth = FALSE;
671-
int is2digits = FALSE;
672-
int bc = FALSE;
671+
bool is2digits = FALSE;
672+
bool bc = FALSE;
673673
pg_tz *namedTz = NULL;
674674

675675
/*
@@ -1476,7 +1476,7 @@ DecodeTimeOnly(char **field, int *ftype, int nf,
14761476
int i;
14771477
int val;
14781478
int dterr;
1479-
int is2digits = FALSE;
1479+
bool is2digits = FALSE;
14801480
int mer = HR24;
14811481
pg_tz *namedTz = NULL;
14821482

@@ -2047,8 +2047,8 @@ DecodeDate(char *str, int fmask, int *tmask, struct pg_tm * tm)
20472047
len;
20482048
int dterr;
20492049
bool haveTextMonth = FALSE;
2050-
int bc = FALSE;
2051-
int is2digits = FALSE;
2050+
bool bc = FALSE;
2051+
bool is2digits = FALSE;
20522052
int type,
20532053
val,
20542054
dmask = 0;
@@ -2193,8 +2193,8 @@ DecodeDate(char *str, int fmask, int *tmask, struct pg_tm * tm)
21932193
* Decode time string which includes delimiters.
21942194
* Return 0 if okay, a DTERR code if not.
21952195
*
2196-
* Only check the lower limit on hours, since this same code
2197-
* can be used to represent time spans.
2196+
* Only check the lower limit on hours, since this same code can be
2197+
* used to represent time spans.
21982198
*/
21992199
static int
22002200
DecodeTime(char *str, int fmask, int *tmask, struct pg_tm * tm, fsec_t *fsec)
@@ -2270,7 +2270,7 @@ DecodeTime(char *str, int fmask, int *tmask, struct pg_tm * tm, fsec_t *fsec)
22702270
*/
22712271
static int
22722272
DecodeNumber(int flen, char *str, bool haveTextMonth, int fmask,
2273-
int *tmask, struct pg_tm * tm, fsec_t *fsec, int *is2digits)
2273+
int *tmask, struct pg_tm * tm, fsec_t *fsec, bool *is2digits)
22742274
{
22752275
int val;
22762276
char *cp;
@@ -2462,7 +2462,7 @@ DecodeNumber(int flen, char *str, bool haveTextMonth, int fmask,
24622462
*/
24632463
static int
24642464
DecodeNumberField(int len, char *str, int fmask,
2465-
int *tmask, struct pg_tm * tm, fsec_t *fsec, int *is2digits)
2465+
int *tmask, struct pg_tm * tm, fsec_t *fsec, bool *is2digits)
24662466
{
24672467
char *cp;
24682468

@@ -2680,7 +2680,7 @@ DecodeSpecial(int field, char *lowtoken, int *val)
26802680
int
26812681
DecodeInterval(char **field, int *ftype, int nf, int *dtype, struct pg_tm * tm, fsec_t *fsec)
26822682
{
2683-
int is_before = FALSE;
2683+
bool is_before = FALSE;
26842684
char *cp;
26852685
int fmask = 0,
26862686
tmask,
@@ -3519,8 +3519,8 @@ EncodeDateTime(struct pg_tm * tm, fsec_t fsec, int *tzp, char **tzn, int style,
35193519
int
35203520
EncodeInterval(struct pg_tm * tm, fsec_t fsec, int style, char *str)
35213521
{
3522-
int is_before = FALSE;
3523-
int is_nonzero = FALSE;
3522+
bool is_before = FALSE;
3523+
bool is_nonzero = FALSE;
35243524
char *cp = str;
35253525

35263526
/*

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy