From: Cloudwalk Date: Tue, 25 May 2021 23:21:59 +0000 (-0400) Subject: cvar, prvm_cmds: Remove redundant Cmd_Exists checks X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=bbb80fb5e4edbd1a226bdc0e15d6f45efa11c67b;p=xonotic%2Fdarkplaces.git cvar, prvm_cmds: Remove redundant Cmd_Exists checks --- diff --git a/cvar.c b/cvar.c index ce1e0652..344512d0 100644 --- a/cvar.c +++ b/cvar.c @@ -647,7 +647,7 @@ void Cvar_RegisterVariable (cvar_t *variable) } // check for overlap with a command - if (Cmd_Exists(cmd_local, variable->name) || Cmd_Exists(cmd_local, variable->name)) + if (Cmd_Exists(cmd_local, variable->name)) { Con_Printf("Cvar_RegisterVariable: %s is a command\n", variable->name); return; @@ -712,7 +712,7 @@ cvar_t *Cvar_Get(cvar_state_t *cvars, const char *name, const char *value, int f } // check for overlap with a command - if (Cmd_Exists(cmd_local, name) || Cmd_Exists(cmd_local, name)) + if (Cmd_Exists(cmd_local, name)) { Con_Printf("Cvar_Get: %s is a command\n", name); return NULL; diff --git a/prvm_cmds.c b/prvm_cmds.c index 68e17589..07adabf3 100644 --- a/prvm_cmds.c +++ b/prvm_cmds.c @@ -1696,7 +1696,7 @@ void VM_registercvar(prvm_prog_t *prog) return; // check for overlap with a command - if (Cmd_Exists(cmd_local, name) || Cmd_Exists(cmd_local, name)) + if (Cmd_Exists(cmd_local, name)) { VM_Warning(prog, "VM_registercvar: %s is a command\n", name); return;