Since _validate_tres_usage_limits_for_{assoc,qos} differed only
by assignment of a value to the out_tres_limit_array (the 3rd argument to the _validate_tres_usage_limits_for_qos function), I added function _validate_tres_usage_limits with an added bool argument to check whether the assignment should be made. _validate_tres_usage_limits_for_{assoc,qos} just calls/returns _validate_tres_usage_limits with the new bool argument being set for expected functionality: out_tres_limit_set == true same as _validate_tres_usage_limits_for_qos out_tres_limit_set == false same as _validate_tres_usage_limits_for_assoc I went with the call through approach instead of changing the existing called function names; not knowing if future developments would warrant the functions diverging further, and so keeping differing function names a necessity.
Please register or sign in to comment