Fix GCC format-security errors and convert sprintfs.
[oweals/u-boot.git] / common / cli.c
index b6ae80a5fe9d2cb79c7b6571c3e91714ba830f06..119d282bc240d82ba4cfcc050c1cb5c118709cb1 100644 (file)
@@ -12,6 +12,7 @@
 #include <common.h>
 #include <cli.h>
 #include <cli_hush.h>
+#include <console.h>
 #include <fdtdec.h>
 #include <malloc.h>
 
@@ -102,9 +103,9 @@ int run_command_list(const char *cmd, int len, int flag)
         * is pretty rare.
         */
        rcode = cli_simple_run_command_list(buff, flag);
+#endif
        if (need_buff)
                free(buff);
-#endif
 
        return rcode;
 }