Mercurial > pidgin
changeset 12958:6910db1ae6a1
[gaim-migrate @ 15311]
Remove an extraneous g_strdup() that we probably never called anyway.
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Fri, 20 Jan 2006 00:26:55 +0000 |
parents | 481560f82468 |
children | acf22abb86ba |
files | src/log.c |
diffstat | 1 files changed, 7 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/log.c Fri Jan 20 00:26:17 2006 +0000 +++ b/src/log.c Fri Jan 20 00:26:55 2006 +0000 @@ -1003,18 +1003,20 @@ static char *html_logger_read(GaimLog *log, GaimLogReadFlags *flags) { - char *read, *minus_header; + char *read; GaimLogCommonLoggerData *data = log->logger_data; *flags = GAIM_LOG_READ_NO_NEWLINE; if (!data || !data->path) return g_strdup(_("<font color=\"red\"><b>Unable to find log path!</b></font>")); if (g_file_get_contents(data->path, &read, NULL, NULL)) { - minus_header = strchr(read, '\n'); + char *minus_header = strchr(read, '\n'); + if (!minus_header) - minus_header = g_strdup(read); - else - minus_header = g_strdup(minus_header + 1); + return read; + + minus_header = g_strdup(minus_header + 1); g_free(read); + return minus_header; } return g_strdup_printf(_("<font color=\"red\"><b>Could not read file: %s</b></font>"), data->path);