Browse Source

Merge branch 'redirect_xss' into bfgminer

Luke Dashjr 11 years ago
parent
commit
8cb2f8f789
1 changed files with 4 additions and 2 deletions
  1. 4 2
      util.c

+ 4 - 2
util.c

@@ -2016,7 +2016,8 @@ void _test_extract_domain(const char * const expect, const char * const uri)
 	size_t sz;
 	size_t sz;
 	const char * const d = extract_domain(&sz, uri, strlen(uri));
 	const char * const d = extract_domain(&sz, uri, strlen(uri));
 	if (sz != strlen(expect) || strncasecmp(d, expect, sz))
 	if (sz != strlen(expect) || strncasecmp(d, expect, sz))
-		applog(LOG_WARNING, "extract_domain \"%s\" test failed; got \"%.*s\" instead of \"%s\"", uri, sz, d, expect);
+		applog(LOG_WARNING, "extract_domain \"%s\" test failed; got \"%.*s\" instead of \"%s\"",
+		       uri, (int)sz, d, expect);
 }
 }
 
 
 static
 static
@@ -2025,7 +2026,8 @@ void _test_get_regd_domain(const char * const expect, const char * const fqdn)
 	size_t sz;
 	size_t sz;
 	const char * const d = get_registered_domain(&sz, fqdn, strlen(fqdn));
 	const char * const d = get_registered_domain(&sz, fqdn, strlen(fqdn));
 	if (d == NULL || sz != strlen(expect) || strncasecmp(d, expect, sz))
 	if (d == NULL || sz != strlen(expect) || strncasecmp(d, expect, sz))
-		applog(LOG_WARNING, "get_registered_domain \"%s\" test failed; got \"%.*s\" instead of \"%s\"", fqdn, sz, d, expect);
+		applog(LOG_WARNING, "get_registered_domain \"%s\" test failed; got \"%.*s\" instead of \"%s\"",
+		       fqdn, (int)sz, d, expect);
 }
 }
 
 
 void test_domain_funcs()
 void test_domain_funcs()