summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorOkan Demirmen <okan@cvs.openbsd.org>2008-04-15 18:22:09 +0000
committerOkan Demirmen <okan@cvs.openbsd.org>2008-04-15 18:22:09 +0000
commit3bb72c1039cce5ceb976a89391127fe4e50890f1 (patch)
tree522bb73646d78672fc1b636ad1f357cf68d8a77a /app
parent2e86893c3849187560f6ac98cd0ce1e913f211a3 (diff)
malloc -> calloc
suggested by and ok oga@
Diffstat (limited to 'app')
-rw-r--r--app/cwm/calmwm.c3
-rw-r--r--app/cwm/parse.y5
2 files changed, 4 insertions, 4 deletions
diff --git a/app/cwm/calmwm.c b/app/cwm/calmwm.c
index c409d6b98..e10a89dc6 100644
--- a/app/cwm/calmwm.c
+++ b/app/cwm/calmwm.c
@@ -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);
diff --git a/app/cwm/parse.y b/app/cwm/parse.y
index c87d4758a..b40e5cd9b 100644
--- a/app/cwm/parse.y
+++ b/app/cwm/parse.y
@@ -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);