Unverified Commit 59a5f7e9 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!11003 tipc: Return non-zero value from tipc_udp_addr2str() on error

parents b2db62b6 b9ed3928
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -129,8 +129,11 @@ static int tipc_udp_addr2str(struct tipc_media_addr *a, char *buf, int size)
		snprintf(buf, size, "%pI4:%u", &ua->ipv4, ntohs(ua->port));
	else if (ntohs(ua->proto) == ETH_P_IPV6)
		snprintf(buf, size, "%pI6:%u", &ua->ipv6, ntohs(ua->port));
	else
	else {
		pr_err("Invalid UDP media address\n");
		return 1;
	}

	return 0;
}