[haiku-commits] haiku: hrev53896 - src/system/kernel/debug

  • From: waddlesplash <waddlesplash@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Thu, 20 Feb 2020 15:12:19 -0500 (EST)

hrev53896 adds 1 changeset to branch 'master'
old head: 8e1e00129c2566e7291997aa87fa7b6e606ca5c6
new head: 46ab6b29170499b09d2b1fe53a4a1e6bbaf987de
overview: 
https://git.haiku-os.org/haiku/log/?qt=range&q=46ab6b291704+%5E8e1e00129c25

----------------------------------------------------------------------------

46ab6b291704: kernel/debug: Zero-initialize droppedEvents.
  
  There is a case where NextBuffer can return B_OK without initializing
  droppedEvents, so make sure we do that here.

                              [ Augustin Cavalier <waddlesplash@xxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev53896
Commit:      46ab6b29170499b09d2b1fe53a4a1e6bbaf987de
URL:         https://git.haiku-os.org/haiku/commit/?id=46ab6b291704
Author:      Augustin Cavalier <waddlesplash@xxxxxxxxx>
Date:        Thu Feb 20 17:11:09 2020 UTC

----------------------------------------------------------------------------

1 file changed, 1 insertion(+), 1 deletion(-)
src/system/kernel/debug/system_profiler.cpp | 2 +-

----------------------------------------------------------------------------

diff --git a/src/system/kernel/debug/system_profiler.cpp 
b/src/system/kernel/debug/system_profiler.cpp
index 87a794f55b..2ff451db17 100644
--- a/src/system/kernel/debug/system_profiler.cpp
+++ b/src/system/kernel/debug/system_profiler.cpp
@@ -1626,7 +1626,7 @@ _user_system_profiler_next_buffer(size_t bytesRead, 
uint64* _droppedEvents)
        BReference<SystemProfiler> reference(profiler);
        locker.Unlock();
 
-       uint64 droppedEvents;
+       uint64 droppedEvents = 0;
        status_t error = profiler->NextBuffer(bytesRead,
                _droppedEvents != NULL ? &droppedEvents : NULL);
        if (error == B_OK && _droppedEvents != NULL)


Other related posts:

  • » [haiku-commits] haiku: hrev53896 - src/system/kernel/debug - waddlesplash