diff options
| author | 2020-01-23 12:24:36 -0800 | |
|---|---|---|
| committer | 2020-01-23 12:40:08 -0800 | |
| commit | 3abc51c2ca6116bcf453968d4d5d6355248502c1 (patch) | |
| tree | 9c2f927f8ca166619dd0c2fc4a486bb0b15d73b0 /cmds/cmd/cmd.cpp | |
| parent | 8e7d61c0b1258421a7ea9213aa80a6b64d947a1e (diff) | |
cmd: fix compile error in DEBUG
cmd is a std::string_view, not a char*
Test: compile with #define DEBUG 1
Change-Id: If5950f526bd30c339d8d183a9dd1b48860095d1c
Diffstat (limited to 'cmds/cmd/cmd.cpp')
| -rw-r--r-- | cmds/cmd/cmd.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cmds/cmd/cmd.cpp b/cmds/cmd/cmd.cpp index 7b4aeb2cc2..8dad47502f 100644 --- a/cmds/cmd/cmd.cpp +++ b/cmds/cmd/cmd.cpp @@ -223,7 +223,8 @@ int cmdMain(const std::vector<std::string_view>& argv, TextOutput& outputLog, Te sp<MyResultReceiver> result = new MyResultReceiver(); #if DEBUG - ALOGD("cmd: Invoking %s in=%d, out=%d, err=%d", cmd, in, out, err); + ALOGD("cmd: Invoking %.*s in=%d, out=%d, err=%d", + static_cast<int>(cmd.size()), cmd.data(), in, out, err); #endif // TODO: block until a result is returned to MyResultReceiver. |