libpurple/log.c

branch
soc.2013.gobjectification.plugins
changeset 37016
48f85579cc4c
parent 37015
28ee14bbe0ab
parent 35298
6f2f61656a95
child 37066
1ebce1f4993b
--- a/libpurple/log.c	Mon Jan 27 17:34:21 2014 +0530
+++ b/libpurple/log.c	Wed Jan 29 00:28:08 2014 +0530
@@ -778,7 +778,7 @@
 {
 	gboolean show_date;
 	char *date;
-	struct tm tm;
+	struct tm *tm;
 
 	show_date = (log->type == PURPLE_LOG_SYSTEM) || (time(NULL) > when + 20*60);
 
@@ -788,11 +788,11 @@
 	if (date != NULL)
 		return date;
 
-	tm = *(localtime(&when));
+	tm = localtime(&when);
 	if (show_date)
-		return g_strdup(purple_date_format_long(&tm));
+		return g_strdup(purple_date_format_long(tm));
 	else
-		return g_strdup(purple_time_format(&tm));
+		return g_strdup(purple_time_format(tm));
 }
 
 /* NOTE: This can return msg (which you may or may not want to g_free())

mercurial