From 1cb3775cedb7865534aecd62e111b84ce7b37046 Mon Sep 17 00:00:00 2001 From: Kevin Easton Date: Fri, 27 Oct 2017 20:35:33 +1100 Subject: [PATCH] Fix typo testing VIF_CHANGED This error seemed to be benign, because I don't think there was a way to get here with int_flags non-zero without VIF_CHANGED already set. Remove unnecessary tests for 'value' and '!value', because value is always non-NULL in that code path. --- source/vars.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/source/vars.c b/source/vars.c index 12bf1af..4b096bc 100644 --- a/source/vars.c +++ b/source/vars.c @@ -935,11 +935,9 @@ void set_var_value(int var_index, char *value, IrcVariableDll *dll) else say("SET: no such user"); } - if ((!var->int_flags & VIF_CHANGED)) + if (!(var->int_flags & VIF_CHANGED)) { - if ((var->string && ! value) || - (! var->string && value) || - my_stricmp(var->string, value)) + if (!var->string || my_stricmp(var->string, value)) var->int_flags |= VIF_CHANGED; } if (loading_global)