diff mbox series

[FFmpeg-devel] avcodec/dfa: Use array of fixed-sized strings for fixed-sized strings

Message ID 20200318140607.22256-1-andreas.rheinhardt@gmail.com
State Accepted
Headers show
Series [FFmpeg-devel] avcodec/dfa: Use array of fixed-sized strings for fixed-sized strings | expand

Checks

Context Check Description
andriy/ffmpeg-patchwork success Make fate finished

Commit Message

Andreas Rheinhardt March 18, 2020, 2:06 p.m. UTC
Surprisingly neither GCC nor Clang did this transformation on their own.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
---
 libavcodec/dfa.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Paul B Mahol March 18, 2020, 4:01 p.m. UTC | #1
LGTM

On 3/18/20, Andreas Rheinhardt <andreas.rheinhardt@gmail.com> wrote:
> Surprisingly neither GCC nor Clang did this transformation on their own.
>
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
> ---
>  libavcodec/dfa.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavcodec/dfa.c b/libavcodec/dfa.c
> index c6106b9397..31c6c39089 100644
> --- a/libavcodec/dfa.c
> +++ b/libavcodec/dfa.c
> @@ -332,7 +332,7 @@ static const chunk_decoder decoder[8] = {
>      decode_tdlt, decode_dsw1, decode_blck, decode_dds1,
>  };
>
> -static const char * const chunk_name[8] = {
> +static const char chunk_name[8][5] = {
>      "COPY", "TSW1", "BDLT", "WDLT", "TDLT", "DSW1", "BLCK", "DDS1"
>  };
>
> --
> 2.20.1
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
Andreas Rheinhardt March 24, 2020, 9:13 p.m. UTC | #2
Paul B Mahol:
> LGTM
> 
> On 3/18/20, Andreas Rheinhardt <andreas.rheinhardt@gmail.com> wrote:
>> Surprisingly neither GCC nor Clang did this transformation on their own.
>>
>> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
>> ---
>>  libavcodec/dfa.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/libavcodec/dfa.c b/libavcodec/dfa.c
>> index c6106b9397..31c6c39089 100644
>> --- a/libavcodec/dfa.c
>> +++ b/libavcodec/dfa.c
>> @@ -332,7 +332,7 @@ static const chunk_decoder decoder[8] = {
>>      decode_tdlt, decode_dsw1, decode_blck, decode_dds1,
>>  };
>>
>> -static const char * const chunk_name[8] = {
>> +static const char chunk_name[8][5] = {
>>      "COPY", "TSW1", "BDLT", "WDLT", "TDLT", "DSW1", "BLCK", "DDS1"
>>  };
>>
>> --
>> 2.20.1
>>
Applied, thanks.

- Andreas
diff mbox series

Patch

diff --git a/libavcodec/dfa.c b/libavcodec/dfa.c
index c6106b9397..31c6c39089 100644
--- a/libavcodec/dfa.c
+++ b/libavcodec/dfa.c
@@ -332,7 +332,7 @@  static const chunk_decoder decoder[8] = {
     decode_tdlt, decode_dsw1, decode_blck, decode_dds1,
 };
 
-static const char * const chunk_name[8] = {
+static const char chunk_name[8][5] = {
     "COPY", "TSW1", "BDLT", "WDLT", "TDLT", "DSW1", "BLCK", "DDS1"
 };