From c1394da1a8369dd33e6f93997a072e3736fab7b5 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 6 Sep 1994 23:05:52 +0000 Subject: [PATCH] (prefix_array, glob): Avoid const on initialized variables. Some compiler generates bad code. --- posix/glob.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/posix/glob.c b/posix/glob.c index d5ec1e9cf2..8183b7844c 100644 --- a/posix/glob.c +++ b/posix/glob.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as @@ -344,7 +344,7 @@ glob (pattern, flags, errfunc, pglob) /* No matches. */ if (flags & GLOB_NOCHECK) { - const size_t len = strlen (pattern) + 1; + size_t len = strlen (pattern) + 1; char *patcopy = (char *) malloc (len); if (patcopy == NULL) return GLOB_NOSPACE; @@ -458,7 +458,7 @@ prefix_array (dirname, array, n) for (i = 0; i < n; ++i) { - const size_t eltlen = strlen (array[i]) + 1; + size_t eltlen = strlen (array[i]) + 1; char *new = (char *) malloc (dirlen + 1 + eltlen); if (new == NULL) { -- 2.11.4.GIT