X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=src%2Fodhcp6c.c;h=100ed61b0cf40809de09c22a7f1144d2c52feb72;hb=60c9e4d5a26f530e89ed6254e8c09380b50fac08;hp=20639352fde8979b00bc5aadfda2db14ce4e4028;hpb=d77cbea57d1b7dd9c25421bb13c90e65bb54a6bc;p=odhcp6c.git diff --git a/src/odhcp6c.c b/src/odhcp6c.c index 2063935..100ed61 100644 --- a/src/odhcp6c.c +++ b/src/odhcp6c.c @@ -89,7 +89,6 @@ int main(_unused int argc, char* const argv[]) if (request_pd == 0) request_pd = -1; - ia_pd_mode = IA_MODE_TRY; break; case 'F': @@ -466,7 +465,6 @@ bool odhcp6c_update_entry_safe(enum odhcp6c_state state, struct odhcp6c_entry *n size_t len; struct odhcp6c_entry *x = odhcp6c_find_entry(state, new); struct odhcp6c_entry *start = odhcp6c_get_state(state, &len); - bool changed = true; if (x && x->valid > new->valid && new->valid < safe) new->valid = safe; @@ -477,7 +475,7 @@ bool odhcp6c_update_entry_safe(enum odhcp6c_state state, struct odhcp6c_entry *n new->preferred >= x->preferred && new->preferred - x->preferred < 60 && x->class == new->class) - changed = false; + return false; x->valid = new->valid; x->preferred = new->preferred; x->t1 = new->t1; @@ -489,7 +487,7 @@ bool odhcp6c_update_entry_safe(enum odhcp6c_state state, struct odhcp6c_entry *n } else if (x) { odhcp6c_remove_state(state, (x - start) * sizeof(*x), sizeof(*x)); } - return changed; + return true; }