freebsd coverity: 164808 Uninitialized scalar variable
authorCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Sun, 19 Mar 2017 09:36:09 +0000 (11:36 +0200)
committerCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Sun, 19 Mar 2017 09:36:09 +0000 (11:36 +0200)
src/freebsd_sysctl.c

index c3f2b4cef6ab76ea65658308e65b52be7ed19fa9..8fc851481ea292b326c7488b85d40693533b3661 100644 (file)
@@ -380,7 +380,7 @@ int do_kern_cp_times(int update_every, usec_t dt) {
 
 int do_hw_intcnt(int update_every, usec_t dt) {
     static int mib_hw_intrcnt[2] = {0, 0};
-    size_t intrcnt_size;
+    size_t intrcnt_size = sizeof(mib_hw_intrcnt);
     int i;
 
     if (unlikely(GETSYSCTL_SIZE("hw.intrcnt", mib_hw_intrcnt, intrcnt_size))) {