diff mbox series

selinux-testsuite: Correct address count for asconf sctp test

Message ID 20190602104644.9569-1-richard_c_haines@btinternet.com (mailing list archive)
State Accepted
Headers show
Series selinux-testsuite: Correct address count for asconf sctp test | expand

Commit Message

Richard Haines June 2, 2019, 10:46 a.m. UTC
The address count only checks the first two entries, correct to check
others in list until two addresses are found, or not.

Signed-off-by: Richard Haines <richard_c_haines@btinternet.com>
---
 tests/sctp/test | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Paul Moore June 4, 2019, 9:29 p.m. UTC | #1
On Mon, Jun 3, 2019 at 6:13 AM Richard Haines
<richard_c_haines@btinternet.com> wrote:
>
> The address count only checks the first two entries, correct to check
> others in list until two addresses are found, or not.
>
> Signed-off-by: Richard Haines <richard_c_haines@btinternet.com>
> ---
>  tests/sctp/test | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Merged into master, thanks.

> diff --git a/tests/sctp/test b/tests/sctp/test
> index 472bd77..ae1b5e5 100755
> --- a/tests/sctp/test
> +++ b/tests/sctp/test
> @@ -33,8 +33,8 @@ BEGIN {
>          for my $line ( split /\n/, $ipaddress_list ) {
>              if ( $line =~ /inet ([^ \/]+)/ && $count < 2 ) {
>                  $ipaddress[$count] = $1;
> +                $count++;
>              }
> -            $count++;
>          }
>
>          if ( $ipaddress[1] ne 0 ) {
> --
> 2.21.0
>
diff mbox series

Patch

diff --git a/tests/sctp/test b/tests/sctp/test
index 472bd77..ae1b5e5 100755
--- a/tests/sctp/test
+++ b/tests/sctp/test
@@ -33,8 +33,8 @@  BEGIN {
         for my $line ( split /\n/, $ipaddress_list ) {
             if ( $line =~ /inet ([^ \/]+)/ && $count < 2 ) {
                 $ipaddress[$count] = $1;
+                $count++;
             }
-            $count++;
         }
 
         if ( $ipaddress[1] ne 0 ) {