From: Lucas De Marchi Date: Tue, 20 Dec 2011 05:12:35 +0000 (-0200) Subject: Remove unneeded reference to last string X-Git-Tag: v2~25 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b20dc17;p=thirdparty%2Fkmod.git Remove unneeded reference to last string --- diff --git a/libkmod/libkmod-elf.c b/libkmod/libkmod-elf.c index a341a5ee..2e8ab129 100644 --- a/libkmod/libkmod-elf.c +++ b/libkmod/libkmod-elf.c @@ -420,18 +420,11 @@ int kmod_elf_get_strings(const struct kmod_elf *elf, const char *section, char * if (size <= 1) return 0; - last = 0; for (i = 0, count = 0; i < size; i++) { if (strings[i] != '\0') continue; - if (last == i) { - last = i + 1; - continue; - } - count++; - last = i + 1; } if (strings[i - 1] != '\0')