diff options
| author | Quentin Young <qlyoung@cumulusnetworks.com> | 2018-09-13 19:38:57 +0000 | 
|---|---|---|
| committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2018-09-13 19:38:57 +0000 | 
| commit | 1c50c1c0d683ebfa53c1607c71b8d26547e8f218 (patch) | |
| tree | 0dbb03af253cdcb0abeacaf6a860a4c7600359c5 /ospfd | |
| parent | 450971aa994e68f7c62c4d45065223d5cfc4a22f (diff) | |
*: style for EC replacements
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'ospfd')
| -rw-r--r-- | ospfd/ospf_main.c | 2 | ||||
| -rw-r--r-- | ospfd/ospf_network.c | 3 | ||||
| -rw-r--r-- | ospfd/ospf_packet.c | 26 | ||||
| -rw-r--r-- | ospfd/ospf_sr.c | 29 | 
4 files changed, 28 insertions, 32 deletions
diff --git a/ospfd/ospf_main.c b/ospfd/ospf_main.c index 6095b13c97..9fb0e0ad13 100644 --- a/ospfd/ospf_main.c +++ b/ospfd/ospf_main.c @@ -217,7 +217,7 @@ int main(int argc, char **argv)  	   when quagga(ospfd) is restarted */  	if (!ospf_get_instance(instance)) {  		flog_err(EC_OSPF_INIT_FAIL, "OSPF instance init failed: %s", -			  strerror(errno)); +			 strerror(errno));  		exit(1);  	} diff --git a/ospfd/ospf_network.c b/ospfd/ospf_network.c index d59c482e5e..e30bb0ffe1 100644 --- a/ospfd/ospf_network.c +++ b/ospfd/ospf_network.c @@ -225,8 +225,7 @@ int ospf_sock_init(struct ospf *ospf)  		}  #else /* !IPTOS_PREC_INTERNETCONTROL */  #warning "IP_HDRINCL not available, nor is IPTOS_PREC_INTERNETCONTROL" -		flog_err(EC_LIB_UNAVAILABLE, -			 "IP_HDRINCL option not available"); +		flog_err(EC_LIB_UNAVAILABLE, "IP_HDRINCL option not available");  #endif /* IP_HDRINCL */  		ret = setsockopt_ifindex(AF_INET, ospf_sock, 1); diff --git a/ospfd/ospf_packet.c b/ospfd/ospf_packet.c index 672e713264..c4c4d2f030 100644 --- a/ospfd/ospf_packet.c +++ b/ospfd/ospf_packet.c @@ -342,9 +342,8 @@ static int ospf_check_md5_digest(struct ospf_interface *oi,  	ck = ospf_crypt_key_lookup(OSPF_IF_PARAM(oi, auth_crypt),  				   ospfh->u.crypt.key_id);  	if (ck == NULL) { -		flog_warn(EC_OSPF_MD5, -			  "interface %s: ospf_check_md5 no key %d", IF_NAME(oi), -			  ospfh->u.crypt.key_id); +		flog_warn(EC_OSPF_MD5, "interface %s: ospf_check_md5 no key %d", +			  IF_NAME(oi), ospfh->u.crypt.key_id);  		return 0;  	} @@ -1336,8 +1335,7 @@ static void ospf_db_desc(struct ip *iph, struct ospf_header *ospfh,  		 * In Hello protocol, optional capability must have checked  		 * to prevent this T-bit enabled router be my neighbor.  		 */ -		flog_warn(EC_OSPF_PACKET, -			  "Packet[DD]: Neighbor %s: T-bit on?", +		flog_warn(EC_OSPF_PACKET, "Packet[DD]: Neighbor %s: T-bit on?",  			  inet_ntoa(nbr->router_id));  		return;  	} @@ -1949,15 +1947,15 @@ static void ospf_ls_upd(struct ospf *ospf, struct ip *iph,  				char buf3[INET_ADDRSTRLEN];  				flog_err(EC_OSPF_ROUTER_LSA_MISMATCH, -					  "Incoming Router-LSA from %s with " -					  "Adv-ID[%s] != LS-ID[%s]", -					  inet_ntop(AF_INET, &ospfh->router_id, -						    buf1, INET_ADDRSTRLEN), -					  inet_ntop(AF_INET, &lsa->data->id, -						    buf2, INET_ADDRSTRLEN), -					  inet_ntop(AF_INET, -						    &lsa->data->adv_router, -						    buf3, INET_ADDRSTRLEN)); +					 "Incoming Router-LSA from %s with " +					 "Adv-ID[%s] != LS-ID[%s]", +					 inet_ntop(AF_INET, &ospfh->router_id, +						   buf1, INET_ADDRSTRLEN), +					 inet_ntop(AF_INET, &lsa->data->id, +						   buf2, INET_ADDRSTRLEN), +					 inet_ntop(AF_INET, +						   &lsa->data->adv_router, buf3, +						   INET_ADDRSTRLEN));  				flog_err(  					EC_OSPF_DOMAIN_CORRUPT,  					"OSPF domain compromised by attack or corruption. " diff --git a/ospfd/ospf_sr.c b/ospfd/ospf_sr.c index 8a6c6570ee..33ec09b9f3 100644 --- a/ospfd/ospf_sr.c +++ b/ospfd/ospf_sr.c @@ -1114,17 +1114,17 @@ void ospf_sr_ri_lsa_update(struct ospf_lsa *lsa)  	/* Sanity check */  	if (srn == NULL) {  		flog_err(EC_OSPF_SR_NODE_CREATE, -			  "SR (%s): Abort! can't create SR node in hash table", -			  __func__); +			 "SR (%s): Abort! can't create SR node in hash table", +			 __func__);  		return;  	}  	if ((srn->instance != 0) && (srn->instance != ntohl(lsah->id.s_addr))) {  		flog_err(EC_OSPF_SR_INVALID_LSA_ID, -			  "SR (%s): Abort! Wrong " -			  "LSA ID 4.0.0.%u for SR node %s/%u", -			  __func__, GET_OPAQUE_ID(ntohl(lsah->id.s_addr)), -			  inet_ntoa(lsah->adv_router), srn->instance); +			 "SR (%s): Abort! Wrong " +			 "LSA ID 4.0.0.%u for SR node %s/%u", +			 __func__, GET_OPAQUE_ID(ntohl(lsah->id.s_addr)), +			 inet_ntoa(lsah->adv_router), srn->instance);  		return;  	} @@ -1225,17 +1225,16 @@ void ospf_sr_ri_lsa_delete(struct ospf_lsa *lsa)  	/* Sanity check */  	if (srn == NULL) {  		flog_err(EC_OSPF_SR_NODE_CREATE, -			  "SR (%s): Abort! no entry in SRDB for SR Node %s", -			  __func__, inet_ntoa(lsah->adv_router)); +			 "SR (%s): Abort! no entry in SRDB for SR Node %s", +			 __func__, inet_ntoa(lsah->adv_router));  		return;  	}  	if ((srn->instance != 0) && (srn->instance != ntohl(lsah->id.s_addr))) { -		flog_err( -			EC_OSPF_SR_INVALID_LSA_ID, -			"SR (%s): Abort! Wrong LSA ID 4.0.0.%u for SR node %s", -			__func__, GET_OPAQUE_ID(ntohl(lsah->id.s_addr)), -			inet_ntoa(lsah->adv_router)); +		flog_err(EC_OSPF_SR_INVALID_LSA_ID, +			 "SR (%s): Abort! Wrong LSA ID 4.0.0.%u for SR node %s", +			 __func__, GET_OPAQUE_ID(ntohl(lsah->id.s_addr)), +			 inet_ntoa(lsah->adv_router));  		return;  	} @@ -1274,8 +1273,8 @@ void ospf_sr_ext_link_lsa_update(struct ospf_lsa *lsa)  	/* Sanity check */  	if (srn == NULL) {  		flog_err(EC_OSPF_SR_NODE_CREATE, -			  "SR (%s): Abort! can't create SR node in hash table", -			  __func__); +			 "SR (%s): Abort! can't create SR node in hash table", +			 __func__);  		return;  	}  | 
