[alsa-devel] [PATCH] ALSA: Warn when control names are truncated

Mark Brown broonie at opensource.wolfsonmicro.com
Wed Oct 29 15:55:49 CET 2008

On Wed, Oct 29, 2008 at 03:51:40PM +0100, Jaroslav Kysela wrote:

> Maybe better is to just use end char comparsion to save few CPU ticks:

> if (kctl.id.name[sizeof(kctl.id.name)-2] != '\0' &&
>     ncontrol->name[sizeof(kctl.id.name)-1] != '\0')
> 	print_warning_here;

It will be but given that this only happens when controls are created
I'd be surprised if performance were a practical issue.

More information about the Alsa-devel mailing list