OSDN Git Service

Use a static const char array for static strings
authorEric Andersen <andersen@codepoet.org>
Wed, 4 Feb 2004 10:24:12 +0000 (10:24 -0000)
committerEric Andersen <andersen@codepoet.org>
Wed, 4 Feb 2004 10:24:12 +0000 (10:24 -0000)
ldso/ldso/dl-elf.c
ldso/ldso/readelflib1.c

index 4324aed..840a630 100644 (file)
@@ -171,8 +171,8 @@ struct elf_resolve *_dl_check_if_named_library_is_loaded(const char *full_libnam
        const char *pnt, *pnt1;
        struct elf_resolve *tpnt1;
        const char *libname, *libname2;
-       static const char *libc = "libc.so.";
-       static const char *aborted_wrong_lib = "%s: aborted attempt to load %s!\n";
+       static const char libc[] = "libc.so.";
+       static const char aborted_wrong_lib[] = "%s: aborted attempt to load %s!\n";
 
        pnt = libname = full_libname;
 
index 4324aed..840a630 100644 (file)
@@ -171,8 +171,8 @@ struct elf_resolve *_dl_check_if_named_library_is_loaded(const char *full_libnam
        const char *pnt, *pnt1;
        struct elf_resolve *tpnt1;
        const char *libname, *libname2;
-       static const char *libc = "libc.so.";
-       static const char *aborted_wrong_lib = "%s: aborted attempt to load %s!\n";
+       static const char libc[] = "libc.so.";
+       static const char aborted_wrong_lib[] = "%s: aborted attempt to load %s!\n";
 
        pnt = libname = full_libname;