From e39bb8eac6c9ad0888b2a98280e8231f58368346 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Fri, 30 May 2008 07:52:29 +0200 Subject: [PATCH] [markup] Stop recomputing len, use slen Signed-off-by: Julien Danjou --- client.c | 2 +- common/markup.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/client.c b/client.c index fab2af4d..aaa83b0e 100644 --- a/client.c +++ b/client.c @@ -760,7 +760,7 @@ client_markup_parse(client_t *c, const char *str, ssize_t len) /** Kill a client via a WM_DELETE_WINDOW request or XKillClient if not * supported. - * \param c the client to kill + * \param c The client to kill, */ void client_kill(client_t *c) diff --git a/common/markup.c b/common/markup.c index da10f736..8279ef96 100644 --- a/common/markup.c +++ b/common/markup.c @@ -207,10 +207,10 @@ markup_parser_data_delete(markup_parser_data_t **p) } /** Parse markup defined in data on the string str. - * \param data a markup_parser_data_t allocated by markup_parser_data_new() - * \param str a string to parse markup from - * \param slen str length - * \return true if success, false otherwise + * \param data A markup_parser_data_t allocated by markup_parser_data_new(). + * \param str A string to parse markup from. + * \param slen String length. + * \return True if success, false otherwise. */ bool markup_parse(markup_parser_data_t *data, const char *str, ssize_t slen) @@ -231,7 +231,7 @@ markup_parse(markup_parser_data_t *data, const char *str, ssize_t slen) }; GError *error = NULL; - if(!a_strlen(str)) + if(slen <= 0) return false; mkp_ctx = g_markup_parse_context_new(&parser, 0, data, NULL);