summaryrefslogtreecommitdiffhomepage
path: root/mixlib
diff options
context:
space:
mode:
Diffstat (limited to 'mixlib')
-rw-r--r--mixlib/mix_config.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/mixlib/mix_config.c b/mixlib/mix_config.c
index 9d1c04b..cba9c80 100644
--- a/mixlib/mix_config.c
+++ b/mixlib/mix_config.c
@@ -1,7 +1,7 @@
/* -*-c-*- -------------- mix_config.c :
* Implementation of the functions declared in mix_config.h
* ------------------------------------------------------------------
- * $Id: mix_config.c,v 1.9 2004/06/07 05:29:01 jao Exp $
+ * $Id: mix_config.c,v 1.10 2004/06/07 12:18:22 jao Exp $
* ------------------------------------------------------------------
* Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc.
*
@@ -24,6 +24,7 @@
#include <stdlib.h>
#include <stdio.h>
+#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <errno.h>
@@ -84,15 +85,9 @@ mix_config_new (const gchar *dirname, const gchar *filename)
if (line && line[0] != COMMENT_PREFIX_)
{
gchar **vals = g_strsplit (line, "=", 2);
- gchar *key = g_strdup (g_strstrip (vals[0]));
- gchar *value =
- (vals[1][0] == '"')
- ? g_strndup (vals[1] + 1, strlen (vals[1]) - 2)
- : g_strdup (g_strstrip (vals[1]));
g_hash_table_insert (result->items,
- (gpointer)key,
- (gpointer)value);
- g_strfreev (vals);
+ (gpointer) g_strstrip (vals[0]),
+ (gpointer) g_strstrip (vals[1]));
}
}
fclose (f);