On Tue, Aug 14, 2018 at 12:47 AM Emil Velikov <[email protected]> wrote:
>
> On 13 August 2018 at 16:21, Tomasz Figa <[email protected]> wrote:
> > On Mon, Aug 13, 2018 at 11:48 PM Emil Velikov <[email protected]> 
> > wrote:
> >>
> >> From: Emil Velikov <[email protected]>
> >>
> >> The name string is guaranteed to be NULL terminated. Drop the explicit
> >> length check that comes with strncmp().
> >
> > Is there anything wrong with that length check? I feel like it's a
> > good practice to keep it anyway.
> >
> Consider the a long DRM driver name, that goes over PROPERTY_VALUE_MAX.
> One could replace it with min(PROP.., version::name_len), although it
> does seem over pedantic.
>
> I'm yet to see a single instance that does strncmp for the name.

Fair enough. Sorry for the noise.

Best regards,
Tomasz
_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to