Re: [v4l-utils PATCH 1/2] libmediactl: Drop length argument from media_get_entity_by_name()

2016-05-26 Thread Sakari Ailus
On Thu, May 26, 2016 at 03:07:41PM +0300, Laurent Pinchart wrote: > Hi Sakari, > > On Tuesday 24 May 2016 23:50:44 Sakari Ailus wrote: > > On Tue, May 24, 2016 at 08:09:37PM +0300, Laurent Pinchart wrote: > > ... > > > > > > + if (strcmp(entity->info.name, name) == 0) > > > > > >

Re: [v4l-utils PATCH 1/2] libmediactl: Drop length argument from media_get_entity_by_name()

2016-05-26 Thread Laurent Pinchart
Hi Sakari, On Tuesday 24 May 2016 23:50:44 Sakari Ailus wrote: > On Tue, May 24, 2016 at 08:09:37PM +0300, Laurent Pinchart wrote: > ... > > > > + if (strcmp(entity->info.name, name) == 0) > > > > While the kernel API guarantees that entity->info.name will be NULL- > > terminated,

Re: [v4l-utils PATCH 1/2] libmediactl: Drop length argument from media_get_entity_by_name()

2016-05-24 Thread Sakari Ailus
Hi Laurent, Thanks for the review! On Tue, May 24, 2016 at 08:09:37PM +0300, Laurent Pinchart wrote: ... > > + if (strcmp(entity->info.name, name) == 0) > > While the kernel API guarantees that entity->info.name will be NULL- > terminated, wouldn't it be safer to add a safety check

Re: [v4l-utils PATCH 1/2] libmediactl: Drop length argument from media_get_entity_by_name()

2016-05-24 Thread Laurent Pinchart
Hi Sakari, Thank you for the patch. On Tuesday 24 May 2016 15:48:02 Sakari Ailus wrote: > Recently it was decided that the API dealing with string operations would > be better to just receive a nul-terminated string rather than a string the > length of which is defined. This change was

[v4l-utils PATCH 1/2] libmediactl: Drop length argument from media_get_entity_by_name()

2016-05-24 Thread Sakari Ailus
Recently it was decided that the API dealing with string operations would be better to just receive a nul-terminated string rather than a string the length of which is defined. This change was implemented for v4l2_subdev_string_to_pixelcode() and v4l2_subdev_string_to_field() functions by patch