summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJérémie Courrèges-Anglas <jca@wxcvbn.org>2014-03-03 21:37:17 +0100
committerJérémie Courrèges-Anglas <jca@wxcvbn.org>2014-03-03 21:37:17 +0100
commitf010d26cbad242f2a98c2d67e5100bdf9387addb (patch)
treee6efd8d56349f13de4ffc14e1dc29406e71c72ef
parentaec1e90984d3a3bdebdeeac790b4a664781f0929 (diff)
downloadratpoison-f010d26cbad242f2a98c2d67e5100bdf9387addb.zip
Refine error messages in cmd_fdump.
-rw-r--r--src/actions.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/actions.c b/src/actions.c
index 4bc1b7d..3fe97a8 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -4970,8 +4970,10 @@ cmd_fdump (int interactively UNUSED, struct cmdarg **args)
int snum;
snum = ARG(0,number);
- if (snum < 0 || num_screens <= snum)
- return cmdret_new (RET_FAILURE, "fdump: invalid argument");
+ if (snum < 0)
+ return cmdret_new (RET_FAILURE, "fdump: invalid negative screen number");
+ else if (num_screens <= snum)
+ return cmdret_new (RET_FAILURE, "fdump: unknown screen");
else
{
char *s = fdump (&screens[snum]);