]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
(_dl_open): Fix a typo.
authorUlrich Drepper <drepper@redhat.com>
Mon, 30 Mar 1998 17:42:57 +0000 (17:42 +0000)
committerUlrich Drepper <drepper@redhat.com>
Mon, 30 Mar 1998 17:42:57 +0000 (17:42 +0000)
(_dl_global_scope_alloc): Make it static.

elf/dl-open.c

index 63a7091fffc0f226aef7bd50f3447ee351d95ca5..c093e543027b70561396b3c28c5fd7a795956e58 100644 (file)
@@ -36,7 +36,7 @@ extern char **__libc_argv;
 
 extern char **__environ;
 
-size_t _dl_global_scope_alloc;
+static size_t _dl_global_scope_alloc;
 
 struct link_map *
 _dl_open (const char *file, int mode)
@@ -101,7 +101,8 @@ _dl_open (const char *file, int mode)
        {
          /* This is the first dynamic object given global scope.  */
          _dl_global_scope_alloc = 8;
-         _dl_global_scope = malloc (8 * sizeof (struct link_map *));
+         _dl_global_scope = malloc (_dl_global_scope_alloc
+                                    * sizeof (struct link_map *));
          if (! _dl_global_scope)
            {
              _dl_global_scope = _dl_default_scope;
@@ -122,7 +123,8 @@ _dl_open (const char *file, int mode)
            {
              /* Must extend the list.  */
              struct link_map **new = realloc (_dl_global_scope,
-                                              _dl_global_scope_alloc * 2);
+                                              _dl_global_scope_alloc * 2
+                                              * sizeof (struct link_map *));
              if (! new)
                goto nomem;
              _dl_global_scope_end = new + (_dl_global_scope_end -