summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/contrib/macros.h5
-rw-r--r--apt-pkg/pkgcache.cc2
2 files changed, 2 insertions, 5 deletions
diff --git a/apt-pkg/contrib/macros.h b/apt-pkg/contrib/macros.h
index e0c23b99b..807733927 100644
--- a/apt-pkg/contrib/macros.h
+++ b/apt-pkg/contrib/macros.h
@@ -17,10 +17,6 @@
#ifndef MACROS_H
#define MACROS_H
-/* Useful count macro, use on an array of things and it will return the
- number of items in the array */
-#define APT_ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0]))
-
// Flag Macros
#define FLAG(f) (1L << (f))
#define SETFLAG(v,f) ((v) |= FLAG(f))
@@ -141,6 +137,7 @@ AptScopeWrapper(F) -> AptScopeWrapper<F>;
#else
#define APT_OVERRIDE /* no c++11 standard */
#endif
+#define APT_ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0]))
#endif
#endif
#endif
diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc
index 57c6d2b22..1f5f12885 100644
--- a/apt-pkg/pkgcache.cc
+++ b/apt-pkg/pkgcache.cc
@@ -245,7 +245,7 @@ uint32_t pkgCache::CacheHash()
XXH3_64bits_update(state,
reinterpret_cast<const unsigned char *>(PACKAGE_VERSION),
- APT_ARRAY_SIZE(PACKAGE_VERSION));
+ strlen(PACKAGE_VERSION));
XXH3_64bits_update(state,
reinterpret_cast<const unsigned char *>(&header),