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

Diff for /src/usr.bin/tmux/cmd-kill-session.c between version 1.10 and 1.11

version 1.10, 2012/06/18 09:16:15 version 1.11, 2012/07/11 07:10:15
Line 27 
Line 27 
  * Note this deliberately has no alias to make it hard to hit by accident.   * Note this deliberately has no alias to make it hard to hit by accident.
  */   */
   
 int     cmd_kill_session_exec(struct cmd *, struct cmd_ctx *);  enum cmd_retval  cmd_kill_session_exec(struct cmd *, struct cmd_ctx *);
   
 const struct cmd_entry cmd_kill_session_entry = {  const struct cmd_entry cmd_kill_session_entry = {
         "kill-session", NULL,          "kill-session", NULL,
Line 39 
Line 39 
         cmd_kill_session_exec          cmd_kill_session_exec
 };  };
   
 int  enum cmd_retval
 cmd_kill_session_exec(struct cmd *self, struct cmd_ctx *ctx)  cmd_kill_session_exec(struct cmd *self, struct cmd_ctx *ctx)
 {  {
         struct args     *args = self->args;          struct args     *args = self->args;
         struct session  *s, *s2, *s3;          struct session  *s, *s2, *s3;
   
         if ((s = cmd_find_session(ctx, args_get(args, 't'), 0)) == NULL)          if ((s = cmd_find_session(ctx, args_get(args, 't'), 0)) == NULL)
                 return (-1);                  return (CMD_RETURN_ERROR);
   
         if (args_has(args, 'a')) {          if (args_has(args, 'a')) {
                 RB_FOREACH_SAFE(s2, sessions, &sessions, s3) {                  RB_FOREACH_SAFE(s2, sessions, &sessions, s3) {
Line 59 
Line 59 
                 server_destroy_session(s);                  server_destroy_session(s);
                 session_destroy(s);                  session_destroy(s);
         }          }
         return (0);          return (CMD_RETURN_NORMAL);
 }  }

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11