Patchwork uefi: uefidump: fix missing break in switch statement

login
register
mail settings
Submitter Colin King
Date May 6, 2013, 11:49 p.m.
Message ID <1367884163-22784-1-git-send-email-colin.king@canonical.com>
Download mbox | patch
Permalink /patch/241838/
State Accepted
Headers show

Comments

Colin King - May 6, 2013, 11:49 p.m.
From: Colin Ian King <colin.king@canonical.com>

Coverity CID #997290, Missing break in switch

We are missing a break causing and unintentional fall-through to
an Unknown-ACPI-DEV-PATH default.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 src/uefi/uefidump/uefidump.c | 1 +
 1 file changed, 1 insertion(+)
Alex Hung - May 9, 2013, 6:21 a.m.
On 05/07/2013 07:49 AM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Coverity CID #997290, Missing break in switch
>
> We are missing a break causing and unintentional fall-through to
> an Unknown-ACPI-DEV-PATH default.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>   src/uefi/uefidump/uefidump.c | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/src/uefi/uefidump/uefidump.c b/src/uefi/uefidump/uefidump.c
> index b115a62..771f904 100644
> --- a/src/uefi/uefidump/uefidump.c
> +++ b/src/uefi/uefidump/uefidump.c
> @@ -168,6 +168,7 @@ static char *uefidump_build_dev_path(char *path, fwts_uefi_dev_path *dev_path)
>   				else
>   					path = uefidump_vprintf(path, "%s,", hidstr);
>   			}
> +			break;
>   		default:
>   			path = uefidump_vprintf(path, "\\Unknown-ACPI-DEV-PATH(0x%" PRIx8 ")", dev_path->subtype);
>   			break;
>
Acked-by: Alex Hung <alex.hung@canonical.com>
Ivan Hu - May 16, 2013, 2:22 a.m.
On 05/07/2013 07:49 AM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Coverity CID #997290, Missing break in switch
>
> We are missing a break causing and unintentional fall-through to
> an Unknown-ACPI-DEV-PATH default.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>   src/uefi/uefidump/uefidump.c | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/src/uefi/uefidump/uefidump.c b/src/uefi/uefidump/uefidump.c
> index b115a62..771f904 100644
> --- a/src/uefi/uefidump/uefidump.c
> +++ b/src/uefi/uefidump/uefidump.c
> @@ -168,6 +168,7 @@ static char *uefidump_build_dev_path(char *path, fwts_uefi_dev_path *dev_path)
>   				else
>   					path = uefidump_vprintf(path, "%s,", hidstr);
>   			}
> +			break;
>   		default:
>   			path = uefidump_vprintf(path, "\\Unknown-ACPI-DEV-PATH(0x%" PRIx8 ")", dev_path->subtype);
>   			break;
>

Acked-by: Ivan Hu <ivan.hu@canonical.com>

Patch

diff --git a/src/uefi/uefidump/uefidump.c b/src/uefi/uefidump/uefidump.c
index b115a62..771f904 100644
--- a/src/uefi/uefidump/uefidump.c
+++ b/src/uefi/uefidump/uefidump.c
@@ -168,6 +168,7 @@  static char *uefidump_build_dev_path(char *path, fwts_uefi_dev_path *dev_path)
 				else
 					path = uefidump_vprintf(path, "%s,", hidstr);
 			}
+			break;
 		default:
 			path = uefidump_vprintf(path, "\\Unknown-ACPI-DEV-PATH(0x%" PRIx8 ")", dev_path->subtype);
 			break;