Mercurial > pidgin.yaz
changeset 17685:f94251004e7d
Avoid a strlen().
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Mon, 04 Jun 2007 01:02:35 +0000 |
parents | 36cb252e9f86 |
children | 1aa324c47042 |
files | libpurple/plugins/log_reader.c |
diffstat | 1 files changed, 2 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/plugins/log_reader.c Mon Jun 04 01:02:02 2007 +0000 +++ b/libpurple/plugins/log_reader.c Mon Jun 04 01:02:35 2007 +0000 @@ -1491,9 +1491,8 @@ temp = g_string_new(line); g_string_append(temp, "<a href=\""); - if (strlen(link) >= 6) { - link += (sizeof("(Link: ") - 1); - + link += (sizeof("(Link: ") - 1); + if (*link) { while (*link && *link != ')') { g_string_append_c(temp, *link); link++;