aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/util/eab-book-util.c
diff options
context:
space:
mode:
authorKjartan Maraas <kmaraas@gnome.org>2006-10-01 19:55:39 +0800
committerKjartan Maraas <kmaraas@src.gnome.org>2006-10-01 19:55:39 +0800
commite86a94310a715ec7c300145cbd58ef9ac93389b0 (patch)
treeaa3e481c6fc422dcc7200ad1ff0eab1e59ffedd4 /addressbook/util/eab-book-util.c
parent8f0374166d477e9ee2d64ee7bfe75b537fb5382a (diff)
downloadgsoc2013-evolution-e86a94310a715ec7c300145cbd58ef9ac93389b0.tar.gz
gsoc2013-evolution-e86a94310a715ec7c300145cbd58ef9ac93389b0.tar.zst
gsoc2013-evolution-e86a94310a715ec7c300145cbd58ef9ac93389b0.zip
Remove duplicate include. Fix some compiler warnings. Cast away a compiler
2006-10-01 Kjartan Maraas <kmaraas@gnome.org> * gui/component/addressbook-component.c: Remove duplicate include. * gui/contact-editor/e-contact-editor.c: (extract_simple_field): Fix some compiler warnings. * gui/contact-editor/e-contact-quick-add.c: (build_quick_add_dialog): Cast away a compiler warning. * gui/widgets/e-addressbook-view.c: (generate_viewoption_menu): #if 0 out an unused array, fix 0 vs NULL initialization in some other arrays and remove an unused GSList. * gui/widgets/e-minicard.c: (add_email_field): Make a var const. * gui/widgets/eab-gui-util.c: (eab_contact_save), (eab_contact_list_save): Add some casts to fix compiler warnings and #if 0 out an unused function. * util/eab-book-util.c: (escape), (eab_contact_list_from_string): Some GString fixes. All of this from bug #332101. svn path=/trunk/; revision=32841
Diffstat (limited to 'addressbook/util/eab-book-util.c')
-rw-r--r--addressbook/util/eab-book-util.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/addressbook/util/eab-book-util.c b/addressbook/util/eab-book-util.c
index a463d43480..fb81399b4e 100644
--- a/addressbook/util/eab-book-util.c
+++ b/addressbook/util/eab-book-util.c
@@ -53,14 +53,14 @@ eab_get_config_database ()
static char*
escape (const char *str)
{
- GString *s = g_string_new ("");
+ GString *s = g_string_new (NULL);
const char *p = str;
while (*p) {
if (*p == '\\')
- g_string_append (s, "\\\\");
+ g_string_append_len (s, "\\\\", 2);
else if (*p == '"')
- g_string_append (s, "\\\"");
+ g_string_append_len (s, "\\\"", 2);
else
g_string_append_c (s, *p);
@@ -208,7 +208,7 @@ GList*
eab_contact_list_from_string (const char *str)
{
GList *contacts = NULL;
- GString *gstr = g_string_new ("");
+ GString *gstr = g_string_new (NULL);
char *str_stripped;
char *p = (char*)str;
char *q;