TT#14008 allow null TABLE variable

If there's no config file present then retrieval of the table number
yields an empty string. Allow this as an expected case to silence a
warning from bash (using -lt against an empty string)

Change-Id: I0420d2e1c555f6b56a56fc5f47d3bc183a929e50
mika/coverity
Richard Fuchs 4 years ago committed by Victor Seva
parent 9e2bf2bbda
commit 190a9e9245

@ -39,7 +39,7 @@ fi
firewall_setup()
{
if [ "$TABLE" -lt 0 ] || [ "$VIRT" = "yes" ]; then
if [ -z "$TABLE" ] || [ "$TABLE" -lt 0 ] || [ "$VIRT" = "yes" ]; then
return
fi
@ -66,7 +66,7 @@ firewall_setup()
firewall_teardown()
{
if [ "$TABLE" -lt 0 ] || [ "$VIRT" = "yes" ]; then
if [ -z "$TABLE" ] || [ "$TABLE" -lt 0 ] || [ "$VIRT" = "yes" ]; then
return
fi

@ -39,7 +39,7 @@ fi
firewall_setup()
{
if [ "$TABLE" -lt 0 ] || [ "$VIRT" = "yes" ]; then
if [ -z "$TABLE" ] || [ "$TABLE" -lt 0 ] || [ "$VIRT" = "yes" ]; then
return
fi
@ -66,7 +66,7 @@ firewall_setup()
firewall_teardown()
{
if [ "$TABLE" -lt 0 ] || [ "$VIRT" = "yes" ]; then
if [ -z "$TABLE" ] || [ "$TABLE" -lt 0 ] || [ "$VIRT" = "yes" ]; then
return
fi

Loading…
Cancel
Save