aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/message.cc
diff options
context:
space:
mode:
authorGravatar Carl Worth <cworth@cworth.org>2009-11-28 10:01:22 -0800
committerGravatar Carl Worth <cworth@cworth.org>2009-11-28 10:01:22 -0800
commit64c8d6227a90ea6c37ea112ee20b14f16b9b46e7 (patch)
tree3dbb13c0deb71f46f26a98d006e9f646d86eebd2 /lib/message.cc
parent0a7bd1c728390efc5cc000987f6dd42638314328 (diff)
Avoid bogus internal error reporting duplicate In-Reply-To IDs.
This error was tirggered with a debugging build via: make CXXFLAGS="-DDEBUG" and reported by David Bremner. The actual error is that I'm an idiot that doesn't know how to use strcmp's return value. Of course, the strcmp interface scores a negative 7 on Rusty Russell ranking of bad interfaces: http://ozlabs.org/~rusty/index.cgi/tech/2008-04-01.html
Diffstat (limited to 'lib/message.cc')
-rw-r--r--lib/message.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/message.cc b/lib/message.cc
index 03b8c812..49519f1e 100644
--- a/lib/message.cc
+++ b/lib/message.cc
@@ -318,7 +318,7 @@ _notmuch_message_get_in_reply_to (notmuch_message_t *message)
in_reply_to = *i;
if (i != message->doc.termlist_end () &&
- strncmp ((*i).c_str (), prefix, prefix_len))
+ strncmp ((*i).c_str (), prefix, prefix_len) == 0)
{
INTERNAL_ERROR ("Message %s has duplicate In-Reply-To IDs: %s and %s\n",
notmuch_message_get_message_id (message),