Revert "[wpa_supplicant] Cumulative patch from b8491ae5a"

This reverts commit 878cf7bcbf2d7d8f08c3d060b8c5fbfcf0743eda.

Reason for revert: git_master/sdk_phone_armv7-sdk

Change-Id: I6070fc5c1f9c20867f6dfce90e529e35578d572e
diff --git a/hs20/client/osu_client.c b/hs20/client/osu_client.c
index fd99600..1f594ce 100644
--- a/hs20/client/osu_client.c
+++ b/hs20/client/osu_client.c
@@ -1588,7 +1588,6 @@
 				      xml_node_t *node, const char *fqdn)
 {
 	char buf[200], dir[200];
-	int res;
 
 	wpa_printf(MSG_INFO, "- Credential/DigitalCertificate");
 
@@ -1600,20 +1599,14 @@
 		wpa_printf(MSG_INFO, "Failed to set username");
 	}
 
-	res = os_snprintf(buf, sizeof(buf), "%s/SP/%s/client-cert.pem", dir,
-			  fqdn);
-	if (os_snprintf_error(sizeof(buf), res))
-		return;
+	snprintf(buf, sizeof(buf), "%s/SP/%s/client-cert.pem", dir, fqdn);
 	if (os_file_exists(buf)) {
 		if (set_cred_quoted(ctx->ifname, id, "client_cert", buf) < 0) {
 			wpa_printf(MSG_INFO, "Failed to set client_cert");
 		}
 	}
 
-	res = os_snprintf(buf, sizeof(buf), "%s/SP/%s/client-key.pem", dir,
-			  fqdn);
-	if (os_snprintf_error(sizeof(buf), res))
-		return;
+	snprintf(buf, sizeof(buf), "%s/SP/%s/client-key.pem", dir, fqdn);
 	if (os_file_exists(buf)) {
 		if (set_cred_quoted(ctx->ifname, id, "private_key", buf) < 0) {
 			wpa_printf(MSG_INFO, "Failed to set private_key");
@@ -1627,7 +1620,6 @@
 {
 	char *str = xml_node_get_text(ctx->xml, node);
 	char buf[200], dir[200];
-	int res;
 
 	if (str == NULL)
 		return;
@@ -1642,9 +1634,7 @@
 
 	if (getcwd(dir, sizeof(dir)) == NULL)
 		return;
-	res = os_snprintf(buf, sizeof(buf), "%s/SP/%s/aaa-ca.pem", dir, fqdn);
-	if (os_snprintf_error(sizeof(buf), res))
-		return;
+	snprintf(buf, sizeof(buf), "%s/SP/%s/aaa-ca.pem", dir, fqdn);
 	if (os_file_exists(buf)) {
 		if (set_cred_quoted(ctx->ifname, id, "ca_cert", buf) < 0) {
 			wpa_printf(MSG_INFO, "Failed to set CA cert");
@@ -2727,8 +2717,6 @@
 
 	if (!pps_fname) {
 		char buf[256];
-		int res;
-
 		wpa_printf(MSG_INFO, "Determining PPS file based on Home SP information");
 		if (address && os_strncmp(address, "fqdn=", 5) == 0) {
 			wpa_printf(MSG_INFO, "Use requested FQDN from command line");
@@ -2749,13 +2737,8 @@
 			    "SP/%s/pps.xml", ctx->fqdn);
 		pps_fname = pps_fname_buf;
 
-		res = os_snprintf(ca_fname_buf, sizeof(ca_fname_buf),
-				  "SP/%s/ca.pem", buf);
-		if (os_snprintf_error(sizeof(ca_fname_buf), res)) {
-			os_free(ctx->fqdn);
-			ctx->fqdn = NULL;
-			return -1;
-		}
+		os_snprintf(ca_fname_buf, sizeof(ca_fname_buf), "SP/%s/ca.pem",
+			    buf);
 		ca_fname = ca_fname_buf;
 	}