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).
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);
const char *key;
char *value;
- value = index(node->string, '=');
+ value = strchr(node->string, '=');
if (!value)
INTERNAL_ERROR ("malformed property term");