From 49956f6b9be11d100be73d0e3c1e3e2dfd70a48b Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Fri, 17 Oct 2008 08:21:07 +0200 Subject: [PATCH] Use gint64 format specifier instead of %ld --- midori/main.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/midori/main.c b/midori/main.c index 20d3d748..ff535489 100644 --- a/midori/main.c +++ b/midori/main.c @@ -671,12 +671,13 @@ midori_history_remove_item_cb (KatzeArray* history, g_return_if_fail (KATZE_IS_ITEM (item)); - sqlcmd = g_strdup_printf ("DELETE FROM history WHERE uri = '%s' AND" - " title = '%s' AND date = %ld AND visits = %d", - katze_item_get_uri (item), - katze_item_get_name (item), - katze_item_get_added (item), - katze_item_get_visits (item)); + sqlcmd = g_strdup_printf ( + "DELETE FROM history WHERE uri = '%s' AND" + " title = '%s' AND date = %" G_GINT64_FORMAT " AND visits = %d", + katze_item_get_uri (item), + katze_item_get_name (item), + katze_item_get_added (item), + katze_item_get_visits (item)); success = db_exec (db, sqlcmd, &error); if (!success) { @@ -781,10 +782,10 @@ midori_history_add_items (void* data, { if (argv[i]) { - if (colname[i] && g_ascii_strcasecmp (colname[i], "uri") == 0 && - colname[i + 1] && g_ascii_strcasecmp (colname[i + 1], "title") == 0 && - colname[i + 2] && g_ascii_strcasecmp (colname[i + 2], "date") == 0 && - colname[i + 3] && g_ascii_strcasecmp (colname[i + 3], "visits") == 0) + if (colname[i] && !g_ascii_strcasecmp (colname[i], "uri") && + colname[i + 1] && !g_ascii_strcasecmp (colname[i + 1], "title") && + colname[i + 2] && !g_ascii_strcasecmp (colname[i + 2], "date") && + colname[i + 3] && !g_ascii_strcasecmp (colname[i + 3], "visits")) { item = katze_item_new (); katze_item_set_uri (item, argv[i]); -- 2.39.5