aboutsummaryrefslogtreecommitdiff
path: root/libgfortran/intrinsics/getlog.c
diff options
context:
space:
mode:
authorJanne Blomqvist <jb@gcc.gnu.org>2017-01-13 21:53:16 +0200
committerJanne Blomqvist <jb@gcc.gnu.org>2017-01-13 21:53:16 +0200
commitc1e9bbcc49c1b9f169c5911f3871f5df109bff9b (patch)
treebf815e2471d2b7f7e44d76a31e98cc1d05e07b34 /libgfortran/intrinsics/getlog.c
parentbe4aa83d6ff4720fffd2c9f62c6e3082ece1937f (diff)
downloadgcc-c1e9bbcc49c1b9f169c5911f3871f5df109bff9b.zip
gcc-c1e9bbcc49c1b9f169c5911f3871f5df109bff9b.tar.gz
gcc-c1e9bbcc49c1b9f169c5911f3871f5df109bff9b.tar.bz2
Revert r244448
From-SVN: r244454
Diffstat (limited to 'libgfortran/intrinsics/getlog.c')
-rw-r--r--libgfortran/intrinsics/getlog.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libgfortran/intrinsics/getlog.c b/libgfortran/intrinsics/getlog.c
index 33ad52e..a856cd1 100644
--- a/libgfortran/intrinsics/getlog.c
+++ b/libgfortran/intrinsics/getlog.c
@@ -70,6 +70,7 @@ export_proto_np(PREFIX(getlog));
void
PREFIX(getlog) (char * login, gfc_charlen_type login_len)
{
+ int p_len;
char *p;
memset (login, ' ', login_len); /* Blank the string. */
@@ -106,7 +107,7 @@ PREFIX(getlog) (char * login, gfc_charlen_type login_len)
if (p == NULL)
goto cleanup;
- gfc_charlen_type p_len = strlen (p);
+ p_len = strlen (p);
if (login_len < p_len)
p_len = login_len;
memcpy (login, p, p_len);