Re: [PATCH][cifs-utils] getcifsacl: remove some dead code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



That looks correct.

Acked-by: Shirish Pargaonkar <shirishpargaonkar@xxxxxxxxx>

On Wed, Oct 9, 2013 at 8:14 AM, Jeff Layton <jlayton@xxxxxxxxx> wrote:
> Coverity says:
>
> Error: DEADCODE (CWE-561): [#def5]
> cifs-utils-6.2/getcifsacl.c:101: assignment: Assigning: "mflags" = "false".
> cifs-utils-6.2/getcifsacl.c:109: const: At condition "mflags", the value of "mflags" must be equal to 0.
> cifs-utils-6.2/getcifsacl.c:109: dead_error_condition: The condition "mflags" cannot be true.
> cifs-utils-6.2/getcifsacl.c:110: dead_error_line: Execution cannot reach this statement "printf("|");".
>
> Signed-off-by: Jeff Layton <jlayton@xxxxxxxxx>
> ---
>  getcifsacl.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/getcifsacl.c b/getcifsacl.c
> index b8998ef..8a7f8ba 100644
> --- a/getcifsacl.c
> +++ b/getcifsacl.c
> @@ -106,10 +106,7 @@ print_ace_flags(uint8_t flags, int raw)
>         }
>
>         if (flags & OBJECT_INHERIT_FLAG) {
> -               if (mflags)
> -                       printf("|");
> -               else
> -                       mflags = true;
> +               mflags = true;
>                 printf("OI");
>         }
>         if (flags & CONTAINER_INHERIT_FLAG) {
> --
> 1.8.3.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux