소스 검색

Initialize strings as pointers instead of arrays.

Tobias Anderberg 22 년 전
부모
커밋
a63a0cd9bf
2개의 변경된 파일4개의 추가작업 그리고 4개의 파일을 삭제
  1. 2 2
      ldso/ldso/dl-elf.c
  2. 2 2
      ldso/ldso/readelflib1.c

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

@@ -223,8 +223,8 @@ struct elf_resolve *_dl_load_shared_library(int secure, struct dyn_elf **rpnt,
 	const char *pnt, *pnt1;
 	struct elf_resolve *tpnt1;
 	const char *libname;
-	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";
 
 	_dl_internal_error_number = 0;
 	libname = full_libname;

+ 2 - 2
ldso/ldso/readelflib1.c

@@ -223,8 +223,8 @@ struct elf_resolve *_dl_load_shared_library(int secure, struct dyn_elf **rpnt,
 	const char *pnt, *pnt1;
 	struct elf_resolve *tpnt1;
 	const char *libname;
-	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";
 
 	_dl_internal_error_number = 0;
 	libname = full_libname;