summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2015-12-27 11:50:05 +0100
committerJulian Andres Klode <jak@debian.org>2015-12-27 11:50:05 +0100
commit147041626609e95700781bea045f8e8ea18370a3 (patch)
treeb0688588b3b82bff3dcdf7b56f32bcdb21c8834b
parent50b7dbc5a8d7d53b266636c9f1798df264dbe48f (diff)
ParseDepends: Mark branches for build-dep parsing as unlikely
We do not see those branches at all during normal mode of operation (that is, during cache generation), so tell the compiler about it.
-rw-r--r--apt-pkg/deb/deblistparser.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc
index 121e02cd2..874a94e24 100644
--- a/apt-pkg/deb/deblistparser.cc
+++ b/apt-pkg/deb/deblistparser.cc
@@ -609,7 +609,7 @@ const char *debListParser::ParseDepends(const char *Start,const char *Stop,
// Skip whitespace
for (;I != Stop && isspace_ascii(*I) != 0; I++);
- if (ParseArchFlags == true)
+ if (unlikely(ParseArchFlags == true))
{
string const arch = _config->Find("APT::Architecture");
APT::CacheFilter::PackageArchitectureMatchesSpecification matchesArch(arch, false);
@@ -669,7 +669,7 @@ const char *debListParser::ParseDepends(const char *Start,const char *Stop,
for (;I != Stop && isspace_ascii(*I) != 0; I++);
}
- if (ParseRestrictionsList == true)
+ if (unlikely(ParseRestrictionsList == true))
{
// Parse a restrictions formula which is in disjunctive normal form:
// (foo AND bar) OR (blub AND bla)