projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b68a62b
)
[lldb] A different fix for Domain Socket tests
author
Pavel Labath
<pavel@labath.sk>
Mon, 27 Sep 2021 15:57:22 +0000
(17:57 +0200)
committer
Pavel Labath
<pavel@labath.sk>
Mon, 27 Sep 2021 16:00:27 +0000
(18:00 +0200)
we need to drop nuls from the end of the string.
lldb/source/Host/posix/DomainSocket.cpp
patch
|
blob
|
history
diff --git
a/lldb/source/Host/posix/DomainSocket.cpp
b/lldb/source/Host/posix/DomainSocket.cpp
index 8138b6ff1dc4e98d8d950ed1c8c659dee9ecbea2..0a43d00e93ee10b7fddc1cc7723b741ec0d4d64e 100644
(file)
--- a/
lldb/source/Host/posix/DomainSocket.cpp
+++ b/
lldb/source/Host/posix/DomainSocket.cpp
@@
-143,7
+143,7
@@
std::string DomainSocket::GetSocketName() const {
llvm::StringRef name(saddr_un.sun_path + GetNameOffset(),
sock_addr_len - offsetof(struct sockaddr_un, sun_path) -
GetNameOffset());
- name = name.
drop_while([](char c) { return c == '\0'; }
);
+ name = name.
rtrim('\0'
);
return name.str();
}