=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/cmd.c,v retrieving revision 1.34 retrieving revision 1.35 diff -u -r1.34 -r1.35 --- src/usr.bin/tmux/cmd.c 2009/12/01 18:42:38 1.34 +++ src/usr.bin/tmux/cmd.c 2009/12/03 22:50:10 1.35 @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd.c,v 1.34 2009/12/01 18:42:38 nicm Exp $ */ +/* $OpenBSD: cmd.c,v 1.35 2009/12/03 22:50:10 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -169,7 +169,7 @@ int i; if (argc == 0) - return; + return; for (i = 0; i < argc; i++) { if (argv[i] != NULL) xfree(argv[i]); @@ -510,7 +510,7 @@ * be unique so an exact match can't be ambigious and can just be * returned. */ - for (i = 0; i < ARRAY_LENGTH(&sessions); i++) { + for (i = 0; i < ARRAY_LENGTH(&sessions); i++) { if ((s = ARRAY_ITEM(&sessions, i)) == NULL) continue; if (strcmp(name, s->name) == 0) @@ -522,7 +522,7 @@ * be ambiguous. */ sfound = NULL; - for (i = 0; i < ARRAY_LENGTH(&sessions); i++) { + for (i = 0; i < ARRAY_LENGTH(&sessions); i++) { if ((s = ARRAY_ITEM(&sessions, i)) == NULL) continue; if (strncmp(name, s->name, strlen(name)) == 0 || @@ -534,7 +534,7 @@ sfound = s; } } - return (sfound); + return (sfound); } /* @@ -558,7 +558,7 @@ if ((wl = winlink_find_by_index(&s->windows, idx)) != NULL) return (wl); } - + /* Look for exact matches, error if more than one. */ wlfound = NULL; RB_FOREACH(wl, winlinks, &s->windows) { @@ -584,7 +584,7 @@ } wlfound = wl; } - } + } if (wlfound != NULL) return (wlfound); @@ -707,7 +707,7 @@ wl = s->curw; else if ((wl = cmd_lookup_window(s, winptr, &ambiguous)) == NULL) goto not_found; - + if (sessptr != NULL) xfree(sessptr); return (wl); @@ -808,7 +808,7 @@ ctx->error(ctx, "invalid index: %s", arg); idx = -2; } - + if (sessptr != NULL) xfree(sessptr); return (idx); @@ -830,7 +830,7 @@ no_session: if (ambiguous) - ctx->error(ctx, "multiple sessions: %s", arg); + ctx->error(ctx, "multiple sessions: %s", arg); else ctx->error(ctx, "session not found: %s", arg); if (sessptr != NULL) @@ -918,7 +918,7 @@ /* Try index in the current session and window. */ if ((*wpp = window_pane_at_index(s->curw->window, idx)) == NULL) goto lookup_window; - + return (s->curw); lookup_window: @@ -926,7 +926,7 @@ if ((wl = cmd_find_window(ctx, arg, sp)) != NULL) *wpp = wl->window->active; return (wl); - + error: xfree(winptr); return (NULL);