summaryrefslogtreecommitdiff
path: root/apt-pkg/pkgcachegen.cc
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 16:50:43 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 16:50:43 +0000
commit9c14e3d619e713aefa623986b5bbae81a1d6cc94 (patch)
tree282c77581b35bbdc46faa400be5d64ec37605507 /apt-pkg/pkgcachegen.cc
parent6c139d6e362f04a1582e8a8f511f8aeab031fecf (diff)
Config class and source list
Author: jgg Date: 1998-07-09 05:12:27 GMT Config class and source list
Diffstat (limited to 'apt-pkg/pkgcachegen.cc')
-rw-r--r--apt-pkg/pkgcachegen.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/apt-pkg/pkgcachegen.cc b/apt-pkg/pkgcachegen.cc
index aac3f77d9..3e37c74f3 100644
--- a/apt-pkg/pkgcachegen.cc
+++ b/apt-pkg/pkgcachegen.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: pkgcachegen.cc,v 1.7 1998/07/07 04:17:04 jgg Exp $
+// $Id: pkgcachegen.cc,v 1.8 1998/07/09 05:12:27 jgg Exp $
/* ######################################################################
Package Cache Generator - Generator for the cache structure.
@@ -17,6 +17,7 @@
#include <pkglib/pkgcachegen.h>
#include <pkglib/error.h>
#include <pkglib/version.h>
+#include <strutl.h>
#include <sys/stat.h>
#include <unistd.h>
@@ -329,9 +330,7 @@ unsigned long pkgCacheGenerator::WriteUniqString(const char *S,
for (; I != Cache.StringItemP; Last = &I->NextItem,
I = Cache.StringItemP + I->NextItem)
{
- Res = strncmp(Cache.StrP + I->String,S,Size);
- if (Res == 0 && *(Cache.StrP + I->String + Size) != 0)
- Res = 1;
+ Res = stringcmp(S,S+Size,Cache.StrP + I->String);
if (Res >= 0)
break;
}