summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-05-15 18:43:36 +0000
committertron <tron@openttd.org>2005-05-15 18:43:36 +0000
commit0375f303364393e80cae54705c6e2177ed0674b8 (patch)
treedcea7b8f08669843f4eb428413fe41fcb183236d
parent33bb043fb60b5777bd8de695acc4be07c70bb7a1 (diff)
downloadopenttd-0375f303364393e80cae54705c6e2177ed0674b8.tar.xz
(svn r2323) Remove unused dereferencing
-rw-r--r--console.c10
-rw-r--r--console_cmds.c2
2 files changed, 6 insertions, 6 deletions
diff --git a/console.c b/console.c
index 1b065b12a..4b35a7e87 100644
--- a/console.c
+++ b/console.c
@@ -601,7 +601,7 @@ void IConsoleAliasExec(const IConsoleAlias *alias, byte tokencount, char *tokens
memset(&aliasstream, 0, sizeof(aliasstream));
aliases[0] = aliasstream;
- for (cmdptr = alias->cmdline, a_index = 0, astream_i = 0; *cmdptr != '\0'; *cmdptr++) {
+ for (cmdptr = alias->cmdline, a_index = 0, astream_i = 0; *cmdptr != '\0'; cmdptr++) {
if (a_index >= lengthof(aliases) || astream_i >= lengthof(aliasstream)) break;
switch (*cmdptr) {
@@ -611,10 +611,10 @@ void IConsoleAliasExec(const IConsoleAlias *alias, byte tokencount, char *tokens
case ';': /* Cmd seperator, start new command */
aliasstream[astream_i] = '\0';
aliases[++a_index] = &aliasstream[++astream_i];
- *cmdptr++;
+ cmdptr++;
break;
case '%': /* Some or all parameters */
- *cmdptr++;
+ cmdptr++;
switch (*cmdptr) {
case '+': { /* All parameters seperated: "[param 1]" "[param 2]" */
for (i = 0; i != tokencount; i++) {
@@ -1022,7 +1022,7 @@ void IConsoleCmdExec(const char *cmdstr)
bool longtoken = false;
bool foundtoken = false;
- for (cmdptr = cmdstr; *cmdptr != '\0'; *cmdptr++) {
+ for (cmdptr = cmdstr; *cmdptr != '\0'; cmdptr++) {
if (!IsValidAsciiChar(*cmdptr)) {
IConsoleError("command contains malformed characters, aborting");
IConsolePrintF(_icolour_err, "ERROR: command was: '%s'", cmdstr);
@@ -1040,7 +1040,7 @@ void IConsoleCmdExec(const char *cmdstr)
* enclosed in "" are taken as one token. We can only go as far as the amount
* of characters in our stream or the max amount of tokens we can handle */
tokens[0] = tokenstream;
- for (cmdptr = cmdstr, t_index = 0, tstream_i = 0; *cmdptr != '\0'; *cmdptr++) {
+ for (cmdptr = cmdstr, t_index = 0, tstream_i = 0; *cmdptr != '\0'; cmdptr++) {
if (t_index >= lengthof(tokens) || tstream_i >= lengthof(tokenstream)) break;
switch (*cmdptr) {
diff --git a/console_cmds.c b/console_cmds.c
index d125a8f40..502bc1048 100644
--- a/console_cmds.c
+++ b/console_cmds.c
@@ -627,7 +627,7 @@ DEF_CONSOLE_CMD(ConExec)
while (_script_running && fgets(cmdline, sizeof(cmdline), _script_file) != NULL) {
/* Remove newline characters from the executing script */
- for (cmdptr = cmdline; *cmdptr != '\0'; *cmdptr++) {
+ for (cmdptr = cmdline; *cmdptr != '\0'; cmdptr++) {
if (*cmdptr == '\n' || *cmdptr == '\r') {
*cmdptr = '\0';
break;