Ticket #5086: libs_libmyth_screensaver-x11.cpp-init-member-vars.patch

File libs_libmyth_screensaver-x11.cpp-init-member-vars.patch, 845 bytes (added by Erik Hovland <erik@…>, 12 years ago)

Initliaze ScreenSaverState? member vars in ctor

  • libs/libmyth/screensaver-x11.cpp

    The struct ScreenSaverState has a member var saved that is initialized. But
    
    From: Erik Hovland <erik@hovland.org>
    
    none of the other member vars are initialized. They all should be initialized
    to something sane if possible.
    ---
    
     libs/libmyth/screensaver-x11.cpp |    3 ++-
     1 files changed, 2 insertions(+), 1 deletions(-)
    
    diff --git a/libs/libmyth/screensaver-x11.cpp b/libs/libmyth/screensaver-x11.cpp
    index b907e33..c24f572 100644
    a b class ScreenSaverX11Private 
    149149  private:
    150150    struct ScreenSaverState
    151151    {
    152         ScreenSaverState() : saved(false) {}
     152        ScreenSaverState() : saved(false), timeout(-1), interval(-1),
     153            preferblank(-1), allowexposure(-1) {}
    153154        bool saved;
    154155        int timeout;
    155156        int interval;