diff options
author | Lianbo Jiang <lijiang@redhat.com> | 2019-08-23 20:05:37 +0800 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2019-09-08 13:25:09 +0100 |
commit | 14ad054e7baa788a6629385ffe5e0f1996b7de02 (patch) | |
tree | bc6be1fe9c28bf23cd28b747a167b2f5586eef14 | |
parent | 545c811050a375f79e0fa0e107cb35b9ae3a1599 (diff) | |
download | kexec-tools-14ad054e7baa788a6629385ffe5e0f1996b7de02.tar.gz |
Fix an error definition about the variable 'fname'
The variable 'fname' is mistakenly defined two twice, the first definition
is in the vmcore-dmesg.c, and the second definition is in the elf_info.c.
That is confused and incorrect although it's a static type, because the
value of variable 'fname' is not assigned(set) in elf_info.c. Anyway, its
value will be always 'null' when printing an error information.
Signed-off-by: Lianbo Jiang <lijiang@redhat.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
-rw-r--r-- | util_lib/elf_info.c | 2 | ||||
-rw-r--r-- | vmcore-dmesg/vmcore-dmesg.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/util_lib/elf_info.c b/util_lib/elf_info.c index d9397ecd..5d0efaaf 100644 --- a/util_lib/elf_info.c +++ b/util_lib/elf_info.c @@ -20,7 +20,7 @@ /* The 32bit and 64bit note headers make it clear we don't care */ typedef Elf32_Nhdr Elf_Nhdr; -static const char *fname; +const char *fname; static Elf64_Ehdr ehdr; static Elf64_Phdr *phdr; static int num_pt_loads; diff --git a/vmcore-dmesg/vmcore-dmesg.c b/vmcore-dmesg/vmcore-dmesg.c index 7a386b38..bebc348a 100644 --- a/vmcore-dmesg/vmcore-dmesg.c +++ b/vmcore-dmesg/vmcore-dmesg.c @@ -3,7 +3,7 @@ /* The 32bit and 64bit note headers make it clear we don't care */ typedef Elf32_Nhdr Elf_Nhdr; -static const char *fname; +extern const char *fname; int main(int argc, char **argv) { |