summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJérémie Courrèges-Anglas <jca@wxcvbn.org>2013-02-22 19:46:59 +0100
committerJérémie Courrèges-Anglas <jca@wxcvbn.org>2013-02-22 19:46:59 +0100
commit9cbe6c982d18fdd0ef12d45ba2cfe6629dd4b361 (patch)
treea3ecb0e6a47780fa37f38d398dee140fea44012d
parent3e2c03c1fccb811e8e1e32b8f4727988379aba3b (diff)
downloadratpoison-9cbe6c982d18fdd0ef12d45ba2cfe6629dd4b361.zip
receive_command_result() fixup
* forgot a break statement when moving things around * braino in comment: '1' is RET_SUCCESS, '0' is RET_FAILURE
-rw-r--r--src/communications.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/communications.c b/src/communications.c
index be406e6..76f3b98 100644
--- a/src/communications.c
+++ b/src/communications.c
@@ -76,8 +76,8 @@ receive_command_result (Window w)
/*
* We can receive:
* - an empty string, indicating a success but no output
- * - a string starting with '0', indicating a success and an output
- * - a string starting with '1', indicating a failure and an optional output
+ * - a string starting with '1', indicating a success and an output
+ * - a string starting with '0', indicating a failure and an optional output
*/
switch (result[0])
{
@@ -93,6 +93,7 @@ receive_command_result (Window w)
case '1': /* Command succeeded, print the output */
printf ("%s\n", &result[1]);
return_status = RET_SUCCESS;
+ break;
default: /* We probably got junk, so ignore it */
return_status = RET_FAILURE;
}