aboutsummaryrefslogtreecommitdiff
path: root/lib/message-property.cc
diff options
context:
space:
mode:
authorFredrik Fornwall <fredrik@fornwall.net>2017-04-07 01:06:20 +0200
committerDavid Bremner <david@tethera.net>2017-04-20 06:59:22 -0300
commite56511817284afc14352f47a13fcf85b2fabd628 (patch)
tree39439169bed947a829e151209b52ec637cd44e41 /lib/message-property.cc
parent0b76e4a6f45b051bfcaf9f058d3162b423007294 (diff)
Replace index(3) with strchr(3)
The index(3) function has been deprecated in POSIX since 2001 and removed in 2008, and most code in notmuch already calls strchr(3). This fixes a compilation error on Android whose libc does not have index(3).
Diffstat (limited to 'lib/message-property.cc')
-rw-r--r--lib/message-property.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/message-property.cc b/lib/message-property.cc
index 0b13cac3..f32d5550 100644
--- a/lib/message-property.cc
+++ b/lib/message-property.cc
@@ -51,7 +51,7 @@ _notmuch_message_modify_property (notmuch_message_t *message, const char *key, c
if (key == NULL || value == NULL)
return NOTMUCH_STATUS_NULL_POINTER;
- if (index (key, '='))
+ if (strchr (key, '='))
return NOTMUCH_STATUS_ILLEGAL_ARGUMENT;
term = talloc_asprintf (message, "%s=%s", key, value);