Remove unnecessary null-pointer check
It was dereferenced 8 lines before and the pointer cannot have changed since. Found by Coverity, CID 11363. Change-Id: I42e7ef1a481840699a8dffff1407ecab4e4f5930 Reviewed-by: Richard J. Moore <rich@kde.org>
This commit is contained in:
parent
ab6f941b50
commit
b03d91e3f7
@ -2485,8 +2485,7 @@ qint64 QAbstractSocket::writeData(const char *data, qint64 size)
|
|||||||
// Buffer what was not written yet
|
// Buffer what was not written yet
|
||||||
char *ptr = d->writeBuffer.reserve(size - written);
|
char *ptr = d->writeBuffer.reserve(size - written);
|
||||||
memcpy(ptr, data + written, size - written);
|
memcpy(ptr, data + written, size - written);
|
||||||
if (d->socketEngine)
|
d->socketEngine->setWriteNotificationEnabled(true);
|
||||||
d->socketEngine->setWriteNotificationEnabled(true);
|
|
||||||
}
|
}
|
||||||
return size; // size=actually written + what has been buffered
|
return size; // size=actually written + what has been buffered
|
||||||
} else if (!d->isBuffered && d->socketType != TcpSocket) {
|
} else if (!d->isBuffered && d->socketType != TcpSocket) {
|
||||||
|
Loading…
Reference in New Issue
Block a user