# | Line 114 | Line 114 | whowas_make(void) | |
---|---|---|
114 | void | |
115 | whowas_trim(void) | |
116 | { | |
117 | < | while (dlink_list_length(&whowas_list) >= ConfigGeneral.whowas_history_length) |
118 | < | { |
119 | < | if (!whowas_list.tail) |
120 | < | return; /* whowas_list is now empty. No more items can be freed. */ |
121 | < | |
117 | > | while (dlink_list_length(&whowas_list) && |
118 | > | dlink_list_length(&whowas_list) >= ConfigGeneral.whowas_history_length) |
119 | whowas_free(whowas_list.tail->data); | |
123 | – | } |
120 | } | |
121 | ||
122 | /*! \brief Adds the currently defined name of the client to history. |
– | Removed lines |
+ | Added lines |
< | Changed lines (old) |
> | Changed lines (new) |