summaryrefslogtreecommitdiffstats
path: root/src/network/socket/qlocalsocket_unix.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/socket/qlocalsocket_unix.cpp')
-rw-r--r--src/network/socket/qlocalsocket_unix.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network/socket/qlocalsocket_unix.cpp b/src/network/socket/qlocalsocket_unix.cpp
index 0c447e90a4..626d46d7bf 100644
--- a/src/network/socket/qlocalsocket_unix.cpp
+++ b/src/network/socket/qlocalsocket_unix.cpp
@@ -401,8 +401,8 @@ bool QLocalSocketPrivate::parseSockaddr(const struct ::sockaddr_un &addr,
if (!name.isEmpty() && !toUtf16.hasError()) {
//conversion encodes the trailing zeros. So, in case of non-abstract namespace we
//chop them off as \0 character is not allowed in filenames
- if (!abstractNamespace && (name.at(name.length() - 1) == QChar::fromLatin1('\0'))) {
- int truncPos = name.length() - 1;
+ if (!abstractNamespace && (name.at(name.size() - 1) == QChar::fromLatin1('\0'))) {
+ int truncPos = name.size() - 1;
while (truncPos > 0 && name.at(truncPos - 1) == QChar::fromLatin1('\0'))
truncPos--;
name.truncate(truncPos);