about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2005-12-24T23·32+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2005-12-24T23·32+0000
commit1440419b45dec876497b982f945bcfff8d0aea4b (patch)
treece0e011c905ca8172b6da5b8685069096bf9203a
parent1d2460ee5da0f026807ac645aebdd8ab811058cd (diff)
* GCC 2.95 compatibility.
-rw-r--r--src/libstore/store.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstore/store.cc b/src/libstore/store.cc
index dc3625a1d5da..2ab52301fb57 100644
--- a/src/libstore/store.cc
+++ b/src/libstore/store.cc
@@ -301,7 +301,7 @@ static string addPrefix(const string & prefix, const string & s)
 static string stripPrefix(const string & prefix, const string & s)
 {
     if (s.size() <= prefix.size() ||
-        s.compare(0, prefix.size(), prefix) != 0 ||
+        string(s, 0, prefix.size()) != prefix ||
         s[prefix.size()] != 0)
         throw Error(format("string `%1%' is missing prefix `%2%'")
             % s % prefix);