83 lines
2.4 KiB
Diff
83 lines
2.4 KiB
Diff
From c723928663b03aed5fb74b3f821ac16a43d9118e Mon Sep 17 00:00:00 2001
|
|
From: Peter Jones <pjones@redhat.com>
|
|
Date: Tue, 28 May 2019 16:27:31 -0400
|
|
Subject: [PATCH 17/63] Always initialize any variable we use with sscanf's %n
|
|
|
|
Signed-off-by: Peter Jones <pjones@redhat.com>
|
|
---
|
|
src/linux-acpi-root.c | 2 +-
|
|
src/linux-pci-root.c | 2 +-
|
|
src/linux-pci.c | 2 +-
|
|
src/linux-soc-root.c | 2 +-
|
|
src/linux-virtblk.c | 2 +-
|
|
5 files changed, 5 insertions(+), 5 deletions(-)
|
|
|
|
diff --git a/src/linux-acpi-root.c b/src/linux-acpi-root.c
|
|
index 30728ded671..b237039685e 100644
|
|
--- a/src/linux-acpi-root.c
|
|
+++ b/src/linux-acpi-root.c
|
|
@@ -44,7 +44,7 @@ static ssize_t
|
|
parse_acpi_root(struct device *dev, const char *current, const char *root UNUSED)
|
|
{
|
|
int rc;
|
|
- int pos;
|
|
+ int pos = 0;
|
|
uint16_t pad0;
|
|
uint8_t pad1;
|
|
char *acpi_header = NULL;
|
|
diff --git a/src/linux-pci-root.c b/src/linux-pci-root.c
|
|
index 0605acfc7cb..0b5ad48d6db 100644
|
|
--- a/src/linux-pci-root.c
|
|
+++ b/src/linux-pci-root.c
|
|
@@ -44,7 +44,7 @@ static ssize_t
|
|
parse_pci_root(struct device *dev, const char *current, const char *root UNUSED)
|
|
{
|
|
int rc;
|
|
- int pos;
|
|
+ int pos = 0;
|
|
uint16_t root_domain;
|
|
uint8_t root_bus;
|
|
const char *devpart = current;
|
|
diff --git a/src/linux-pci.c b/src/linux-pci.c
|
|
index 64aaefb461c..c3b9fcf9092 100644
|
|
--- a/src/linux-pci.c
|
|
+++ b/src/linux-pci.c
|
|
@@ -46,7 +46,7 @@ static ssize_t
|
|
parse_pci(struct device *dev, const char *current, const char *root)
|
|
{
|
|
int rc;
|
|
- int pos;
|
|
+ int pos = 0;
|
|
const char *devpart = current;
|
|
|
|
debug("entry");
|
|
diff --git a/src/linux-soc-root.c b/src/linux-soc-root.c
|
|
index 373cd59521a..cbb4779b6fb 100644
|
|
--- a/src/linux-soc-root.c
|
|
+++ b/src/linux-soc-root.c
|
|
@@ -41,7 +41,7 @@ static ssize_t
|
|
parse_soc_root(struct device *dev UNUSED, const char *current, const char *root UNUSED)
|
|
{
|
|
int rc;
|
|
- int pos;
|
|
+ int pos = 0;
|
|
const char *devpart = current;
|
|
|
|
debug("entry");
|
|
diff --git a/src/linux-virtblk.c b/src/linux-virtblk.c
|
|
index 2e9889def2f..fe6eb873a37 100644
|
|
--- a/src/linux-virtblk.c
|
|
+++ b/src/linux-virtblk.c
|
|
@@ -48,7 +48,7 @@ static ssize_t
|
|
parse_virtblk(struct device *dev, const char *current, const char *root UNUSED)
|
|
{
|
|
uint32_t tosser;
|
|
- int pos;
|
|
+ int pos = 0;
|
|
int rc;
|
|
|
|
debug("entry");
|
|
--
|
|
2.26.2
|
|
|