From: Gustavo Sverzut Barbieri Date: Thu, 8 Dec 2011 18:36:48 +0000 (-0200) Subject: remove useless look checking for duplicates X-Git-Tag: v1~57 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=558b0207042f72fc86549a0f411874729a886645;p=thirdparty%2Fkmod.git remove useless look checking for duplicates --- diff --git a/libkmod/libkmod-index.c b/libkmod/libkmod-index.c index fddcf510..bfabd10d 100644 --- a/libkmod/libkmod-index.c +++ b/libkmod/libkmod-index.c @@ -46,13 +46,6 @@ static int add_value(struct index_value **values, const char *value, unsigned len, unsigned int priority) { struct index_value *v; - int duplicate = 0; - - /* report the presence of duplicate values */ - for (v = *values; v; v = v->next) { - if (streq(v->value, value)) - duplicate = 1; - } /* find position to insert value */ while (*values && (*values)->priority < priority) @@ -68,7 +61,7 @@ static int add_value(struct index_value **values, v->value[len] = '\0'; *values = v; - return duplicate; + return 0; } static void read_error(void)