diff options
author | Gustavo Sverzut Barbieri <barbieri@profusion.mobi> | 2011-12-08 16:36:48 -0200 |
---|---|---|
committer | Gustavo Sverzut Barbieri <barbieri@profusion.mobi> | 2011-12-08 16:36:48 -0200 |
commit | 558b0207042f72fc86549a0f411874729a886645 (patch) | |
tree | 16750e2c4194879a880fce01c35f9e8c5ffb67a2 | |
parent | 1433ba9ef544d8aa5803ba96adefd5eb18c9b9f2 (diff) | |
download | kmod-558b0207042f72fc86549a0f411874729a886645.tar.gz kmod-558b0207042f72fc86549a0f411874729a886645.tar.bz2 kmod-558b0207042f72fc86549a0f411874729a886645.zip |
remove useless look checking for duplicates
-rw-r--r-- | libkmod/libkmod-index.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/libkmod/libkmod-index.c b/libkmod/libkmod-index.c index fddcf51..bfabd10 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) |