aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sway/commands.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sway/commands.c b/sway/commands.c
index 497e8eb1..7bfb71ba 100644
--- a/sway/commands.c
+++ b/sway/commands.c
@@ -766,7 +766,7 @@ static struct cmd_results *cmd_gaps(int argc, char **argv) {
766 // gaps amount 766 // gaps amount
767 if (argc >= 1 && isdigit(*amount_str)) { 767 if (argc >= 1 && isdigit(*amount_str)) {
768 int amount = (int)strtol(amount_str, NULL, 10); 768 int amount = (int)strtol(amount_str, NULL, 10);
769 if (errno == ERANGE || amount == 0) { 769 if (errno == ERANGE) {
770 errno = 0; 770 errno = 0;
771 return cmd_results_new(CMD_INVALID, "gaps", "Number is out out of range."); 771 return cmd_results_new(CMD_INVALID, "gaps", "Number is out out of range.");
772 } 772 }
@@ -781,7 +781,7 @@ static struct cmd_results *cmd_gaps(int argc, char **argv) {
781 // gaps inner|outer n 781 // gaps inner|outer n
782 else if (argc >= 2 && isdigit((amount_str = argv[1])[0])) { 782 else if (argc >= 2 && isdigit((amount_str = argv[1])[0])) {
783 int amount = (int)strtol(amount_str, NULL, 10); 783 int amount = (int)strtol(amount_str, NULL, 10);
784 if (errno == ERANGE || amount == 0) { 784 if (errno == ERANGE) {
785 errno = 0; 785 errno = 0;
786 return cmd_results_new(CMD_INVALID, "gaps", "Number is out out of range."); 786 return cmd_results_new(CMD_INVALID, "gaps", "Number is out out of range.");
787 } 787 }
@@ -829,7 +829,7 @@ static struct cmd_results *cmd_gaps(int argc, char **argv) {
829 // gaps ... n 829 // gaps ... n
830 amount_str = argv[3]; 830 amount_str = argv[3];
831 int amount = (int)strtol(amount_str, NULL, 10); 831 int amount = (int)strtol(amount_str, NULL, 10);
832 if (errno == ERANGE || amount == 0) { 832 if (errno == ERANGE) {
833 errno = 0; 833 errno = 0;
834 return cmd_results_new(CMD_INVALID, "gaps", "Number is out out of range."); 834 return cmd_results_new(CMD_INVALID, "gaps", "Number is out out of range.");
835 } 835 }