From c59ecf0127939f4cc552d704eea15f2515b34d43 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Sun, 23 Dec 2007 13:43:12 +0100 Subject: [PATCH] use a_strdup --- widget.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/widget.c b/widget.c index 3de5c6a0..6a30cd20 100644 --- a/widget.c +++ b/widget.c @@ -92,9 +92,8 @@ widget_common_new(Widget *widget, Statusbar *statusbar, cfg_t* config) widget->statusbar = statusbar; name = cfg_title(config); - widget->name = p_new(char, strlen(name)+1); + widget->name = a_strdup(name); widget->tell = widget_common_tell; - strncpy(widget->name, name, strlen(name)); } /** Send command to widget