forked from github/server
variable scope reduction
This commit is contained in:
parent
a9f3592228
commit
c856228d5e
1 changed files with 2 additions and 4 deletions
|
@ -3339,7 +3339,6 @@ int pay_cmd(unit * u, struct order *ord)
|
||||||
cmistake(u, ord, 6, MSG_EVENT);
|
cmistake(u, ord, 6, MSG_EVENT);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
building *b = NULL;
|
|
||||||
param_t p;
|
param_t p;
|
||||||
int id;
|
int id;
|
||||||
|
|
||||||
|
@ -3355,13 +3354,12 @@ int pay_cmd(unit * u, struct order *ord)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* If no building id is given or it is the id of our building, just set the do-not-pay flag */
|
/* If no building id is given or it is the id of our building, just set the do-not-pay flag */
|
||||||
if (id == 0 || id == u->building->no)
|
if (id == 0 || id == u->building->no) {
|
||||||
{
|
|
||||||
u->building->flags |= BLD_DONTPAY;
|
u->building->flags |= BLD_DONTPAY;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* Find the building that matches to the given id*/
|
/* Find the building that matches to the given id*/
|
||||||
b = findbuilding(id);
|
building *b = findbuilding(id);
|
||||||
/* If there is a building and it is in the same region as the unit continue, else: error */
|
/* If there is a building and it is in the same region as the unit continue, else: error */
|
||||||
if (b && b->region == u->region)
|
if (b && b->region == u->region)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue