Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8ede547c authored by Adam Buchbinder's avatar Adam Buchbinder
Browse files

Add missing va_end() calls in some variadic functions.

This addresses the following cppcheck reports:
[dumpstate/utils.cpp:666]: (error)
  va_list 'ap' was opened but not closed by va_end().
[dumpstate/utils.cpp:703]: (error)
  va_list 'ap' was opened but not closed by va_end().

Change-Id: I2405f063a6da1a109192484577bc18f5f40f2b99
parent c5bbe867
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -663,6 +663,7 @@ int run_command(const char *title, int timeout_seconds, const char *command, ...
        std::string cmd;
        format_args(command, args, &cmd);
        MYLOGE("skipping command %s because its args were not NULL-terminated", cmd.c_str());
        va_end(ap);
        return -1;
    }

@@ -700,6 +701,7 @@ int run_command_as_shell(const char *title, int timeout_seconds, const char *com
        std::string cmd;
        format_args(command, args, &cmd);
        MYLOGE("skipping command %s because its args were not NULL-terminated", cmd.c_str());
        va_end(ap);
        return -1;
    }