On Tue, Oct 20, 2015 at 8:49 AM, Marek Olšák <mar...@gmail.com> wrote:
> On Tue, Oct 20, 2015 at 12:44 AM, Nanley Chery <nanleych...@gmail.com> > wrote: > > From: Nanley Chery <nanley.g.ch...@intel.com> > > > > Aside from those modified in this commit, all gl_extensions structs are > > zero-initialized by default. There is therefore no need to memset the > > structs to 0. Also, remove the open-coded memset in > > _mesa_init_extensions(). > > > > Signed-off-by: Nanley Chery <nanley.g.ch...@intel.com> > > --- > > src/mesa/main/extensions.c | 18 ++++-------------- > > 1 file changed, 4 insertions(+), 14 deletions(-) > > > > diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c > > index 365e7ed..6cd2b27 100644 > > --- a/src/mesa/main/extensions.c > > +++ b/src/mesa/main/extensions.c > > @@ -37,8 +37,8 @@ > > #include "macros.h" > > #include "mtypes.h" > > > > -struct gl_extensions _mesa_extension_override_enables; > > -struct gl_extensions _mesa_extension_override_disables; > > +struct gl_extensions _mesa_extension_override_enables = {0}; > > +struct gl_extensions _mesa_extension_override_disables = {0}; > > This looks good. Note that global variables are always > zero-initialized, thus the initializer is useless there. This hunk > could be dropped, but it's not a big deal. > > Thanks for the feedback. My git comment incorrectly says that those two variables are not zero-initialized. So I'll have to drop this hunk and update the comment. Nanley > Marek >
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev