[BACK]Return to cmd.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / tmux

Diff for /src/usr.bin/tmux/cmd.c between version 1.170 and 1.171

version 1.170, 2021/08/21 18:39:07 version 1.171, 2021/08/25 08:51:55
Line 502 
Line 502 
         const struct cmd_entry  *entry;          const struct cmd_entry  *entry;
         struct cmd              *cmd;          struct cmd              *cmd;
         struct args             *args;          struct args             *args;
           char                    *error;
   
         if (count == 0 || values[0].type != ARGS_STRING) {          if (count == 0 || values[0].type != ARGS_STRING) {
                 xasprintf(cause, "no command");                  xasprintf(cause, "no command");
Line 511 
Line 512 
         if (entry == NULL)          if (entry == NULL)
                 return (NULL);                  return (NULL);
   
         args = args_parse(&entry->args, values, count);          args = args_parse(&entry->args, values, count, &error);
         if (args == NULL) {          if (args == NULL && error == NULL) {
                 xasprintf(cause, "usage: %s %s", entry->name, entry->usage);                  xasprintf(cause, "usage: %s %s", entry->name, entry->usage);
                   return (NULL);
           }
           if (args == NULL) {
                   xasprintf(cause, "command %s: %s", entry->name, error);
                   free(error);
                 return (NULL);                  return (NULL);
         }          }
   

Legend:
Removed from v.1.170  
changed lines
  Added in v.1.171