anjuta r4903 - in trunk: . plugins/macro
- From: sgranjoux svn gnome org
- To: svn-commits-list gnome org
- Subject: anjuta r4903 - in trunk: . plugins/macro
- Date: Sat, 28 Mar 2009 18:56:24 +0000 (UTC)
Author: sgranjoux
Date: Sat Mar 28 18:56:24 2009
New Revision: 4903
URL: http://svn.gnome.org/viewvc/anjuta?rev=4903&view=rev
Log:
* plugins/macro/macro-util.c:
Fix #577006 â crash creating new file
Modified:
trunk/ChangeLog
trunk/plugins/macro/macro-util.c
Modified: trunk/plugins/macro/macro-util.c
==============================================================================
--- trunk/plugins/macro/macro-util.c (original)
+++ trunk/plugins/macro/macro-util.c Sat Mar 28 18:56:24 2009
@@ -37,13 +37,12 @@
get_date_time(void)
{
time_t cur_time = time(NULL);
- gchar *DateTime;
+ const gchar *DateTime;
gchar *buffer;
- DateTime = g_new(gchar, 100);
- sprintf("%s", DateTime,ctime(&cur_time));
+ DateTime = ctime(&cur_time);
+ /* Remove new line at the end */
buffer = g_strndup(DateTime, strlen(DateTime) - 1);
- g_free(DateTime);
return buffer;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]