]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libgfortran/intrinsics/getlog.c
PR 78534 Change character length from int to size_t
[thirdparty/gcc.git] / libgfortran / intrinsics / getlog.c
index a856cd1eee8d86ab7eb04087149720a3466b3005..33ad52e470f1c584ff324e5b27c14cef3ddad2fd 100644 (file)
@@ -70,7 +70,6 @@ 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.  */
@@ -107,7 +106,7 @@ PREFIX(getlog) (char * login, gfc_charlen_type login_len)
   if (p == NULL)
     goto cleanup;
 
-  p_len = strlen (p);
+  gfc_charlen_type p_len = strlen (p);
   if (login_len < p_len)
     p_len = login_len;
   memcpy (login, p, p_len);