Browse Source

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
commit
190a9e9245
2 changed files with 4 additions and 4 deletions
  1. +2
    -2
      debian/ngcp-rtpengine-iptables-setup
  2. +2
    -2
      pkg/deb/debian/rtpengine-iptables-setup

+ 2
- 2
debian/ngcp-rtpengine-iptables-setup View File

@ -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


+ 2
- 2
pkg/deb/debian/rtpengine-iptables-setup View File

@ -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