gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnash-commit] Make sure to initialize FBAggGlue member variables fb


From: Bastiaan Jacques
Subject: Re: [Gnash-commit] Make sure to initialize FBAggGlue member variables fb_var_screeninfo...
Date: Fri, 25 Apr 2014 00:13:34 +0200 (CEST)
User-agent: Alpine 2.00 (DEB 1167 2008-08-23)

commit a9b838f9bf655ac4b204c69e4988a99196ccc28b
Author: Petter Reinholdtsen <address@hidden>
Date:   Thu Apr 24 23:52:02 2014 +0200

    Make sure to initialize FBAggGlue member variables fb_var_screeninfo
and fb_fix_screeninfo in the other constructor too (Coverity CID
1149298).

diff --git a/gui/fb/fb_glue_agg.cpp b/gui/fb/fb_glue_agg.cpp
index 6fb60fd..c9e2d1c 100644
--- a/gui/fb/fb_glue_agg.cpp
+++ b/gui/fb/fb_glue_agg.cpp
@@ -55,6 +55,8 @@ FBAggGlue::FBAggGlue(int fd)
     : _fd(fd)
 {
// GNASH_REPORT_FUNCTION; + memset(&_varinfo, 0, sizeof(fb_var_screeninfo));
+    memset(&_fixinfo, 0, sizeof(fb_fix_screeninfo));


The C++ way to set all members of a struct without a user-defined
constructor to zero, is to call the default constructor, which you can
do in the initialization list.

Bastiaan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]