initialize buf, use integer variable for read 03/77703/1 accepted/tizen_3.0.m2_mobile accepted/tizen_3.0.m2_tv accepted/tizen_3.0.m2_wearable accepted/tizen_3.0_common accepted/tizen_3.0_ivi accepted/tizen_3.0_mobile accepted/tizen_3.0_tv accepted/tizen_3.0_wearable accepted/tizen_common accepted/tizen_ivi accepted/tizen_mobile accepted/tizen_tv accepted/tizen_wearable tizen_3.0 tizen_3.0.m2 tizen_3.0_tv accepted/tizen/3.0.m2/mobile/20170105.024655 accepted/tizen/3.0.m2/tv/20170105.024838 accepted/tizen/3.0.m2/wearable/20170105.025008 accepted/tizen/3.0/common/20161114.111031 accepted/tizen/3.0/ivi/20161011.050513 accepted/tizen/3.0/mobile/20161015.033626 accepted/tizen/3.0/tv/20161016.004849 accepted/tizen/3.0/wearable/20161015.083153 accepted/tizen/4.0/unified/20170816.013530 accepted/tizen/4.0/unified/20170828.222830 accepted/tizen/common/20160703.130852 accepted/tizen/ivi/20160701.044109 accepted/tizen/mobile/20160701.044022 accepted/tizen/tv/20160701.044042 accepted/tizen/unified/20170309.035957 accepted/tizen/wearable/20160701.043845 submit/tizen/20160701.013624 submit/tizen_3.0.m2/20170104.093753 submit/tizen_3.0_common/20161104.104000 submit/tizen_3.0_ivi/20161010.000004 submit/tizen_3.0_mobile/20161015.000004 submit/tizen_3.0_tv/20161015.000003 submit/tizen_3.0_wearable/20161015.000003 submit/tizen_4.0/20170811.094300 submit/tizen_4.0/20170828.100006 submit/tizen_common/20160701.180000 submit/tizen_unified/20170308.100414 tizen_4.0.m1_release
authorJunkyeong Kim <jk0430.kim@samsung.com>
Thu, 30 Jun 2016 13:16:43 +0000 (22:16 +0900)
committerJunkyeong Kim <jk0430.kim@samsung.com>
Thu, 30 Jun 2016 13:16:48 +0000 (22:16 +0900)
Change-Id: I6c3971a78581e90122ae6b9a95b6d4f99bde7a46
Signed-off-by: Junkyeong Kim <jk0430.kim@samsung.com>
src/common_bridge.c
src/linux_sysfs.c

index b4b5d7e..e6197af 100644 (file)
@@ -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;
 
index 97fcf36..ce6f295 100644 (file)
@@ -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 );