summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg/contrib')
-rw-r--r--apt-pkg/contrib/fileutl.cc4
-rw-r--r--apt-pkg/contrib/hashsum_template.h2
-rw-r--r--apt-pkg/contrib/mmap.cc2
-rw-r--r--apt-pkg/contrib/netrc.cc2
4 files changed, 5 insertions, 5 deletions
diff --git a/apt-pkg/contrib/fileutl.cc b/apt-pkg/contrib/fileutl.cc
index 17833f090..464950abd 100644
--- a/apt-pkg/contrib/fileutl.cc
+++ b/apt-pkg/contrib/fileutl.cc
@@ -891,7 +891,7 @@ bool FileFd::Open(string FileName,unsigned int const Mode,CompressMode Compress,
{
for (; compressor != compressors.end(); ++compressor)
{
- std::string file = std::string(FileName).append(compressor->Extension);
+ std::string file = FileName + compressor->Extension;
if (FileExists(file) == false)
continue;
FileName = file;
@@ -1793,7 +1793,7 @@ bool FileFd::FileFdError(const char *Description,...) {
}
/*}}}*/
-gzFile FileFd::gzFd() { return (gzFile) d->gz; }
+gzFile FileFd::gzFd() { return d->gz; }
// Glob - wrapper around "glob()" /*{{{*/
diff --git a/apt-pkg/contrib/hashsum_template.h b/apt-pkg/contrib/hashsum_template.h
index 97b6a4ad9..f96188eb8 100644
--- a/apt-pkg/contrib/hashsum_template.h
+++ b/apt-pkg/contrib/hashsum_template.h
@@ -104,7 +104,7 @@ class SummationImplementation
inline bool Add(const unsigned char *Data)
{ return Add(Data, strlen((const char *)Data)); }
inline bool Add(const char *Data)
- { return Add((const unsigned char *)Data, strlen((const char *)Data)); }
+ { return Add((const unsigned char *)Data, strlen(Data)); }
inline bool Add(const unsigned char *Beg, const unsigned char *End)
{ return Add(Beg, End - Beg); }
diff --git a/apt-pkg/contrib/mmap.cc b/apt-pkg/contrib/mmap.cc
index 51e8eb30f..37acba340 100644
--- a/apt-pkg/contrib/mmap.cc
+++ b/apt-pkg/contrib/mmap.cc
@@ -198,7 +198,7 @@ bool MMap::Sync(unsigned long Start,unsigned long Stop)
{
#ifdef _POSIX_SYNCHRONIZED_IO
unsigned long long const PSize = sysconf(_SC_PAGESIZE);
- if (msync((char *)Base+(unsigned long long)(Start/PSize)*PSize,Stop - Start,MS_SYNC) < 0)
+ if (msync((char *)Base+(Start/PSize)*PSize, Stop - Start, MS_SYNC) < 0)
return _error->Errno("msync", _("Unable to synchronize mmap"));
#endif
}
diff --git a/apt-pkg/contrib/netrc.cc b/apt-pkg/contrib/netrc.cc
index de95aa4ab..32b146581 100644
--- a/apt-pkg/contrib/netrc.cc
+++ b/apt-pkg/contrib/netrc.cc
@@ -198,7 +198,7 @@ void maybe_add_auth (URI &Uri, string NetRCFile)
// if host did not work, try Host+Path next, this will trigger
// a lookup uri.startswith(host) in the netrc file parser (because
// of the "/"
- char *hostpath = strdup(string(Uri.Host+Uri.Path).c_str());
+ char *hostpath = strdup((Uri.Host + Uri.Path).c_str());
if (hostpath && parsenetrc_string(hostpath, login, password, netrcfile) == 0)
{
if (_config->FindB("Debug::Acquire::netrc", false) == true)