diff options
author | okan | 2008-04-15 18:22:08 +0000 |
---|---|---|
committer | okan | 2008-04-15 18:22:08 +0000 |
commit | 610683e4362bfb1cd12731e70b8628dec527ccfe (patch) | |
tree | 17889d13481716d024dcc413991af02706721a38 | |
parent | 00b5e927adcf960e2d9e810f65c0a460e40d467c (diff) | |
download | cwm-610683e4362bfb1cd12731e70b8628dec527ccfe.tar.gz |
malloc -> calloc
suggested by and ok oga@
Diffstat (limited to '')
-rw-r--r-- | calmwm.c | 3 | ||||
-rw-r--r-- | parse.y | 5 |
2 files changed, 4 insertions, 4 deletions
@@ -15,7 +15,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: calmwm.c,v 1.14 2008/04/03 13:58:57 simon Exp $ + * $Id: calmwm.c,v 1.15 2008/04/15 18:22:08 okan Exp $ */ #include "headers.h" @@ -81,6 +81,7 @@ main(int argc, char **argv) group_init(); Starting = 1; + bzero(&Conf, sizeof(Conf)); conf_setup(&Conf, conffile); client_setup(); x_setup(display_name); @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.1 2008/03/23 15:09:21 simon Exp $ */ +/* $OpenBSD: parse.y,v 1.2 2008/04/15 18:22:08 okan Exp $ */ /* * Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -513,8 +513,7 @@ parse_config(const char *filename, struct conf *xconf) { int errors = 0; - if ((conf = malloc(sizeof(struct conf))) == NULL) - return (-1); + XCALLOC(conf, struct conf); if ((file = pushfile(filename)) == NULL) { free(conf); |