summaryrefslogtreecommitdiff
path: root/lib/ovs-lldp.c
diff options
context:
space:
mode:
authorJoe Stringer <joestringer@nicira.com>2015-05-06 14:31:55 -0700
committerJoe Stringer <joestringer@nicira.com>2015-05-07 12:52:38 -0700
commit8cb277fc37a42184a931f83c3dbc7681090ed6c5 (patch)
treed0f8cd1643922c838d0f38371797ee2ba9fdd952 /lib/ovs-lldp.c
parent7521b9e59e7e70773f542e748823cb2236b8c462 (diff)
downloadopenvswitch-8cb277fc37a42184a931f83c3dbc7681090ed6c5.tar.gz
lldp: Fix clang warning.
Clang-3.7 generates warnings such as the following: ../lib/ovs-lldp.c:394:19: error: address of array 'hardware->h_ifname' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] This value is fetched from a netdev, which as far as I can tell must always have a non-NULL name. Simplify this code. Signed-off-by: Joe Stringer <joestringer@nicira.com> Acked-by: Dennis Flynn <drflynn@avaya.com> Acked-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'lib/ovs-lldp.c')
-rw-r--r--lib/ovs-lldp.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/ovs-lldp.c b/lib/ovs-lldp.c
index b2fb14357..54c70c53c 100644
--- a/lib/ovs-lldp.c
+++ b/lib/ovs-lldp.c
@@ -391,9 +391,7 @@ update_mapping_on_lldp(struct lldp *lldp, struct lldpd_hardware *hardware,
{
struct lldpd_aa_isid_vlan_maps_tlv *lm = xzalloc(sizeof *lm);
- if (hardware->h_ifname) {
- VLOG_INFO("\t\t hardware->h_ifname=%s", hardware->h_ifname);
- }
+ VLOG_INFO("\t\t hardware->h_ifname=%s", hardware->h_ifname);
lm->isid_vlan_data.isid = m->isid;
lm->isid_vlan_data.vlan = m->vlan;
@@ -622,10 +620,7 @@ aa_mapping_unregister(void *aux)
/* Remove from all the lldp instances */
LIST_FOR_EACH (hw, h_entries, &lldp->lldpd->g_hardware) {
- if (hw->h_ifname) {
- VLOG_INFO("\t\t hardware->h_ifname=%s", hw->h_ifname);
- }
-
+ VLOG_INFO("\t\t hardware->h_ifname=%s", hw->h_ifname);
aa_mapping_unregister_mapping(lldp, hw, m);
}
free(m);