Mercurial > pidgin
comparison libpurple/plugins/log_reader.c @ 17462:f94251004e7d
Avoid a strlen().
| author | Richard Laager <rlaager@wiktel.com> |
|---|---|
| date | Mon, 04 Jun 2007 01:02:35 +0000 |
| parents | 36cb252e9f86 |
| children | 0e22098e1421 |
comparison
equal
deleted
inserted
replaced
| 17461:36cb252e9f86 | 17462:f94251004e7d |
|---|---|
| 1489 | 1489 |
| 1490 *link = '\0'; | 1490 *link = '\0'; |
| 1491 temp = g_string_new(line); | 1491 temp = g_string_new(line); |
| 1492 g_string_append(temp, "<a href=\""); | 1492 g_string_append(temp, "<a href=\""); |
| 1493 | 1493 |
| 1494 if (strlen(link) >= 6) { | 1494 link += (sizeof("(Link: ") - 1); |
| 1495 link += (sizeof("(Link: ") - 1); | 1495 if (*link) { |
| 1496 | |
| 1497 while (*link && *link != ')') { | 1496 while (*link && *link != ')') { |
| 1498 g_string_append_c(temp, *link); | 1497 g_string_append_c(temp, *link); |
| 1499 link++; | 1498 link++; |
| 1500 } | 1499 } |
| 1501 if (*link) | 1500 if (*link) |
