The diff below removes an unncessary memset() on line 253 of conf.c.

cwm used to support reloading the config file, but okan@ removed that
functionality about a year ago in favor of simply restarting the whole
thing.  So while it used to be possible to call conf_init() multiple
times, it is now only ever called once when cwm first starts.  The
memset in conf_init() (conf.c:253) was necessary for re-zero'ing out
the configuration each time it was reloaded.  However, now conf_init()
is only ever called once (in main(), calmwm.c:110), and since Conf
is a static variable (calmwm.c:47) the compiler has already initialized
it zero'ed out for us.


Index: conf.c
===================================================================
RCS file: /work/cvsroot/xenocara/app/cwm/conf.c,v
retrieving revision 1.173
diff -p -u -r1.173 conf.c
--- conf.c      21 Apr 2014 12:52:14 -0000      1.173
+++ conf.c      24 Apr 2014 02:53:40 -0000
@@ -250,8 +250,6 @@ conf_init(struct conf *c)
 {
        unsigned int    i;
 
-       (void)memset(c, 0, sizeof(*c));
-
        c->bwidth = CONF_BWIDTH;
        c->mamount = CONF_MAMOUNT;
        c->snapdist = CONF_SNAPDIST;

Reply via email to