From 01f2f573b7be534b5298719a99ecbef34d488802 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Sat, 12 Jan 2008 23:15:28 +0100 Subject: [PATCH] use a_str functions --- widget.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/widget.c b/widget.c index 1cc12fa4..0ff23138 100644 --- a/widget.c +++ b/widget.c @@ -154,26 +154,26 @@ uicb_widget_tell(int screen, char *arg) return; } - len = strlen(arg); + len = a_strlen(arg); p = strtok(arg, " "); - if (!p) + if(!p) { warn("Ignoring malformed widget command.\n"); return; } widget = widget_find(p, screen); - if (!widget) + if(!widget) { warn("No such widget: %s\n", p); return; } - if (p+strlen(p) < arg+len) + if(p + a_strlen(p) < arg+len) { - p = p + strlen(p) + 1; - command = p_new(char, strlen(p)+1); - strncpy(command, p, strlen(p)); + p = p + a_strlen(p) + 1; + command = p_new(char, a_strlen(p) + 1); + strncpy(command, p, a_strlen(p)); widget->tell(widget, command); p_delete(&command); }