aboutsummaryrefslogtreecommitdiffstats
path: root/group.c
diff options
context:
space:
mode:
authorokan2018-01-23 13:48:49 +0000
committerokan2018-01-23 13:48:49 +0000
commita986bd0feca77e8149e5e75d1ab26c15fb7c8387 (patch)
tree4ff0b87df34a7bc0f4cefe12be6d4d66e6886e0c /group.c
parent2f6dc5051a17cfb3ebcf0abe88c202a96cab8675 (diff)
downloadcwm-a986bd0feca77e8149e5e75d1ab26c15fb7c8387.tar.gz
If the requested group number is invalid, bail but don't kill cwm.
Diffstat (limited to '')
-rw-r--r--group.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/group.c b/group.c
index 1c51979..106ee0a 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.127 2017/12/29 16:55:50 okan Exp $
+ * $OpenBSD: group.c,v 1.128 2018/01/23 13:48:49 okan Exp $
*/
#include <sys/types.h>
@@ -155,7 +155,7 @@ group_movetogroup(struct client_ctx *cc, int idx)
struct group_ctx *gc;
if (idx < 0 || idx >= Conf.ngroups)
- errx(1, "%s: index out of range (%d)", __func__, idx);
+ return;
TAILQ_FOREACH(gc, &sc->groupq, entry) {
if (gc->num == idx)
@@ -216,7 +216,7 @@ group_hidetoggle(struct screen_ctx *sc, int idx)
struct group_ctx *gc;
if (idx < 0 || idx >= Conf.ngroups)
- errx(1, "%s: index out of range (%d)", __func__, idx);
+ return;
TAILQ_FOREACH(gc, &sc->groupq, entry) {
if (gc->num == idx)
@@ -239,7 +239,7 @@ group_only(struct screen_ctx *sc, int idx)
struct group_ctx *gc;
if (idx < 0 || idx >= Conf.ngroups)
- errx(1, "%s: index out of range (%d)", __func__, idx);
+ return;
TAILQ_FOREACH(gc, &sc->groupq, entry) {
if (gc->num == idx)