]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/cmdmain.c
Fixed several issues found using a coverity-scan
[proxmark3-svn] / client / cmdmain.c
index 59ab8bf5f81d3151cfc36956dd273c9922b57b48..77f1c373ece5bb884b0f9b3ea78c8af1dcbe2440 100644 (file)
@@ -45,17 +45,21 @@ static int cmd_tail;//Starts as 0
 
 static command_t CommandTable[] = 
 {
-  {"help",  CmdHelp,  1, "This help. Use '<command> help' for details of the following commands:\n"},
+  {"help",  CmdHelp,  1, "This help. Use '<command> help' for details of a particular command."},
   {"data",  CmdData,  1, "{ Plot window / data buffer manipulation... }"},
-  {"exit",  CmdQuit,  1, "Exit program"},
   {"hf",    CmdHF,    1, "{ HF commands... }"},
   {"hw",    CmdHW,    1, "{ Hardware commands... }"},
   {"lf",    CmdLF,    1, "{ LF commands... }"},
-  {"quit",  CmdQuit,  1, "Quit program"},
-  {"script", CmdScript,   1,"Run script"},
+  {"script", CmdScript,   1,"{ Scripting commands }"},
+  {"quit",  CmdQuit,  1, "Exit program"},
+  {"exit",  CmdQuit,  1, "Exit program"},
   {NULL, NULL, 0, NULL}
 };
 
+command_t* getTopLevelCommandTable()
+{
+  return CommandTable;
+}
 int CmdHelp(const char *Cmd)
 {
   CmdsHelp(CommandTable);
@@ -130,8 +134,9 @@ int getCommand(UsbCommand* response)
  */
 bool WaitForResponseTimeout(uint32_t cmd, UsbCommand* response, size_t ms_timeout) {
   
+  UsbCommand resp;
+
   if (response == NULL) {
-    UsbCommand resp;
     response = &resp;
   }
 
Impressum, Datenschutz