Re: [PATCH 1/2] edid-decode: add function to enable usage as a library

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

 



On Mon, Feb 10, 2020 at 9:58 AM Ilia Mirkin <imirkin@xxxxxxxxxxxx> wrote:
> On Mon, Feb 10, 2020 at 6:23 AM Hans Verkuil <hverkuil-cisco@xxxxxxxxx> wrote:
> > > +     for (unsigned i = 0; i < EDID_MAX_BLOCKS + 1; i++) {
> > > +             s_msgs[i][0].clear();
> > > +             s_msgs[i][1].clear();
> > > +     }
> >
> > I'm pretty sure that this for loop is not necessary. Can you drop this
> > for loop and see if it works?
>
> The current code has:
>
> static void show_msgs(bool is_warn)
> {
>   printf("\n%s:\n\n", is_warn ? "Warnings" : "Failures");
>   for (unsigned i = 0; i < state.num_blocks; i++) {
>     if (s_msgs[i][is_warn].empty())
>       continue;
>     print-the-error
>
> What would prevent an error from a previous run to appear without an
> explicit clearing of s_msgs?

Hi Hans,

Do you agree with my assessment above?

  -ilia



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux