summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/common_bridge.c2
-rw-r--r--src/linux_sysfs.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/src/common_bridge.c b/src/common_bridge.c
index b4b5d7e..e6197af 100644
--- a/src/common_bridge.c
+++ b/src/common_bridge.c
@@ -56,7 +56,7 @@
static int
read_bridge_info( struct pci_device_private * priv )
{
- uint8_t buf[0x40];
+ uint8_t buf[0x40] = {0, };
pciaddr_t bytes;
int err;
diff --git a/src/linux_sysfs.c b/src/linux_sysfs.c
index 97fcf36..ce6f295 100644
--- a/src/linux_sysfs.c
+++ b/src/linux_sysfs.c
@@ -247,13 +247,14 @@ pci_device_linux_sysfs_probe( struct pci_device * dev )
dev->func );
fd = open( name, O_RDONLY | O_CLOEXEC);
if ( fd != -1 ) {
+ int ret;
char * next;
pciaddr_t low_addr;
pciaddr_t high_addr;
pciaddr_t flags;
- bytes = read( fd, resource, 512 );
+ ret = read( fd, resource, 512 );
resource[511] = '\0';
close( fd );