Skip to content

Commit

Permalink
[lua]: use not to check whether the field exists (sonic-net#492)
Browse files Browse the repository at this point in the history
Signed-off-by: Sihui Han <sihan@microsoft.com>
  • Loading branch information
sihuihan88 authored and lguohan committed May 2, 2018
1 parent 118b3f0 commit d57f9a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion orchagent/pfc_restore.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ for i = n, 1, -1 do
if not big_red_switch_mode and pfc_wd_status ~= 'operational' and pfc_wd_action ~= 'alert' and restoration_time and restoration_time ~= '' then
restoration_time = tonumber(restoration_time)
local time_left = redis.call('HGET', counters_table_name .. ':' .. KEYS[i], 'PFC_WD_RESTORATION_TIME_LEFT')
if time_left == nil then
if not time_left then
time_left = restoration_time
else
time_left = tonumber(time_left)
Expand Down

0 comments on commit d57f9a1

Please sign in to comment.