Skip to content

Commit d57f9a1

Browse files
sihuihan88lguohan
authored andcommitted
[lua]: use not to check whether the field exists (sonic-net#492)
Signed-off-by: Sihui Han <sihan@microsoft.com>
1 parent 118b3f0 commit d57f9a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

orchagent/pfc_restore.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ for i = n, 1, -1 do
2424
if not big_red_switch_mode and pfc_wd_status ~= 'operational' and pfc_wd_action ~= 'alert' and restoration_time and restoration_time ~= '' then
2525
restoration_time = tonumber(restoration_time)
2626
local time_left = redis.call('HGET', counters_table_name .. ':' .. KEYS[i], 'PFC_WD_RESTORATION_TIME_LEFT')
27-
if time_left == nil then
27+
if not time_left then
2828
time_left = restoration_time
2929
else
3030
time_left = tonumber(time_left)

0 commit comments

Comments
 (0)