[master] 1bc5ac7 Don't use index(3), use strchr(3).
Poul-Henning Kamp
phk at varnish-cache.org
Fri May 13 12:09:46 CEST 2011
commit 1bc5ac7ecea59a250b64fcc4b89568a4969594c7
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Fri May 13 10:09:04 2011 +0000
Don't use index(3), use strchr(3).
diff --git a/lib/libvarnishapi/vsl_arg.c b/lib/libvarnishapi/vsl_arg.c
index a6a2700..d6426a6 100644
--- a/lib/libvarnishapi/vsl_arg.c
+++ b/lib/libvarnishapi/vsl_arg.c
@@ -174,14 +174,14 @@ vsl_m_arg(const struct VSM_data *vd, const char *opt)
ALLOC_OBJ(m, VSL_RE_MATCH_MAGIC);
AN(m);
- if (! index(opt, ':')) {
+ if (!strchr(opt, ':')) {
fprintf(stderr, "No : found in -o option %s\n", opt);
return (-1);
}
o = strdup(opt);
AN(o);
- regex = index(o, ':');
+ regex = strchr(o, ':');
*regex = '\0';
regex++;
More information about the varnish-commit
mailing list