diff options
| author | Peter Eisentraut | 2012-03-15 19:17:19 +0000 |
|---|---|---|
| committer | Peter Eisentraut | 2012-03-15 19:17:19 +0000 |
| commit | eb990a2b9efff853d0c68a9cf902b1df23498540 (patch) | |
| tree | 36ec5e50918ef06c3f0a75744191c139f411460a /src/interfaces | |
| parent | 531e60aec02fa14d02185e42363b2277427e2119 (diff) | |
Add const qualifier to tzn returned by timestamp2tm()
The tzn value might come from tm->tm_zone, which libc declares as
const, so it's prudent that the upper layers know about this as well.
Diffstat (limited to 'src/interfaces')
| -rw-r--r-- | src/interfaces/ecpg/pgtypeslib/timestamp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/interfaces/ecpg/pgtypeslib/timestamp.c b/src/interfaces/ecpg/pgtypeslib/timestamp.c index b0e99766f5b..1eaf715c473 100644 --- a/src/interfaces/ecpg/pgtypeslib/timestamp.c +++ b/src/interfaces/ecpg/pgtypeslib/timestamp.c @@ -119,7 +119,7 @@ SetEpochTimestamp(void) * local time zone. If out of this range, leave as GMT. - tgl 97/05/27 */ static int -timestamp2tm(timestamp dt, int *tzp, struct tm * tm, fsec_t *fsec, char **tzn) +timestamp2tm(timestamp dt, int *tzp, struct tm * tm, fsec_t *fsec, const char **tzn) { #ifdef HAVE_INT64_TIMESTAMP int64 dDate, @@ -224,7 +224,7 @@ recalc_t: *tzp = -tm->tm_gmtoff; /* tm_gmtoff is Sun/DEC-ism */ if (tzn != NULL) - *tzn = (char *) tm->tm_zone; + *tzn = tm->tm_zone; #elif defined(HAVE_INT_TIMEZONE) *tzp = (tm->tm_isdst > 0) ? TIMEZONE_GLOBAL - SECS_PER_HOUR : TIMEZONE_GLOBAL; if (tzn != NULL) |
