projects
/
platform
/
upstream
/
nsjail.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a2d0e70
)
uts: simplify sethostname
author
Robert Swiecki
<robert@swiecki.net>
Wed, 14 Feb 2018 15:38:36 +0000
(16:38 +0100)
committer
Robert Swiecki
<robert@swiecki.net>
Wed, 14 Feb 2018 15:38:36 +0000
(16:38 +0100)
uts.cc
patch
|
blob
|
history
diff --git
a/uts.cc
b/uts.cc
index 5827dddf56a49a6880198478fb473e51a8b7c39f..9148d2b683b82fd8811db1e1cdd7dd3026fe2bd3 100644
(file)
--- a/
uts.cc
+++ b/
uts.cc
@@
-34,7
+34,7
@@
bool initNs(nsjconf_t* nsjconf) {
}
LOG_D("Setting hostname to '%s'", nsjconf->hostname.c_str());
- if (sethostname(nsjconf->hostname.
c_str(), strlen(nsjconf->hostname.c_str()
)) == -1) {
+ if (sethostname(nsjconf->hostname.
data(), nsjconf->hostname.length(
)) == -1) {
PLOG_E("sethostname('%s')", nsjconf->hostname.c_str());
return false;
}