summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Henriksson <andreas@fatal.se>2016-10-12 13:34:09 +0200
committerBastien Nocera <hadess@hadess.net>2016-11-11 17:55:04 +0100
commitbb4b83360bd47d3d00f07945e61b59d347dfb943 (patch)
treed38bb5f3797c23383c1aa560cd2e6e16d031a705
parent898d0aa4e9780078ff3f978a2e439e4a2b85e682 (diff)
downloadgnome-control-center-bb4b83360bd47d3d00f07945e61b59d347dfb943.tar.gz
network: drop unneeded null-check for ip4 address
The pointer has already been dereferenced. Might have made more sense to check if it's the empty string and treat that as error, but nm_utils_ipaddr_valid also returns error on empty string so lets just rely on the utility function doing the right thing here. https://bugzilla.gnome.org/show_bug.cgi?id=708500
-rw-r--r--panels/network/connection-editor/ce-page-ip4.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/panels/network/connection-editor/ce-page-ip4.c b/panels/network/connection-editor/ce-page-ip4.c
index 94500292d..0a7528ebe 100644
--- a/panels/network/connection-editor/ce-page-ip4.c
+++ b/panels/network/connection-editor/ce-page-ip4.c
@@ -750,7 +750,7 @@ ui_to_setting (CEPageIP4 *page)
continue;
}
- if (!text_address || !nm_utils_ipaddr_valid (AF_INET, text_address)) {
+ if (!nm_utils_ipaddr_valid (AF_INET, text_address)) {
widget_set_error (GTK_WIDGET (entry));
ret = FALSE;
} else {