summaryrefslogtreecommitdiff
path: root/apt-pkg/pkgcachegen.cc
diff options
context:
space:
mode:
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;
}