summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
0b76e4a)
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 (key == NULL || value == NULL)
return NOTMUCH_STATUS_NULL_POINTER;
return NOTMUCH_STATUS_ILLEGAL_ARGUMENT;
term = talloc_asprintf (message, "%s=%s", key, value);
return NOTMUCH_STATUS_ILLEGAL_ARGUMENT;
term = talloc_asprintf (message, "%s=%s", key, value);
const char *key;
char *value;
const char *key;
char *value;
- value = index(node->string, '=');
+ value = strchr(node->string, '=');
if (!value)
INTERNAL_ERROR ("malformed property term");
if (!value)
INTERNAL_ERROR ("malformed property term");