Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf505eda

Browse files
author
Neil Conway
committed
Code cleanup: use "bool" for Boolean variables, rather than "int".
1 parent97d12b4 commitf505eda

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
staticintDecodeNumber(intflen,char*field,boolhaveTextMonth,
3434
intfmask,int*tmask,
35-
structpg_tm*tm,fsec_t*fsec,int*is2digits);
35+
structpg_tm*tm,fsec_t*fsec,bool*is2digits);
3636
staticintDecodeNumberField(intlen,char*str,
3737
intfmask,int*tmask,
38-
structpg_tm*tm,fsec_t*fsec,int*is2digits);
38+
structpg_tm*tm,fsec_t*fsec,bool*is2digits);
3939
staticintDecodeTime(char*str,intfmask,int*tmask,
4040
structpg_tm*tm,fsec_t*fsec);
4141
staticintDecodeTimezone(char*str,int*tzp);
@@ -668,8 +668,8 @@ DecodeDateTime(char **field, int *ftype, int nf,
668668
intdterr;
669669
intmer=HR24;
670670
boolhaveTextMonth= FALSE;
671-
intis2digits= FALSE;
672-
intbc= FALSE;
671+
boolis2digits= FALSE;
672+
boolbc= FALSE;
673673
pg_tz*namedTz=NULL;
674674

675675
/*
@@ -1476,7 +1476,7 @@ DecodeTimeOnly(char **field, int *ftype, int nf,
14761476
inti;
14771477
intval;
14781478
intdterr;
1479-
intis2digits= FALSE;
1479+
boolis2digits= FALSE;
14801480
intmer=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
intdterr;
20492049
boolhaveTextMonth= FALSE;
2050-
intbc= FALSE;
2051-
intis2digits= FALSE;
2050+
boolbc= FALSE;
2051+
boolis2digits= FALSE;
20522052
inttype,
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
staticint
22002200
DecodeTime(char*str,intfmask,int*tmask,structpg_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
staticint
22722272
DecodeNumber(intflen,char*str,boolhaveTextMonth,intfmask,
2273-
int*tmask,structpg_tm*tm,fsec_t*fsec,int*is2digits)
2273+
int*tmask,structpg_tm*tm,fsec_t*fsec,bool*is2digits)
22742274
{
22752275
intval;
22762276
char*cp;
@@ -2462,7 +2462,7 @@ DecodeNumber(int flen, char *str, bool haveTextMonth, int fmask,
24622462
*/
24632463
staticint
24642464
DecodeNumberField(intlen,char*str,intfmask,
2465-
int*tmask,structpg_tm*tm,fsec_t*fsec,int*is2digits)
2465+
int*tmask,structpg_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,intnf,int*dtype,structpg_tm*tm,fsec_t*fsec)
26822682
{
2683-
intis_before= FALSE;
2683+
boolis_before= FALSE;
26842684
char*cp;
26852685
intfmask=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(structpg_tm*tm,fsec_tfsec,intstyle,char*str)
35213521
{
3522-
intis_before= FALSE;
3523-
intis_nonzero= FALSE;
3522+
boolis_before= FALSE;
3523+
boolis_nonzero= FALSE;
35243524
char*cp=str;
35253525

35263526
/*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp