changeset 8:e22584460709

Switched allocating the box structs with calloc instead of malloc so that the flags (and perhaps other structs) would be initialized to 0.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Tue, 03 Jul 2001 14:04:12 +0000
parents 005fa766e8c2
children 3383ed751a7e
files os2/dw.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/os2/dw.c	Tue Jul 03 13:54:29 2001 +0000
+++ b/os2/dw.c	Tue Jul 03 14:04:12 2001 +0000
@@ -2442,7 +2442,7 @@
 HWND dw_window_new(HWND hwndOwner, char *title, ULONG flStyle)
 {
 	HWND hwndclient = 0, hwndframe;
-	Box *newbox = malloc(sizeof(Box));
+	Box *newbox = calloc(1, sizeof(Box));
 	PFNWP *blah = malloc(sizeof(PFNWP));
 
 	newbox->pad = 0;
@@ -2467,7 +2467,7 @@
  */
 HWND dw_box_new(int type, int pad)
 {
-	Box *newbox = malloc(sizeof(Box));
+	Box *newbox = calloc(1, sizeof(Box));
 	HWND hwndframe;
 
 	newbox->pad = pad;
@@ -2501,7 +2501,7 @@
  */
 HWND dw_groupbox_new(int type, int pad, char *title)
 {
-	Box *newbox = malloc(sizeof(Box));
+	Box *newbox = calloc(1, sizeof(Box));
 	HWND hwndframe;
 
 	newbox->pad = pad;