[gnome-control-center] network: drop unneeded null-check for ip4 address
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] network: drop unneeded null-check for ip4 address
- Date: Fri, 11 Nov 2016 16:56:34 +0000 (UTC)
commit bb4b83360bd47d3d00f07945e61b59d347dfb943
Author: Andreas Henriksson <andreas fatal se>
Date: Wed Oct 12 13:34:09 2016 +0200
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
panels/network/connection-editor/ce-page-ip4.c | 2 +-
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 9450029..0a7528e 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 {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]