|
|
bda30f |
From 14ad054e7baa788a6629385ffe5e0f1996b7de02 Mon Sep 17 00:00:00 2001
|
|
|
bda30f |
From: Lianbo Jiang <lijiang@redhat.com>
|
|
|
bda30f |
Date: Fri, 23 Aug 2019 20:05:37 +0800
|
|
|
bda30f |
Subject: [PATCH 2/5] Fix an error definition about the variable 'fname'
|
|
|
bda30f |
|
|
|
bda30f |
The variable 'fname' is mistakenly defined two twice, the first definition
|
|
|
bda30f |
is in the vmcore-dmesg.c, and the second definition is in the elf_info.c.
|
|
|
bda30f |
That is confused and incorrect although it's a static type, because the
|
|
|
bda30f |
value of variable 'fname' is not assigned(set) in elf_info.c. Anyway, its
|
|
|
bda30f |
value will be always 'null' when printing an error information.
|
|
|
bda30f |
|
|
|
bda30f |
Signed-off-by: Lianbo Jiang <lijiang@redhat.com>
|
|
|
bda30f |
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
|
bda30f |
---
|
|
|
bda30f |
util_lib/elf_info.c | 2 +-
|
|
|
bda30f |
vmcore-dmesg/vmcore-dmesg.c | 2 +-
|
|
|
bda30f |
2 files changed, 2 insertions(+), 2 deletions(-)
|
|
|
bda30f |
|
|
|
bda30f |
diff --git a/util_lib/elf_info.c b/util_lib/elf_info.c
|
|
|
bda30f |
index d9397ecd8626..5d0efaafab53 100644
|
|
|
bda30f |
--- a/util_lib/elf_info.c
|
|
|
bda30f |
+++ b/util_lib/elf_info.c
|
|
|
bda30f |
@@ -20,7 +20,7 @@
|
|
|
bda30f |
/* The 32bit and 64bit note headers make it clear we don't care */
|
|
|
bda30f |
typedef Elf32_Nhdr Elf_Nhdr;
|
|
|
bda30f |
|
|
|
bda30f |
-static const char *fname;
|
|
|
bda30f |
+const char *fname;
|
|
|
bda30f |
static Elf64_Ehdr ehdr;
|
|
|
bda30f |
static Elf64_Phdr *phdr;
|
|
|
bda30f |
static int num_pt_loads;
|
|
|
bda30f |
diff --git a/vmcore-dmesg/vmcore-dmesg.c b/vmcore-dmesg/vmcore-dmesg.c
|
|
|
bda30f |
index 7a386b380291..bebc348a657e 100644
|
|
|
bda30f |
--- a/vmcore-dmesg/vmcore-dmesg.c
|
|
|
bda30f |
+++ b/vmcore-dmesg/vmcore-dmesg.c
|
|
|
bda30f |
@@ -3,7 +3,7 @@
|
|
|
bda30f |
/* The 32bit and 64bit note headers make it clear we don't care */
|
|
|
bda30f |
typedef Elf32_Nhdr Elf_Nhdr;
|
|
|
bda30f |
|
|
|
bda30f |
-static const char *fname;
|
|
|
bda30f |
+extern const char *fname;
|
|
|
bda30f |
|
|
|
bda30f |
int main(int argc, char **argv)
|
|
|
bda30f |
{
|
|
|
bda30f |
--
|
|
|
bda30f |
2.17.1
|
|
|
bda30f |
|