aboutsummaryrefslogtreecommitdiff
path: root/libgfortran/intrinsics
diff options
context:
space:
mode:
authorJanne Blomqvist <jb@gcc.gnu.org>2011-04-16 20:43:03 +0300
committerJanne Blomqvist <jb@gcc.gnu.org>2011-04-16 20:43:03 +0300
commitd30fe1c5cdc98c83c1d29d6b20f88a13328faddd (patch)
treea18b46c3ac70b0e29558cbe228eaa2af23e758b9 /libgfortran/intrinsics
parent9c575e20c33a032619b063d243f6e7320fcda878 (diff)
downloadgcc-d30fe1c5cdc98c83c1d29d6b20f88a13328faddd.zip
gcc-d30fe1c5cdc98c83c1d29d6b20f88a13328faddd.tar.gz
gcc-d30fe1c5cdc98c83c1d29d6b20f88a13328faddd.tar.bz2
Replace sprintf with snprintf
From-SVN: r172590
Diffstat (limited to 'libgfortran/intrinsics')
-rw-r--r--libgfortran/intrinsics/date_and_time.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/libgfortran/intrinsics/date_and_time.c b/libgfortran/intrinsics/date_and_time.c
index 793df68..fa51d5f 100644
--- a/libgfortran/intrinsics/date_and_time.c
+++ b/libgfortran/intrinsics/date_and_time.c
@@ -168,7 +168,6 @@ date_and_time (char *__date, char *__time, char *__zone,
values[5] = local_time.tm_min;
values[6] = local_time.tm_sec;
-#if HAVE_SNPRINTF
if (__date)
snprintf (date, DATE_LEN + 1, "%04d%02d%02d",
values[0], values[1], values[2]);
@@ -179,18 +178,6 @@ date_and_time (char *__date, char *__time, char *__zone,
if (__zone)
snprintf (zone, ZONE_LEN + 1, "%+03d%02d",
values[3] / 60, abs (values[3] % 60));
-#else
- if (__date)
- sprintf (date, "%04d%02d%02d", values[0], values[1], values[2]);
-
- if (__time)
- sprintf (timec, "%02d%02d%02d.%03d",
- values[4], values[5], values[6], values[7]);
-
- if (__zone)
- sprintf (zone, "%+03d%02d",
- values[3] / 60, abs (values[3] % 60));
-#endif
}
else
{