aboutsummaryrefslogtreecommitdiffstats
path: root/group.c
diff options
context:
space:
mode:
authorokan2019-02-28 23:26:12 +0000
committerokan2019-02-28 23:26:12 +0000
commita2862aa36ac4cfd2b613edc356bf0ebfdaeec84e (patch)
tree9acff8eebe86e6eaacbe9220a7aa35cb277e1d8b /group.c
parent647ee7a24a435b91d26f1f2f7a9a1f199e87a7ee (diff)
downloadcwm-a2862aa36ac4cfd2b613edc356bf0ebfdaeec84e.tar.gz
Move the group index (desktop number) check to the only 2 callers that require
checking due to ewmh.
Diffstat (limited to '')
-rw-r--r--group.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/group.c b/group.c
index 06e73eb..c51bf51 100644
--- a/group.c
+++ b/group.c
@@ -16,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $OpenBSD: group.c,v 1.131 2019/02/28 23:20:52 okan Exp $
+ * $OpenBSD: group.c,v 1.132 2019/02/28 23:26:12 okan Exp $
*/
#include <sys/types.h>
@@ -156,9 +156,6 @@ group_movetogroup(struct client_ctx *cc, int idx)
struct screen_ctx *sc = cc->sc;
struct group_ctx *gc;
- if (idx < 0 || idx >= Conf.ngroups)
- return;
-
TAILQ_FOREACH(gc, &sc->groupq, entry) {
if (gc->num == idx) {
if (cc->gc == gc)
@@ -216,9 +213,6 @@ group_hidetoggle(struct screen_ctx *sc, int idx)
{
struct group_ctx *gc;
- if (idx < 0 || idx >= Conf.ngroups)
- return;
-
TAILQ_FOREACH(gc, &sc->groupq, entry) {
if (gc->num == idx) {
if (group_holds_only_hidden(gc))
@@ -238,9 +232,6 @@ group_only(struct screen_ctx *sc, int idx)
{
struct group_ctx *gc;
- if (idx < 0 || idx >= Conf.ngroups)
- return;
-
TAILQ_FOREACH(gc, &sc->groupq, entry) {
if (gc->num == idx)
group_show(gc);
@@ -255,9 +246,6 @@ group_close(struct screen_ctx *sc, int idx)
struct group_ctx *gc;
struct client_ctx *cc;
- if (idx < 0 || idx >= Conf.ngroups)
- return;
-
TAILQ_FOREACH(gc, &sc->groupq, entry) {
if (gc->num == idx) {
TAILQ_FOREACH(cc, &gc->clientq, group_entry)