summaryrefslogtreecommitdiffstats
path: root/source/history.c
diff options
context:
space:
mode:
authorDave Davenport <qball@gmpclient.org>2014-08-21 19:03:21 +0200
committerDave Davenport <qball@gmpclient.org>2014-08-21 19:14:01 +0200
commit63e5f4e9405ed2be83f18b10965b6d66eb5b8a10 (patch)
treec97c2091db99e1837427ddfbae41856d15ed2094 /source/history.c
parent1a7819275a8ee15bb7e466ba090f44b25a805844 (diff)
Small cleanup and fixes.
* Use g_strfreev * Use g_ascii*strto(u)ll
Diffstat (limited to 'source/history.c')
-rw-r--r--source/history.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/history.c b/source/history.c
index c8ea5ff0..49c6c393 100644
--- a/source/history.c
+++ b/source/history.c
@@ -144,7 +144,7 @@ void history_set ( const char *filename, const char *entry )
list[length] = g_malloc ( sizeof ( _element ) );
// Copy name
if ( list[length] != NULL ) {
- strncpy ( list[length]->name, entry, HISTORY_NAME_LENGTH );
+ g_strlcpy ( list[length]->name, entry, HISTORY_NAME_LENGTH );
list[length]->name[HISTORY_NAME_LENGTH - 1] = '\0';
// set # hits
list[length]->index = 1;