summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--common/log.c4
-rw-r--r--sway/commands.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/common/log.c b/common/log.c
index 6d958db2..c68f0516 100644
--- a/common/log.c
+++ b/common/log.c
@@ -68,7 +68,7 @@ void _sway_log(log_importance_t verbosity, const char* format, ...) {
68#endif 68#endif
69 if (verbosity <= v) { 69 if (verbosity <= v) {
70 unsigned int c = verbosity; 70 unsigned int c = verbosity;
71 if (c > sizeof(verbosity_colors) / sizeof(char *)) { 71 if (c > sizeof(verbosity_colors) / sizeof(char *) - 1) {
72 c = sizeof(verbosity_colors) / sizeof(char *) - 1; 72 c = sizeof(verbosity_colors) / sizeof(char *) - 1;
73 } 73 }
74 74
@@ -96,7 +96,7 @@ void _sway_log(log_importance_t verbosity, const char* format, ...) {
96void sway_log_errno(log_importance_t verbosity, char* format, ...) { 96void sway_log_errno(log_importance_t verbosity, char* format, ...) {
97 if (verbosity <= v) { 97 if (verbosity <= v) {
98 unsigned int c = verbosity; 98 unsigned int c = verbosity;
99 if (c > sizeof(verbosity_colors) / sizeof(char *)) { 99 if (c > sizeof(verbosity_colors) / sizeof(char *) - 1) {
100 c = sizeof(verbosity_colors) / sizeof(char *) - 1; 100 c = sizeof(verbosity_colors) / sizeof(char *) - 1;
101 } 101 }
102 102
diff --git a/sway/commands.c b/sway/commands.c
index 73e9ffaf..9b0356c4 100644
--- a/sway/commands.c
+++ b/sway/commands.c
@@ -2113,7 +2113,7 @@ static struct cmd_results *cmd_split(int argc, char **argv) {
2113 } 2113 }
2114 } else { 2114 } else {
2115 error = cmd_results_new(CMD_FAILURE, "split", 2115 error = cmd_results_new(CMD_FAILURE, "split",
2116 "Invalid split command (expected either horiziontal or vertical)."); 2116 "Invalid split command (expected either horizontal or vertical).");
2117 return error; 2117 return error;
2118 } 2118 }
2119 return cmd_results_new(CMD_SUCCESS, NULL, NULL); 2119 return cmd_results_new(CMD_SUCCESS, NULL, NULL);