diff --git a/WINGs/bagtree.c b/WINGs/bagtree.c index a37c2d48..bf1ac488 100644 --- a/WINGs/bagtree.c +++ b/WINGs/bagtree.c @@ -358,16 +358,10 @@ WMBag *WMCreateTreeBagWithDestructor(WMFreeDataProc * destructor) WMBag *bag; bag = wmalloc(sizeof(WMBag)); - - memset(bag, 0, sizeof(WMBag)); - bag->nil = wmalloc(sizeof(W_Node)); - memset(bag->nil, 0, sizeof(W_Node)); bag->nil->left = bag->nil->right = bag->nil->parent = bag->nil; bag->nil->index = WBNotFound; - bag->root = bag->nil; - bag->destructor = destructor; return bag; diff --git a/WINGs/hashtable.c b/WINGs/hashtable.c index a85f0ee2..9822c4ee 100644 --- a/WINGs/hashtable.c +++ b/WINGs/hashtable.c @@ -81,7 +81,6 @@ static void rebuildTable(WMHashTable * table) newSize = table->size * 2; table->table = wmalloc(sizeof(char *) * newSize); - memset(table->table, 0, sizeof(char *) * newSize); table->size = newSize; for (i = 0; i < oldSize; i++) { diff --git a/WINGs/memory.c b/WINGs/memory.c index 0e350bf9..39c7fc9b 100644 --- a/WINGs/memory.c +++ b/WINGs/memory.c @@ -98,6 +98,7 @@ void *wmalloc(size_t size) } } } + memset(tmp, 0, size); return tmp; } diff --git a/WINGs/notification.c b/WINGs/notification.c index 3febb2c7..5d0c8028 100644 --- a/WINGs/notification.c +++ b/WINGs/notification.c @@ -35,11 +35,9 @@ WMNotification *WMCreateNotification(const char *name, void *object, void *clien Notification *nPtr; nPtr = wmalloc(sizeof(Notification)); - nPtr->name = name; nPtr->object = object; nPtr->clientData = clientData; - nPtr->refCount = 1; return nPtr; @@ -89,11 +87,9 @@ static NotificationCenter *notificationCenter = NULL; void W_InitNotificationCenter(void) { notificationCenter = wmalloc(sizeof(NotificationCenter)); - notificationCenter->nameTable = WMCreateHashTable(WMStringPointerHashCallbacks); notificationCenter->objectTable = WMCreateHashTable(WMIntHashCallbacks); notificationCenter->nilList = NULL; - notificationCenter->observerTable = WMCreateHashTable(WMIntHashCallbacks); } @@ -366,7 +362,6 @@ WMNotificationQueue *WMCreateNotificationQueue(void) NotificationQueue *queue; queue = wmalloc(sizeof(NotificationQueue)); - queue->asapQueue = WMCreateArrayWithDestructor(8, (WMFreeDataProc *) WMReleaseNotification); queue->idleQueue = WMCreateArrayWithDestructor(8, (WMFreeDataProc *) WMReleaseNotification); queue->next = notificationQueueList; diff --git a/WINGs/proplist.c b/WINGs/proplist.c index b6cc1ab2..593112f3 100644 --- a/WINGs/proplist.c +++ b/WINGs/proplist.c @@ -891,7 +891,6 @@ WMPropList *WMCreatePLString(char *str) wassertrv(str != NULL, NULL); plist = (WMPropList *) wmalloc(sizeof(W_PropList)); - plist->type = WPLString; plist->d.string = wstrdup(str); plist->retainCount = 1; @@ -906,7 +905,6 @@ WMPropList *WMCreatePLData(WMData * data) wassertrv(data != NULL, NULL); plist = (WMPropList *) wmalloc(sizeof(W_PropList)); - plist->type = WPLData; plist->d.data = WMRetainData(data); plist->retainCount = 1; @@ -921,7 +919,6 @@ WMPropList *WMCreatePLDataWithBytes(unsigned char *bytes, unsigned int length) wassertrv(bytes != NULL, NULL); plist = (WMPropList *) wmalloc(sizeof(W_PropList)); - plist->type = WPLData; plist->d.data = WMCreateDataWithBytes(bytes, length); plist->retainCount = 1; @@ -936,7 +933,6 @@ WMPropList *WMCreatePLDataWithBytesNoCopy(unsigned char *bytes, unsigned int len wassertrv(bytes != NULL, NULL); plist = (WMPropList *) wmalloc(sizeof(W_PropList)); - plist->type = WPLData; plist->d.data = WMCreateDataWithBytesNoCopy(bytes, length, destructor); plist->retainCount = 1; diff --git a/WINGs/selection.c b/WINGs/selection.c index ce93d225..b07739d3 100644 --- a/WINGs/selection.c +++ b/WINGs/selection.c @@ -341,7 +341,6 @@ Bool WMCreateSelectionHandler(WMView * view, Atom selection, Time timestamp, WMS /*//printf("created selection handler for %d\n", W_VIEW_DRAWABLE(view)); */ handler = wmalloc(sizeof(SelectionHandler)); - handler->view = view; handler->selection = selection; handler->timestamp = timestamp; @@ -373,14 +372,12 @@ WMRequestSelection(WMView * view, Atom selection, Atom target, Time timestamp, } handler = wmalloc(sizeof(SelectionCallback)); - handler->view = view; handler->selection = selection; handler->target = target; handler->timestamp = timestamp; handler->callback = callback; handler->data = cdata; - memset(&handler->flags, 0, sizeof(handler->flags)); if (selCallbacks == NULL) { selCallbacks = WMCreateArrayWithDestructor(4, wfree); diff --git a/WINGs/string.c b/WINGs/string.c index d4c426d4..5dbba85f 100644 --- a/WINGs/string.c +++ b/WINGs/string.c @@ -41,7 +41,6 @@ char *wtokennext(char *word, char **next) ptr = word; state = 0; - *t = 0; while (1) { if (*ptr == 0) ctype = PRC_EOS; @@ -121,7 +120,6 @@ char *wtokenjoin(char **list, int count) flat_string = wmalloc(j + count + 1); - *flat_string = 0; for (i = 0; i < count; i++) { if (list[i] != NULL && list[i][0] != 0) { if (i > 0) diff --git a/WINGs/tree.c b/WINGs/tree.c index 45c1497f..875d46d8 100644 --- a/WINGs/tree.c +++ b/WINGs/tree.c @@ -40,10 +40,7 @@ WMTreeNode *WMCreateTreeNodeWithDestructor(void *data, WMFreeDataProc * destruct WMTreeNode *aNode; aNode = (WMTreeNode *) wmalloc(sizeof(W_TreeNode)); - memset(aNode, 0, sizeof(W_TreeNode)); - aNode->destructor = destructor; - aNode->data = data; aNode->parent = NULL; aNode->depth = 0; diff --git a/WINGs/userdefaults.c b/WINGs/userdefaults.c index ee3a3b73..ea5cceba 100644 --- a/WINGs/userdefaults.c +++ b/WINGs/userdefaults.c @@ -263,10 +263,7 @@ WMUserDefaults *WMGetStandardUserDefaults(void) /* we didn't found the database we are looking for. Go read it. */ defaults = wmalloc(sizeof(WMUserDefaults)); - memset(defaults, 0, sizeof(WMUserDefaults)); - defaults->defaults = WMCreatePLDictionary(NULL, NULL); - defaults->searchList = wmalloc(sizeof(WMPropList *) * 3); /* application domain */ @@ -355,12 +352,9 @@ WMUserDefaults *WMGetDefaultsFromPath(char *path) } } - /* we didn't found the database we are looking for. Go read it. */ + /* we didn't found the database we are looking for. Go read it. XXX wtf? */ defaults = wmalloc(sizeof(WMUserDefaults)); - memset(defaults, 0, sizeof(WMUserDefaults)); - defaults->defaults = WMCreatePLDictionary(NULL, NULL); - defaults->searchList = wmalloc(sizeof(WMPropList *) * 2); /* the domain we want, go in the first position */ diff --git a/WINGs/wballoon.c b/WINGs/wballoon.c index 1b33a895..de8c5026 100644 --- a/WINGs/wballoon.c +++ b/WINGs/wballoon.c @@ -50,7 +50,6 @@ struct W_Balloon *W_CreateBalloon(WMScreen * scr) Balloon *bPtr; bPtr = wmalloc(sizeof(Balloon)); - memset(bPtr, 0, sizeof(Balloon)); bPtr->view = W_CreateUnmanagedTopView(scr); if (!bPtr->view) { diff --git a/WINGs/wbox.c b/WINGs/wbox.c index 2c7d9490..494f5903 100644 --- a/WINGs/wbox.c +++ b/WINGs/wbox.c @@ -44,7 +44,6 @@ WMBox *WMCreateBox(WMWidget * parent) Box *bPtr; bPtr = wmalloc(sizeof(Box)); - memset(bPtr, 0, sizeof(Box)); bPtr->widgetClass = WC_Box; diff --git a/WINGs/wbrowser.c b/WINGs/wbrowser.c index b539543a..440acb91 100644 --- a/WINGs/wbrowser.c +++ b/WINGs/wbrowser.c @@ -95,7 +95,6 @@ WMBrowser *WMCreateBrowser(WMWidget * parent) wassertrv(parent, NULL); bPtr = wmalloc(sizeof(WMBrowser)); - memset(bPtr, 0, sizeof(WMBrowser)); bPtr->widgetClass = WC_Browser; diff --git a/WINGs/wcolorpanel.c b/WINGs/wcolorpanel.c index 1aa5a571..e18278ee 100644 --- a/WINGs/wcolorpanel.c +++ b/WINGs/wcolorpanel.c @@ -374,8 +374,6 @@ static WMColorPanel *makeColorPanel(WMScreen * scrPtr, char *name) GC wgc = WMColorGC(scrPtr->white); panel = wmalloc(sizeof(WMColorPanel)); - memset(panel, 0, sizeof(WMColorPanel)); - panel->color.rgb.red = 0; panel->color.rgb.green = 0; panel->color.rgb.blue = 0; @@ -1842,7 +1840,6 @@ static wheelMatrix *wheelCreateMatrix(unsigned int width, unsigned int height) assert((width > 0) && (height > 0)); matrix = wmalloc(sizeof(wheelMatrix)); - memset(matrix, 0, sizeof(wheelMatrix)); matrix->width = width; matrix->height = height; @@ -3446,15 +3443,7 @@ RColor ulongToRColor(WMScreen * scr, unsigned long value) RColor color; XColor *xcolor = NULL; - if (!(xcolor = wmalloc(sizeof(XColor)))) { - wwarning(_("Color Panel: Could not allocate memory")); - color.red = 0; - color.green = 0; - color.blue = 0; - color.alpha = 0; - return color; - } - + xcolor = wmalloc(sizeof(XColor)); xcolor->pixel = value; XQueryColor(scr->display, scr->rcontext->cmap, xcolor); diff --git a/WINGs/wcolorwell.c b/WINGs/wcolorwell.c index e35063dc..19532d6a 100644 --- a/WINGs/wcolorwell.c +++ b/WINGs/wcolorwell.c @@ -138,7 +138,6 @@ WMColorWell *WMCreateColorWell(WMWidget * parent) ColorWell *cPtr; cPtr = wmalloc(sizeof(ColorWell)); - memset(cPtr, 0, sizeof(ColorWell)); cPtr->widgetClass = WC_ColorWell; diff --git a/WINGs/wfilepanel.c b/WINGs/wfilepanel.c index 29de7b5e..ef13312e 100644 --- a/WINGs/wfilepanel.c +++ b/WINGs/wfilepanel.c @@ -170,7 +170,6 @@ static WMFilePanel *makeFilePanel(WMScreen * scrPtr, char *name, char *title) WMPixmap *icon; fPtr = wmalloc(sizeof(WMFilePanel)); - memset(fPtr, 0, sizeof(WMFilePanel)); fPtr->win = WMCreateWindowWithStyle(scrPtr, name, WMTitledWindowMask | WMResizableWindowMask); WMResizeWidget(fPtr->win, PWIDTH, PHEIGHT); diff --git a/WINGs/wfont.c b/WINGs/wfont.c index 6cbdea24..245cdccd 100644 --- a/WINGs/wfont.c +++ b/WINGs/wfont.c @@ -139,7 +139,6 @@ WMFont *WMCreateFont(WMScreen * scrPtr, char *fontName) } font = wmalloc(sizeof(WMFont)); - memset(font, 0, sizeof(WMFont)); font->screen = scrPtr; diff --git a/WINGs/wfontpanel.c b/WINGs/wfontpanel.c index 0cca5d67..91954b64 100644 --- a/WINGs/wfontpanel.c +++ b/WINGs/wfontpanel.c @@ -165,7 +165,6 @@ WMFontPanel *WMGetFontPanel(WMScreen * scr) return scr->sharedFontPanel; panel = wmalloc(sizeof(FontPanel)); - memset(panel, 0, sizeof(FontPanel)); panel->win = WMCreateWindow(scr, "fontPanel"); /* WMSetWidgetBackgroundColor(panel->win, WMWhiteColor(scr)); */ @@ -461,7 +460,6 @@ static void addTypefaceToXftFamily(Family * fam, char *style) } face = wmalloc(sizeof(Typeface)); - memset(face, 0, sizeof(Typeface)); face->typeface = wstrdup(style); face->sizes = WMCreateArray(4); diff --git a/WINGs/wframe.c b/WINGs/wframe.c index 27f2b57a..b7b30b52 100644 --- a/WINGs/wframe.c +++ b/WINGs/wframe.c @@ -221,7 +221,6 @@ WMFrame *WMCreateFrame(WMWidget * parent) Frame *fPtr; fPtr = wmalloc(sizeof(Frame)); - memset(fPtr, 0, sizeof(Frame)); fPtr->widgetClass = WC_Frame; diff --git a/WINGs/wlabel.c b/WINGs/wlabel.c index 8b67d93f..589f4b3e 100644 --- a/WINGs/wlabel.c +++ b/WINGs/wlabel.c @@ -39,7 +39,6 @@ WMLabel *WMCreateLabel(WMWidget * parent) Label *lPtr; lPtr = wmalloc(sizeof(Label)); - memset(lPtr, 0, sizeof(Label)); lPtr->widgetClass = WC_Label; diff --git a/WINGs/wlist.c b/WINGs/wlist.c index f8fbde80..b58d68d0 100644 --- a/WINGs/wlist.c +++ b/WINGs/wlist.c @@ -110,7 +110,6 @@ WMList *WMCreateList(WMWidget * parent) W_Screen *scrPtr = W_VIEW(parent)->screen; lPtr = wmalloc(sizeof(List)); - memset(lPtr, 0, sizeof(List)); lPtr->widgetClass = WC_List; @@ -187,7 +186,6 @@ WMListItem *WMInsertListItem(WMList * lPtr, int row, char *text) CHECK_CLASS(lPtr, WC_List); item = wmalloc(sizeof(WMListItem)); - memset(item, 0, sizeof(WMListItem)); item->text = wstrdup(text); row = WMIN(row, WMGetArrayItemCount(lPtr->items)); diff --git a/WINGs/wmenuitem.c b/WINGs/wmenuitem.c index a9568614..09571d48 100644 --- a/WINGs/wmenuitem.c +++ b/WINGs/wmenuitem.c @@ -41,7 +41,6 @@ WMMenuItem *WMCreateMenuItem(void) WMMenuItem *item; item = wmalloc(sizeof(MenuItem)); - memset(item, 0, sizeof(MenuItem)); item->flags.enabled = 1; diff --git a/WINGs/wpanel.c b/WINGs/wpanel.c index f85804f8..7e3f9f59 100644 --- a/WINGs/wpanel.c +++ b/WINGs/wpanel.c @@ -94,7 +94,6 @@ WMAlertPanel *WMCreateAlertPanel(WMScreen * scrPtr, WMWindow * owner, WMPixmap *icon; panel = wmalloc(sizeof(WMAlertPanel)); - memset(panel, 0, sizeof(WMAlertPanel)); if (owner) { panel->win = WMCreatePanelWithStyleForWindow(owner, "alertPanel", WMTitledWindowMask); @@ -342,7 +341,6 @@ WMInputPanel *WMCreateInputPanel(WMScreen * scrPtr, WMWindow * owner, char *titl int x, dw = 0, aw = 0, w; panel = wmalloc(sizeof(WMInputPanel)); - memset(panel, 0, sizeof(WMInputPanel)); if (owner) panel->win = WMCreatePanelWithStyleForWindow(owner, "inputPanel", WMTitledWindowMask); @@ -464,7 +462,6 @@ WMGenericPanel *WMCreateGenericPanel(WMScreen * scrPtr, WMWindow * owner, WMPixmap *icon; panel = wmalloc(sizeof(WMGenericPanel)); - memset(panel, 0, sizeof(WMGenericPanel)); if (owner) { panel->win = WMCreatePanelWithStyleForWindow(owner, "genericPanel", WMTitledWindowMask); diff --git a/WINGs/wpopupbutton.c b/WINGs/wpopupbutton.c index ba43ce78..648039a2 100644 --- a/WINGs/wpopupbutton.c +++ b/WINGs/wpopupbutton.c @@ -57,7 +57,6 @@ WMPopUpButton *WMCreatePopUpButton(WMWidget * parent) W_Screen *scr = W_VIEW(parent)->screen; bPtr = wmalloc(sizeof(PopUpButton)); - memset(bPtr, 0, sizeof(PopUpButton)); bPtr->widgetClass = WC_PopUpButton; diff --git a/WINGs/wprogressindicator.c b/WINGs/wprogressindicator.c index 5e83e239..a897a9eb 100644 --- a/WINGs/wprogressindicator.c +++ b/WINGs/wprogressindicator.c @@ -43,7 +43,6 @@ WMProgressIndicator *WMCreateProgressIndicator(WMWidget * parent) ProgressIndicator *pPtr; pPtr = wmalloc(sizeof(ProgressIndicator)); - memset(pPtr, 0, sizeof(ProgressIndicator)); pPtr->widgetClass = WC_ProgressIndicator; diff --git a/WINGs/wruler.c b/WINGs/wruler.c index 2b9b1197..f8d4af03 100644 --- a/WINGs/wruler.c +++ b/WINGs/wruler.c @@ -384,8 +384,6 @@ WMRuler *WMCreateRuler(WMWidget * parent) Ruler *rPtr = wmalloc(sizeof(Ruler)); unsigned int w = WMWidgetWidth(parent); - memset(rPtr, 0, sizeof(Ruler)); - rPtr->widgetClass = WC_Ruler; rPtr->view = W_CreateView(W_VIEW(parent)); diff --git a/WINGs/wscroller.c b/WINGs/wscroller.c index 33afa4eb..6afca480 100644 --- a/WINGs/wscroller.c +++ b/WINGs/wscroller.c @@ -84,8 +84,6 @@ WMScroller *WMCreateScroller(WMWidget * parent) Scroller *sPtr; sPtr = wmalloc(sizeof(Scroller)); - memset(sPtr, 0, sizeof(Scroller)); - sPtr->widgetClass = WC_Scroller; sPtr->view = W_CreateView(W_VIEW(parent)); diff --git a/WINGs/wscrollview.c b/WINGs/wscrollview.c index 7733e27c..8b33812e 100644 --- a/WINGs/wscrollview.c +++ b/WINGs/wscrollview.c @@ -44,8 +44,6 @@ WMScrollView *WMCreateScrollView(WMWidget * parent) ScrollView *sPtr; sPtr = wmalloc(sizeof(ScrollView)); - memset(sPtr, 0, sizeof(ScrollView)); - sPtr->widgetClass = WC_ScrollView; sPtr->view = W_CreateView(W_VIEW(parent)); diff --git a/WINGs/wslider.c b/WINGs/wslider.c index 110c8581..1ee7dae7 100644 --- a/WINGs/wslider.c +++ b/WINGs/wslider.c @@ -57,8 +57,6 @@ WMSlider *WMCreateSlider(WMWidget * parent) Slider *sPtr; sPtr = wmalloc(sizeof(Slider)); - memset(sPtr, 0, sizeof(Slider)); - sPtr->widgetClass = WC_Slider; sPtr->view = W_CreateView(W_VIEW(parent)); diff --git a/WINGs/wsplitview.c b/WINGs/wsplitview.c index e8cb383d..a26ba12d 100644 --- a/WINGs/wsplitview.c +++ b/WINGs/wsplitview.c @@ -607,8 +607,6 @@ WMSplitView *WMCreateSplitView(WMWidget * parent) WMSplitView *sPtr; sPtr = wmalloc(sizeof(WMSplitView)); - memset(sPtr, 0, sizeof(WMSplitView)); - sPtr->widgetClass = WC_SplitView; sPtr->view = W_CreateView(W_VIEW(parent)); diff --git a/WINGs/wtabview.c b/WINGs/wtabview.c index 3ae47283..df72d481 100644 --- a/WINGs/wtabview.c +++ b/WINGs/wtabview.c @@ -190,8 +190,6 @@ WMTabView *WMCreateTabView(WMWidget * parent) WMScreen *scr = WMWidgetScreen(parent); tPtr = wmalloc(sizeof(TabView)); - memset(tPtr, 0, sizeof(TabView)); - tPtr->widgetClass = WC_TabView; tPtr->view = W_CreateView(W_VIEW(parent)); @@ -258,7 +256,7 @@ void WMInsertItemInTabView(WMTabView * tPtr, int index, WMTabViewItem * item) WMTabViewItem **items; items = wrealloc(tPtr->items, sizeof(WMTabViewItem *) * (tPtr->maxItems + 10)); - memset(&items[tPtr->maxItems], 0, sizeof(WMTabViewItem *) * 10); + memset(&items[tPtr->maxItems], 0, sizeof(WMTabViewItem *) * 10); /* XXX */ tPtr->items = items; tPtr->maxItems += 10; } @@ -819,10 +817,7 @@ WMTabViewItem *WMCreateTabViewItemWithIdentifier(int identifier) WMTabViewItem *item; item = wmalloc(sizeof(WMTabViewItem)); - memset(item, 0, sizeof(WMTabViewItem)); - item->identifier = identifier; - item->flags.enabled = 1; return item; @@ -833,10 +828,7 @@ WMTabViewItem *WMCreateTabViewItem(int identifier, char *label) WMTabViewItem *item; item = wmalloc(sizeof(WMTabViewItem)); - memset(item, 0, sizeof(WMTabViewItem)); - item->identifier = identifier; - item->flags.enabled = 1; WMSetTabViewItemLabel(item, label); diff --git a/WINGs/wtext.c b/WINGs/wtext.c index 01772c4a..ece4b398 100644 --- a/WINGs/wtext.c +++ b/WINGs/wtext.c @@ -2935,7 +2935,6 @@ WMText *WMCreateTextForDocumentType(WMWidget * parent, WMAction * parser, WMActi XGCValues gcv; tPtr = wmalloc(sizeof(Text)); - memset(tPtr, 0, sizeof(Text)); tPtr->widgetClass = WC_Text; tPtr->view = W_CreateView(W_VIEW(parent)); if (!tPtr->view) { @@ -3232,7 +3231,6 @@ void *WMCreateTextBlockWithText(WMText * tPtr, char *text, WMFont * font, WMColo tb->allocated = reqBlockSize(len); tb->text = (char *)wmalloc(tb->allocated); - memset(tb->text, 0, tb->allocated); if (len < 1 || !text || (*text == '\n' && len == 1)) { *tb->text = ' '; diff --git a/WINGs/wtextfield.c b/WINGs/wtextfield.c index e353ee6c..a2af3a1f 100644 --- a/WINGs/wtextfield.c +++ b/WINGs/wtextfield.c @@ -316,8 +316,6 @@ WMTextField *WMCreateTextField(WMWidget * parent) TextField *tPtr; tPtr = wmalloc(sizeof(TextField)); - memset(tPtr, 0, sizeof(TextField)); - tPtr->widgetClass = WC_TextField; tPtr->view = W_CreateView(W_VIEW(parent)); @@ -335,7 +333,6 @@ WMTextField *WMCreateTextField(WMWidget * parent) W_SetViewBackgroundColor(tPtr->view, tPtr->view->screen->white); tPtr->text = wmalloc(MIN_TEXT_BUFFER); - tPtr->text[0] = 0; tPtr->textLen = 0; tPtr->bufferSize = MIN_TEXT_BUFFER; diff --git a/WINGs/wview.c b/WINGs/wview.c index da7329e1..5c6ecb35 100644 --- a/WINGs/wview.c +++ b/WINGs/wview.c @@ -93,8 +93,6 @@ static W_View *createView(W_Screen * screen, W_View * parent) ViewContext = XUniqueContext(); view = wmalloc(sizeof(W_View)); - memset(view, 0, sizeof(W_View)); - view->screen = screen; if (parent != NULL) { diff --git a/WINGs/wwindow.c b/WINGs/wwindow.c index 565b3924..53b98e89 100644 --- a/WINGs/wwindow.c +++ b/WINGs/wwindow.c @@ -135,8 +135,6 @@ WMWindow *WMCreateWindowWithStyle(WMScreen * screen, char *name, int style) _Window *win; win = wmalloc(sizeof(_Window)); - memset(win, 0, sizeof(_Window)); - win->widgetClass = WC_Window; win->view = W_CreateTopView(screen);