[evolution-data-server] Bug 588573 – NULL string comparison in camel-search-sql-sexp.c
- From: Matthew Barnes <mbarnes src gnome org>
- To: svn-commits-list gnome org
- Subject: [evolution-data-server] Bug 588573 – NULL string comparison in camel-search-sql-sexp.c
- Date: Wed, 15 Jul 2009 01:23:53 +0000 (UTC)
commit fe2b22808342cb7c400672e8fc3298b088feb1a8
Author: Matthew Barnes <mbarnes redhat com>
Date: Tue Jul 14 21:23:10 2009 -0400
Bug 588573 â?? NULL string comparison in camel-search-sql-sexp.c
camel/camel-search-sql-sexp.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/camel/camel-search-sql-sexp.c b/camel/camel-search-sql-sexp.c
index 2394943..15e2339 100644
--- a/camel/camel-search-sql-sexp.c
+++ b/camel/camel-search-sql-sexp.c
@@ -151,7 +151,7 @@ func_not(ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer data)
if (r1->type == ESEXP_RES_STRING) {
r = e_sexp_result_new(f, ESEXP_RES_STRING);
/* HACK: Fix and handle completed-on better. */
- if (strcmp(r1->value.string, "( (usertags LIKE '%completed-on 0%' AND usertags LIKE '%completed-on%') )") == 0)
+ if (g_strcmp0 (r1->value.string, "( (usertags LIKE '%completed-on 0%' AND usertags LIKE '%completed-on%') )") == 0)
r->value.string = g_strdup ("( (not (usertags LIKE '%completed-on 0%')) AND usertags LIKE '%completed-on%' )");
else
r->value.string = g_strdup_printf ("(NOT (%s))",
@@ -440,9 +440,9 @@ user_tag(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
r = e_sexp_result_new(f, ESEXP_RES_STRING);
/* Hacks no otherway to fix these really :( */
- if (strcmp(argv[0]->value.string, "completed-on") == 0)
+ if (g_strcmp0 (argv[0]->value.string, "completed-on") == 0)
r->value.string = g_strdup_printf("(usertags LIKE '%ccompleted-on 0%c' AND usertags LIKE '%ccompleted-on%c')", '%', '%', '%', '%');
- else if (strcmp(argv[0]->value.string, "follow-up") == 0)
+ else if (g_strcmp0 (argv[0]->value.string, "follow-up") == 0)
r->value.string = g_strdup_printf("usertags NOT LIKE '%cfollow-up%c'", '%', '%');
else
r->value.string = g_strdup("usertags");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]