diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2013-04-23 08:08:54 +0200 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2013-04-23 08:08:54 +0200 |
commit | 3444603f5ff2b4c4816e45e686e06e01df31cdc4 (patch) | |
tree | b0e63e9bc86ca6d39f6987381ca7bfa64e186048 /apt-pkg/srcrecords.cc | |
parent | 52d5690b47bd4efe425fa23d9f6559bb44324cd1 (diff) | |
parent | 3278fe66567d149ea92c1afa78941f2bc3c71c85 (diff) |
merged debian-sid branch and resolved conflicts
Diffstat (limited to 'apt-pkg/srcrecords.cc')
-rw-r--r-- | apt-pkg/srcrecords.cc | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/apt-pkg/srcrecords.cc b/apt-pkg/srcrecords.cc index d63d2c422..297559957 100644 --- a/apt-pkg/srcrecords.cc +++ b/apt-pkg/srcrecords.cc @@ -42,7 +42,7 @@ pkgSrcRecords::pkgSrcRecords(pkgSourceList &List) : d(NULL), Files(0), Current(0 } // Doesn't work without any source index files - if (Files.size() == 0) + if (Files.empty() == true) { _error->Error(_("You must put some 'source' URIs" " in your sources.list")); @@ -121,14 +121,13 @@ pkgSrcRecords::Parser *pkgSrcRecords::Find(const char *Package,bool const &SrcOn /* */ const char *pkgSrcRecords::Parser::BuildDepType(unsigned char const &Type) { - const char *fields[] = {"Build-Depends", - "Build-Depends-Indep", + const char *fields[] = {"Build-Depends", + "Build-Depends-Indep", "Build-Conflicts", "Build-Conflicts-Indep"}; - if (Type < 4) - return fields[Type]; - else + if (unlikely(Type >= sizeof(fields)/sizeof(fields[0]))) return ""; + return fields[Type]; } /*}}}*/ |