From: Lucas De Marchi Date: Tue, 20 Dec 2011 05:08:09 +0000 (-0200) Subject: Reduce ident by continuing early X-Git-Tag: v2~28 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4f0f0e75e2fefc2eb26da81f7a4fadf5d624875f;p=thirdparty%2Fkmod.git Reduce ident by continuing early --- diff --git a/libkmod/libkmod-elf.c b/libkmod/libkmod-elf.c index 0d84d9ff..44381203 100644 --- a/libkmod/libkmod-elf.c +++ b/libkmod/libkmod-elf.c @@ -420,14 +420,15 @@ int kmod_elf_get_strings(const struct kmod_elf *elf, const char *section, char * last = 0; for (i = 0, count = 0; i < size; i++) { - if (strings[i] == '\0') { - if (last == i) { - last = i + 1; - continue; - } - count++; + if (strings[i] != '\0') + continue; + + if (last == i) { last = i + 1; + continue; } + count++; + last = i + 1; } if (strings[i - 1] != '\0') count++;