From fca515838e70f8bec7028b840bb921a1be9fabbb Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Mon, 26 Jan 2015 16:03:11 +0100 Subject: Cleanup: strcmp/strncmp -> STREQ/STREQLEN (in boolean usage). Makes usage of those funcs much more clear, we even had mixed '!strcmp(foo, bar)' and 'strcmp(foo, bar) == 0' in several places... --- source/blender/editors/space_console/console_ops.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/blender/editors/space_console') diff --git a/source/blender/editors/space_console/console_ops.c b/source/blender/editors/space_console/console_ops.c index 2d5e5c6e0f2..8263268898f 100644 --- a/source/blender/editors/space_console/console_ops.c +++ b/source/blender/editors/space_console/console_ops.c @@ -107,7 +107,7 @@ static ConsoleLine *console_history_find(SpaceConsole *sc, const char *str, Cons if (cl == cl_ignore) continue; - if (strcmp(str, cl->line) == 0) + if (STREQ(str, cl->line)) return cl; } @@ -722,7 +722,7 @@ static int console_history_cycle_exec(bContext *C, wmOperator *op) if (ci->prev) { ConsoleLine *ci_prev = (ConsoleLine *)ci->prev; - if (strcmp(ci->line, ci_prev->line) == 0) + if (STREQ(ci->line, ci_prev->line)) console_history_free(sc, ci_prev); } @@ -791,7 +791,7 @@ static int console_history_append_exec(bContext *C, wmOperator *op) while ((cl = console_history_find(sc, ci->line, ci))) console_history_free(sc, cl); - if (strcmp(str, ci->line) == 0) { + if (STREQ(str, ci->line)) { MEM_freeN(str); return OPERATOR_FINISHED; } -- cgit v1.2.3