mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-17 07:47:41 +01:00
[markup] Stop recomputing len, use slen
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
b0710a0c03
commit
e39bb8eac6
2 changed files with 6 additions and 6 deletions
2
client.c
2
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)
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue