sysdep.c (__gnat_localtime_tzoff): Properly delimit the substring which represents...
authorHristian Kirtchev <kirtchev@adacore.com>
Thu, 23 Oct 2014 10:33:06 +0000 (10:33 +0000)
committerArnaud Charlet <charlet@gcc.gnu.org>
Thu, 23 Oct 2014 10:33:06 +0000 (12:33 +0200)
2014-10-23  Hristian Kirtchev  <kirtchev@adacore.com>

* sysdep.c (__gnat_localtime_tzoff): Properly delimit the
substring which represents the time zone on VxWorks.

From-SVN: r216586

gcc/ada/ChangeLog
gcc/ada/sysdep.c

index 38edfbe..88bfeb7 100644 (file)
@@ -1,3 +1,8 @@
+2014-10-23  Hristian Kirtchev  <kirtchev@adacore.com>
+
+       * sysdep.c (__gnat_localtime_tzoff): Properly delimit the
+       substring which represents the time zone on VxWorks.
+
 2014-10-23  Vincent Celier  <celier@adacore.com>
 
        * gnatls.adb: If --RTS= was not used, check if there is a default
index bdda22c..0ae05e0 100644 (file)
@@ -866,7 +866,7 @@ __gnat_localtime_tzoff (const time_t *timer ATTRIBUTE_UNUSED,
 
     tz_start = index (tz_str, ':') + 2;
     tz_end = index (tz_start, ':');
-    tz_end = '\0';
+    *tz_end = '\0';
 
     /* The Ada layer expects an offset in seconds. Note that we must reverse
        the sign of the result since west is positive and east is negative on