Browse Source

Use a static const char array for static strings

Eric Andersen 21 years ago
parent
commit
192098126c
2 changed files with 4 additions and 4 deletions
  1. 2 2
      ldso/ldso/dl-elf.c
  2. 2 2
      ldso/ldso/readelflib1.c

+ 2 - 2
ldso/ldso/dl-elf.c

@@ -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;
 

+ 2 - 2
ldso/ldso/readelflib1.c

@@ -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;