summaryrefslogtreecommitdiffstats
path: root/tdecore
diff options
context:
space:
mode:
Diffstat (limited to 'tdecore')
-rw-r--r--tdecore/network/khttpproxysocketdevice.cpp9
-rw-r--r--tdecore/network/kserversocket.cpp2
-rw-r--r--tdecore/network/tdesocketbuffer.cpp11
3 files changed, 13 insertions, 9 deletions
diff --git a/tdecore/network/khttpproxysocketdevice.cpp b/tdecore/network/khttpproxysocketdevice.cpp
index e4529f28a..0c4947554 100644
--- a/tdecore/network/khttpproxysocketdevice.cpp
+++ b/tdecore/network/khttpproxysocketdevice.cpp
@@ -170,11 +170,14 @@ bool KHttpProxySocketDevice::connect(const TQString& node, const TQString& servi
bool KHttpProxySocketDevice::parseServerReply()
{
// make sure we're connected
- if (!TDESocketDevice::connect(d->proxy))
- if (error() == InProgress)
+ if (!TDESocketDevice::connect(d->proxy)) {
+ if (error() == InProgress) {
return true;
- else if (error() != NoError)
+ }
+ else if (error() != NoError) {
return false;
+ }
+ }
if (!d->request.isEmpty())
{
diff --git a/tdecore/network/kserversocket.cpp b/tdecore/network/kserversocket.cpp
index 16a48cdf2..e04d74b08 100644
--- a/tdecore/network/kserversocket.cpp
+++ b/tdecore/network/kserversocket.cpp
@@ -292,7 +292,7 @@ KActiveSocketBase* TDEServerSocket::accept()
}
else if (!listen())
// error happened during listen
- return false;
+ return 0L;
}
// check to see if we're doing a timeout
diff --git a/tdecore/network/tdesocketbuffer.cpp b/tdecore/network/tdesocketbuffer.cpp
index 33b8fe776..13c7c0447 100644
--- a/tdecore/network/tdesocketbuffer.cpp
+++ b/tdecore/network/tdesocketbuffer.cpp
@@ -183,7 +183,7 @@ TQ_LONG TDESocketBuffer::consumeBuffer(char *destbuffer, TQ_LONG maxlen, bool di
{
// calculate how much we'll copy
size_t to_copy = (*it).size() - offset;
- if (to_copy > maxlen)
+ if (to_copy > (size_t)maxlen)
to_copy = maxlen;
// do the copying
@@ -234,12 +234,12 @@ TQ_LONG TDESocketBuffer::sendTo(KActiveSocketBase* dev, TQ_LONG len)
return 0;
TQMutexLocker locker(&m_mutex);
-
+
TQValueListIterator<TQByteArray> it = m_list.begin(),
end = m_list.end();
TQIODevice::Offset offset = m_offset;
TQ_LONG written = 0;
-
+
// walk the buffer
while (it != end && (len || len == -1))
{
@@ -249,8 +249,9 @@ TQ_LONG TDESocketBuffer::sendTo(KActiveSocketBase* dev, TQ_LONG len)
// question is: how big should that buffer be? 2 kB should be enough
TQ_ULONG bufsize = 1460;
- if (len != -1 && len < bufsize)
+ if ((len != -1) && ((TQ_ULONG)len < bufsize)) {
bufsize = len;
+ }
TQByteArray buf(bufsize);
TQ_LONG count = 0;
@@ -263,7 +264,7 @@ TQ_LONG TDESocketBuffer::sendTo(KActiveSocketBase* dev, TQ_LONG len)
}
// see if we can still fit more
- if (count < bufsize && it != end)
+ if ((TQ_ULONG)count < bufsize && it != end)
{
// getting here means this buffer (*it) is larger than
// (bufsize - count) (even for count == 0).