Cleaned up unused variables
This commit is contained in:
parent
df2830598c
commit
babf08ddc4
2 changed files with 15 additions and 17 deletions
|
@ -1038,9 +1038,7 @@ static int rub(token_t verb, token_t obj)
|
||||||
static int say(struct command_t *command)
|
static int say(struct command_t *command)
|
||||||
/* Say. Echo WD2 (or WD1 if no WD2 (SAY WHAT?, etc.).) Magic words override. */
|
/* Say. Echo WD2 (or WD1 if no WD2 (SAY WHAT?, etc.).) Magic words override. */
|
||||||
{
|
{
|
||||||
long a = command->wd1;
|
|
||||||
if (command->wd2 > 0) {
|
if (command->wd2 > 0) {
|
||||||
a = command->wd2;
|
|
||||||
command->wd1 = command->wd2;
|
command->wd1 = command->wd2;
|
||||||
strcpy(command->raw1, command->raw2);
|
strcpy(command->raw1, command->raw2);
|
||||||
}
|
}
|
||||||
|
|
2
misc.c
2
misc.c
|
@ -95,7 +95,7 @@ void tokenize(char* raw, struct command_t *cmd)
|
||||||
memset(cmd, '\0', sizeof(struct command_t));
|
memset(cmd, '\0', sizeof(struct command_t));
|
||||||
|
|
||||||
/* FIXME: put a bound prefix on the %s to prevent buffer overflow */
|
/* FIXME: put a bound prefix on the %s to prevent buffer overflow */
|
||||||
int word_count = sscanf(raw, "%s%s", cmd->raw1, cmd->raw2);
|
sscanf(raw, "%s%s", cmd->raw1, cmd->raw2);
|
||||||
|
|
||||||
// pack the substrings
|
// pack the substrings
|
||||||
cmd->wd1 = token_to_packed(cmd->raw1);
|
cmd->wd1 = token_to_packed(cmd->raw1);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue