Fixed nullptr check.
arg[0] is always the command being passed to execvp and hence it will
never be null; the real args start at arg[1]
BUG: 27832567
Change-Id: I3180eae857cf028315b1da7cbd38b40994ff98b0
Fixes: 29276781
diff --git a/cmds/dumpstate/utils.cpp b/cmds/dumpstate/utils.cpp
index 992f0a9..0850468 100644
--- a/cmds/dumpstate/utils.cpp
+++ b/cmds/dumpstate/utils.cpp
@@ -1376,7 +1376,7 @@
void format_args(const char* command, const char *args[], std::string *string) {
LOG_ALWAYS_FATAL_IF(args == nullptr || command == nullptr);
string->append(command);
- if (args[0] == nullptr) return;
+ if (args[1] == nullptr) return;
string->append(" ");
for (int arg = 1; arg <= 1000; ++arg) {