Skip to content

Commit

Permalink
Always initialize any variable we use with sscanf's %n
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Jones <pjones@redhat.com>
  • Loading branch information
vathpela committed May 28, 2019
1 parent 2bd7a0b commit 5dc12cc
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/linux-acpi-root.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/linux-pci-root.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/linux-pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
2 changes: 1 addition & 1 deletion src/linux-soc-root.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
2 changes: 1 addition & 1 deletion src/linux-virtblk.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 5dc12cc

Please sign in to comment.