diff mbox series

[v2,05/29] edid-decode: Capitalize fail sentence

Message ID 20210926083330.5206-6-joevt@shaw.ca (mailing list archive)
State New, archived
Headers show
Series edid-decode: bug fixes, additions, changes | expand

Commit Message

joevt Sept. 26, 2021, 8:33 a.m. UTC
- Most fail messages are a sentence that starts with a capital letter and ends with a period.
- Remove unnessary break from last switch case.
- Remove extra line.

Signed-off-by: Joe van Tunen <joevt@shaw.ca>
---
 parse-cta-block.cpp | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Hans Verkuil Sept. 27, 2021, 7:55 a.m. UTC | #1
On 26/09/2021 10:33, joevt wrote:
> - Most fail messages are a sentence that starts with a capital letter and ends with a period.
> - Remove unnessary break from last switch case.

I dropped this change. It is good coding practice to always include a break for the last switch case.
If someone adds a new case later, then this avoids an accidental fall-through scenario.

No need to repost, I'll take care of this.

Regards,

	Hans

> - Remove extra line.
> 
> Signed-off-by: Joe van Tunen <joevt@shaw.ca>
> ---
>  parse-cta-block.cpp | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/parse-cta-block.cpp b/parse-cta-block.cpp
> index 6607426..042b933 100644
> --- a/parse-cta-block.cpp
> +++ b/parse-cta-block.cpp
> @@ -2091,13 +2091,11 @@ void edid_state::cta_ext_block(const unsigned char *x, unsigned length,
>  	case 0x79:
>  		if (duplicate)
>  			fail("Only one instance of this Data Block is allowed.\n");
> -		break;
>  	}
>  
> -
>  	// See Table 52 of CTA-861-G for a description of Byte 3
>  	if (audio_block && !(cta.byte3 & 0x40))
> -		fail("audio information is present, but bit 6 of Byte 3 of the CTA-861 Extension header indicates no Basic Audio support.\n");
> +		fail("Audio information is present, but bit 6 of Byte 3 of the CTA-861 Extension header indicates no Basic Audio support.\n");
>  
>  	if (data_block.length())
>  		printf("  %s:\n", data_block.c_str());
>
diff mbox series

Patch

diff --git a/parse-cta-block.cpp b/parse-cta-block.cpp
index 6607426..042b933 100644
--- a/parse-cta-block.cpp
+++ b/parse-cta-block.cpp
@@ -2091,13 +2091,11 @@  void edid_state::cta_ext_block(const unsigned char *x, unsigned length,
 	case 0x79:
 		if (duplicate)
 			fail("Only one instance of this Data Block is allowed.\n");
-		break;
 	}
 
-
 	// See Table 52 of CTA-861-G for a description of Byte 3
 	if (audio_block && !(cta.byte3 & 0x40))
-		fail("audio information is present, but bit 6 of Byte 3 of the CTA-861 Extension header indicates no Basic Audio support.\n");
+		fail("Audio information is present, but bit 6 of Byte 3 of the CTA-861 Extension header indicates no Basic Audio support.\n");
 
 	if (data_block.length())
 		printf("  %s:\n", data_block.c_str());