diff --git a/src/give.c b/src/give.c index d22a09c73..3f8f62927 100644 --- a/src/give.c +++ b/src/give.c @@ -57,12 +57,7 @@ static int max_transfers(void) { static int GiveRestriction(void) { - static int value = -1; - if (value < 0) { - const char *str = get_param(global.parameters, "GiveRestriction"); - value = str ? atoi(str) : 0; - } - return value; + return get_param_int(global.parameters, "GiveRestriction", 0); } static void feedback_give_not_allowed(unit * u, order * ord)