diff mbox

[edk2,34/47] NetworkPkg/TcpDxe: rebase to ARRAY_SIZE()

Message ID 20161026190504.9888-35-lersek@redhat.com
State Accepted
Commit e72b40978442032cbeab7c04acb79bfa6292f597
Headers show

Commit Message

Laszlo Ersek Oct. 26, 2016, 7:04 p.m. UTC
Cc: Siyuan Fu <siyuan.fu@intel.com>
Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>

---
 NetworkPkg/TcpDxe/TcpOutput.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.9.2


_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Comments

Fu, Siyuan Oct. 27, 2016, 2 a.m. UTC | #1
Reviewed-by: Fu Siyuan siyuan.fu@intel.com





> -----Original Message-----

> From: Laszlo Ersek [mailto:lersek@redhat.com]

> Sent: Thursday, October 27, 2016 3:05 AM

> To: edk2-devel-01 <edk2-devel@ml01.01.org>

> Cc: Fu, Siyuan <siyuan.fu@intel.com>; Wu, Jiaxin <jiaxin.wu@intel.com>

> Subject: [PATCH 34/47] NetworkPkg/TcpDxe: rebase to ARRAY_SIZE()

> 

> Cc: Siyuan Fu <siyuan.fu@intel.com>

> Cc: Jiaxin Wu <jiaxin.wu@intel.com>

> Contributed-under: TianoCore Contribution Agreement 1.0

> Signed-off-by: Laszlo Ersek <lersek@redhat.com>

> ---

>  NetworkPkg/TcpDxe/TcpOutput.c | 2 +-

>  1 file changed, 1 insertion(+), 1 deletion(-)

> 

> diff --git a/NetworkPkg/TcpDxe/TcpOutput.c b/NetworkPkg/TcpDxe/TcpOutput.c

> index 91e56d369a71..a46cb6099ea8 100644

> --- a/NetworkPkg/TcpDxe/TcpOutput.c

> +++ b/NetworkPkg/TcpDxe/TcpOutput.c

> @@ -797,7 +797,7 @@ TcpToSendData (

>      Len   = TcpDataToSend (Tcb, Force);

>      Seq   = Tcb->SndNxt;

> 

> -    ASSERT ((Tcb->State) < (sizeof (mTcpOutFlag) / sizeof

> (mTcpOutFlag[0])));

> +    ASSERT ((Tcb->State) < (ARRAY_SIZE (mTcpOutFlag)));

>      Flag  = mTcpOutFlag[Tcb->State];

> 

>      if ((Flag & TCP_FLG_SYN) != 0) {

> --

> 2.9.2

> 


_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Wu, Jiaxin Oct. 27, 2016, 2:31 a.m. UTC | #2
Reviewed-By: Wu Jiaxin <jiaxin.wu@intel.com>



Best Regards!
Jiaxin

> -----Original Message-----

> From: Laszlo Ersek [mailto:lersek@redhat.com]

> Sent: Thursday, October 27, 2016 3:05 AM

> To: edk2-devel-01 <edk2-devel@ml01.01.org>

> Cc: Fu, Siyuan <siyuan.fu@intel.com>; Wu, Jiaxin <jiaxin.wu@intel.com>

> Subject: [PATCH 34/47] NetworkPkg/TcpDxe: rebase to ARRAY_SIZE()

> 

> Cc: Siyuan Fu <siyuan.fu@intel.com>

> Cc: Jiaxin Wu <jiaxin.wu@intel.com>

> Contributed-under: TianoCore Contribution Agreement 1.0

> Signed-off-by: Laszlo Ersek <lersek@redhat.com>

> ---

>  NetworkPkg/TcpDxe/TcpOutput.c | 2 +-

>  1 file changed, 1 insertion(+), 1 deletion(-)

> 

> diff --git a/NetworkPkg/TcpDxe/TcpOutput.c

> b/NetworkPkg/TcpDxe/TcpOutput.c index 91e56d369a71..a46cb6099ea8

> 100644

> --- a/NetworkPkg/TcpDxe/TcpOutput.c

> +++ b/NetworkPkg/TcpDxe/TcpOutput.c

> @@ -797,7 +797,7 @@ TcpToSendData (

>      Len   = TcpDataToSend (Tcb, Force);

>      Seq   = Tcb->SndNxt;

> 

> -    ASSERT ((Tcb->State) < (sizeof (mTcpOutFlag) / sizeof (mTcpOutFlag[0])));

> +    ASSERT ((Tcb->State) < (ARRAY_SIZE (mTcpOutFlag)));

>      Flag  = mTcpOutFlag[Tcb->State];

> 

>      if ((Flag & TCP_FLG_SYN) != 0) {

> --

> 2.9.2

> 


_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
diff mbox

Patch

diff --git a/NetworkPkg/TcpDxe/TcpOutput.c b/NetworkPkg/TcpDxe/TcpOutput.c
index 91e56d369a71..a46cb6099ea8 100644
--- a/NetworkPkg/TcpDxe/TcpOutput.c
+++ b/NetworkPkg/TcpDxe/TcpOutput.c
@@ -797,7 +797,7 @@  TcpToSendData (
     Len   = TcpDataToSend (Tcb, Force);
     Seq   = Tcb->SndNxt;
 
-    ASSERT ((Tcb->State) < (sizeof (mTcpOutFlag) / sizeof (mTcpOutFlag[0])));
+    ASSERT ((Tcb->State) < (ARRAY_SIZE (mTcpOutFlag)));
     Flag  = mTcpOutFlag[Tcb->State];
 
     if ((Flag & TCP_FLG_SYN) != 0) {