<i18n dev> RFR: 8134505: Cleanup of "TimeZone_md.c"
Langer, Christoph
christoph.langer at sap.com
Thu Sep 3 13:53:56 UTC 2015
Hi,
I updated the webrev at line770 and removed the platform specific #ifdefs.
Best regards
Christoph
From: Langer, Christoph
Sent: Mittwoch, 26. August 2015 16:34
To: 'i18n-dev at openjdk.java.net' <i18n-dev at openjdk.java.net>
Subject: RFR: 8134505: Cleanup of "TimeZone_md.c"
Hi,
when working on TimeZone_md.c lately, I found it worthwhile to do some cleanup on it. Please review my changes.
Bug: https://bugs.openjdk.java.net/browse/JDK-8134505
Webrev: http://cr.openjdk.java.net/~goetz/webrevs/8134505-timeZone/webrev.01/
I basically did the following things:
- clean up some typos and comment errors
- added #include "TimeZone_md.h"
- split up the platform specific define sections into an #ifdef <platform1> #elif <platform2> #elif ... #endif construct
- moved some AIX coding from the #ifdef block at the bottom of the file into the first AIX specific block
- AIX function "mapPlatformToJavaTimezone": use a dynamic malloced buffer instead of a fixed length buffer
- refactor function "findJavaTZ_md" to make it more straightforward and to avoid unnecessary mallocs and don't forget necessary frees
I'm also wondering if the "if (tz == NULL || *tz == '\0') {" of line 770 could be used for all platforms instead of Solaris and AIX only. The other platforms will only do a check if TZ is NULL but not if it is an empty string.
Thanks and best regards
Christoph
More information about the i18n-dev
mailing list