From f456aa9cc1f2198911d9f7c2d36187b820f77002 Mon Sep 17 00:00:00 2001 From: Sihui Han Date: Tue, 1 May 2018 22:27:53 +0000 Subject: [PATCH] [lua]: use not to check whether the field exists Signed-off-by: Sihui Han --- orchagent/pfc_restore.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/orchagent/pfc_restore.lua b/orchagent/pfc_restore.lua index ae0af506d5..5b3e4ed046 100644 --- a/orchagent/pfc_restore.lua +++ b/orchagent/pfc_restore.lua @@ -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)