public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] A minor question on a Driver Model function
@ 2014-09-12 11:25 Masahiro Yamada
  2014-09-14 18:28 ` Simon Glass
  0 siblings, 1 reply; 11+ messages in thread
From: Masahiro Yamada @ 2014-09-12 11:25 UTC (permalink / raw)
  To: u-boot

Hi Simon,


I have a qustion about lists_driver_lookup_name() function.



	for (entry = drv; entry != drv + n_ents; entry++) {
		if (strncmp(name, entry->name, len))
			continue;

		/* Full match */
		if (len == strlen(entry->name))
			return entry;
	}




Why is this not like follows?




	for (entry = drv; entry != drv + n_ents; entry++) {
		if (!strcmp(name, entry->name))
			return entry;
	}



It seems equivalent to the former and simpler.

Am I missing something?



Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2014-09-19 13:41 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-12 11:25 [U-Boot] A minor question on a Driver Model function Masahiro Yamada
2014-09-14 18:28 ` Simon Glass
2014-09-15  8:04   ` Igor Grinberg
2014-09-17  8:18     ` Masahiro Yamada
2014-09-17 13:41       ` Igor Grinberg
2014-09-17 15:25         ` Bill Pringlemeir
2014-09-18 12:38           ` Igor Grinberg
2014-09-18 15:46             ` Bill Pringlemeir
2014-09-19  6:34               ` Igor Grinberg
2014-09-19  6:54                 ` Masahiro Yamada
2014-09-19 13:41                   ` Igor Grinberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox