88 *
99 *
1010 * IDENTIFICATION
11- * $PostgreSQL: pgsql/src/backend/utils/adt/datetime.c,v 1.163 2005/12/01 20:06:37 momjian Exp $
11+ * $PostgreSQL: pgsql/src/backend/utils/adt/datetime.c,v 1.164 2005/12/01 21:11:58 momjian Exp $
1212 *
1313 *-------------------------------------------------------------------------
1414 */
@@ -1013,7 +1013,7 @@ DecodeDateTime(char **field, int *ftype, int nf,
10131013 if (tzp == NULL )
10141014 return DTERR_BAD_FORMAT ;
10151015
1016- errno = 0 ; /* avoid checking LONG_MIN/LONG_MAX */
1016+ errno = 0 ; /* avoid having to check the result for failure */
10171017 val = strtol (field [i ], & cp , 10 );
10181018 if (errno == ERANGE )
10191019 return DTERR_FIELD_OVERFLOW ;
@@ -1161,7 +1161,7 @@ DecodeDateTime(char **field, int *ftype, int nf,
11611161 char * cp ;
11621162 int val ;
11631163
1164- errno = 0 ; /* avoid checking LONG_MIN/LONG_MAX */
1164+ errno = 0 ; /* avoid having to check the result for failure */
11651165 val = strtol (field [i ], & cp , 10 );
11661166 if (errno == ERANGE )
11671167 return DTERR_FIELD_OVERFLOW ;
@@ -1921,7 +1921,7 @@ DecodeTimeOnly(char **field, int *ftype, int nf,
19211921 break ;
19221922 }
19231923
1924- errno = 0 ; /* avoid checking LONG_MIN/LONG_MAX */
1924+ errno = 0 ; /* avoid having to check the result for failure */
19251925 val = strtol (field [i ], & cp , 10 );
19261926 if (errno == ERANGE )
19271927 return DTERR_FIELD_OVERFLOW ;
@@ -2465,14 +2465,14 @@ DecodeTime(char *str, int fmask, int *tmask, struct pg_tm * tm, fsec_t *fsec)
24652465
24662466 * tmask = DTK_TIME_M ;
24672467
2468- errno = 0 ; /* avoid checking LONG_MIN/LONG_MAX */
2468+ errno = 0 ; /* avoid having to check the result for failure */
24692469 tm -> tm_hour = strtol (str , & cp , 10 );
24702470 if (errno == ERANGE )
24712471 return DTERR_FIELD_OVERFLOW ;
24722472 if (* cp != ':' )
24732473 return DTERR_BAD_FORMAT ;
24742474 str = cp + 1 ;
2475- errno = 0 ; /* avoid checking LONG_MIN/LONG_MAX */
2475+ errno = 0 ; /* avoid having to check the result for failure */
24762476 tm -> tm_min = strtol (str , & cp , 10 );
24772477 if (errno == ERANGE )
24782478 return DTERR_FIELD_OVERFLOW ;
@@ -2486,7 +2486,7 @@ DecodeTime(char *str, int fmask, int *tmask, struct pg_tm * tm, fsec_t *fsec)
24862486 else
24872487 {
24882488 str = cp + 1 ;
2489- errno = 0 ; /* avoid checking LONG_MIN/LONG_MAX */
2489+ errno = 0 ; /* avoid having to check the result for failure */
24902490 tm -> tm_sec = strtol (str , & cp , 10 );
24912491 if (errno == ERANGE )
24922492 return DTERR_FIELD_OVERFLOW ;
@@ -2540,7 +2540,7 @@ DecodeNumber(int flen, char *str, bool haveTextMonth, int fmask,
25402540
25412541 * tmask = 0 ;
25422542
2543- errno = 0 ; /* avoid checking LONG_MIN/LONG_MAX */
2543+ errno = 0 ; /* avoid having to check the result for failure */
25442544 val = strtol (str , & cp , 10 );
25452545 if (errno == ERANGE )
25462546 return DTERR_FIELD_OVERFLOW ;
@@ -2830,15 +2830,15 @@ DecodeTimezone(char *str, int *tzp)
28302830 if (* str != '+' && * str != '-' )
28312831 return DTERR_BAD_FORMAT ;
28322832
2833- errno = 0 ; /* avoid checking LONG_MIN/LONG_MAX */
2833+ errno = 0 ; /* avoid having to check the result for failure */
28342834 hr = strtol (str + 1 , & cp , 10 );
28352835 if (errno == ERANGE )
28362836 return DTERR_TZDISP_OVERFLOW ;
28372837
28382838 /* explicit delimiter? */
28392839 if (* cp == ':' )
28402840 {
2841- errno = 0 ; /* avoid checking LONG_MIN/LONG_MAX */
2841+ errno = 0 ; /* avoid having to check the result for failure */
28422842 min = strtol (cp + 1 , & cp , 10 );
28432843 if (errno == ERANGE )
28442844 return DTERR_TZDISP_OVERFLOW ;
@@ -3085,7 +3085,7 @@ DecodeInterval(char **field, int *ftype, int nf, int *dtype, struct pg_tm * tm,
30853085
30863086 case DTK_DATE :
30873087 case DTK_NUMBER :
3088- errno = 0 ; /* avoid checking LONG_MIN/LONG_MAX */
3088+ errno = 0 ; /* avoid having to check the result for failure */
30893089 val = strtol (field [i ], & cp , 10 );
30903090 if (errno == ERANGE )
30913091 return DTERR_FIELD_OVERFLOW ;
0 commit comments