summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJunkyeong Kim <jk0430.kim@samsung.com>2016-06-30 22:16:43 +0900
committerJunkyeong Kim <jk0430.kim@samsung.com>2016-06-30 22:16:48 +0900
commit822d0cb822efecd4a5985ae3e5f51b437690f639 (patch)
tree57a29960d4293b94cc29b2ed108108886351dcbc /src
parente0c4c550c02d9b4b6635d27b0ee3bdcbfa819fcd (diff)
downloadlibpciaccess-tizen_3.0_tv.tar.gz
libpciaccess-tizen_3.0_tv.tar.bz2
libpciaccess-tizen_3.0_tv.zip
Change-Id: I6c3971a78581e90122ae6b9a95b6d4f99bde7a46 Signed-off-by: Junkyeong Kim <jk0430.kim@samsung.com>
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 );