[PATCH 05/20] libchip/serial/z85c30.c: Remove redundant assignment

Gedare Bloom gedare at rtems.org
Wed Nov 26 15:11:39 UTC 2014


In the future, please add more in the comment to explain for example
that the same variable initialization happens earlier. I had to go
look at the code to see why it was OK to delete this line.
-Gedare

On Tue, Nov 25, 2014 at 6:02 PM, Joel Sherrill
<joel.sherrill at oarcorp.com> wrote:
> From: Josh Oguin <josh.oguin at oarcorp.com>
>
> This was flagged by CodeSonar.
> ---
>  c/src/libchip/serial/z85c30.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/c/src/libchip/serial/z85c30.c b/c/src/libchip/serial/z85c30.c
> index 1f43271..7c55a51 100644
> --- a/c/src/libchip/serial/z85c30.c
> +++ b/c/src/libchip/serial/z85c30.c
> @@ -269,7 +269,6 @@ Z85C30_STATIC void z85c30_init(int minor)
>
>    pz85c30Context->ucModemCtrl = SCC_WR5_TX_8_BITS | SCC_WR5_TX_EN;
>
> -  ulCtrlPort = Console_Port_Tbl[minor]->ulCtrlPort1;
>    if ( ulCtrlPort == Console_Port_Tbl[minor]->ulCtrlPort2 ) {
>      /*
>       * This is channel A
> --
> 1.9.3
>
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel



More information about the devel mailing list