From 404528bd581a4d2fa3bae1834d6fde48c6153434 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 21 Sep 2011 18:42:08 +0200 Subject: convert a few for-loop char finds to proper strchr and memchr --- apt-pkg/sourcelist.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apt-pkg/sourcelist.cc') diff --git a/apt-pkg/sourcelist.cc b/apt-pkg/sourcelist.cc index a25358bf2..ebfb5289e 100644 --- a/apt-pkg/sourcelist.cc +++ b/apt-pkg/sourcelist.cc @@ -266,7 +266,7 @@ bool pkgSourceList::ReadAppend(string File) // CNC:2003-02-20 - Do not break if '#' is inside []. for (I = Buffer; *I != 0 && *I != '#'; I++) if (*I == '[') - for (I++; *I != 0 && *I != ']'; I++); + I = strchr(I + 1, ']'); *I = 0; const char *C = _strstrip(Buffer); -- cgit v1.2.3