Mercurial > projects > package-update-indicator
changeset 65:72f0eea06b7c
Fix checking for network state changes and string lookup
Thanks to Cliff da Serra <cliffd@gmx.com.br> for spotting this.
author | Guido Berhoerster <guido+pui@berhoerster.name> |
---|---|
date | Fri, 26 Jan 2024 16:17:20 +0100 |
parents | a5ed1047ce14 |
children | fba5c74fa914 |
files | pui-backend.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/pui-backend.c Sun Jan 14 18:53:37 2024 +0100 +++ b/pui-backend.c Fri Jan 26 16:17:20 2024 +0100 @@ -56,7 +56,7 @@ static const gchar * network_state_to_string(NetworkState state) { - g_assert(state > 0 && state < NETWORK_STATE_LAST); + g_assert((state >= 0) && (state < NETWORK_STATE_LAST)); return (network_state_strings[state]); } @@ -602,7 +602,7 @@ NetworkState network_state; network_state = get_network_state(network_monitor); - if (network_state != self->network_state) { + if (network_state == self->network_state) { return; } self->network_state = network_state;