Skip to content

Commit 3dbf27e

Browse files
committed
[lldb] A different fix for Domain Socket tests
we need to drop nuls from the end of the string.
1 parent b68a62b commit 3dbf27e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lldb/source/Host/posix/DomainSocket.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ std::string DomainSocket::GetSocketName() const {
143143
llvm::StringRef name(saddr_un.sun_path + GetNameOffset(),
144144
sock_addr_len - offsetof(struct sockaddr_un, sun_path) -
145145
GetNameOffset());
146-
name = name.drop_while([](char c) { return c == '\0'; });
146+
name = name.rtrim('\0');
147147

148148
return name.str();
149149
}

0 commit comments

Comments
 (0)