depmod: load_system_map() minor optimization.
authorLuiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Sat, 23 Dec 2006 14:04:50 +0000 (12:04 -0200)
committerLuiz Fernando N. Capitulino <lcapitulino@doriath.conectiva>
Thu, 1 Feb 2007 12:14:09 +0000 (10:14 -0200)
commit057f2d825dc873527d553e73e1fa4a579b9433bb
treef55e9a74998d39c726fa5771af0ce713f584c800
parent6c7e2fb62b120f55d8bee65ba673aeeeb023c1a0
depmod: load_system_map() minor optimization.

The load_system_map() function calls strlen() to get the length of the
"__ksymtab_" string twice as follows:

 * For each line of the System.map file
 * For each symbol which starts with "__ksymtab_"

It's smarter to call it once, before the loop is entered. That's what
this patch does.

Addittionally a string duplication is also fixed.

Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
depmod.c