Skip to contentSkip to conversation

Use formatting of module name in crypto API

PATCH Applied Alex Riesen 2 participants 2 messages May 27, 2009 – Jun 2, 2009 Crypto API

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Use formatting of module name in crypto API

Besdies, for the old code, gcc-4.3.3 produced this warning:
"format not a string literal and no format arguments"

---
 crypto/api.c |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)
crypto/api.c +3 -6
index fd2545d..fe98517 100644
@@ -217,14 +217,11 @@ struct crypto_alg *crypto_larval_lookup(const char *name, u32 type, u32 mask)
 
 	alg = crypto_alg_lookup(name, type, mask);
 	if (!alg) {
-		char tmp[CRYPTO_MAX_ALG_NAME];
-
-		request_module(name);
+		request_module("%s", name);
 
 		if (!((type ^ CRYPTO_ALG_NEED_FALLBACK) & mask &
-		      CRYPTO_ALG_NEED_FALLBACK) &&
-		    snprintf(tmp, sizeof(tmp), "%s-all", name) < sizeof(tmp))
-			request_module(tmp);
+		      CRYPTO_ALG_NEED_FALLBACK))
+			request_module("%s-all", name);
 
 		alg = crypto_alg_lookup(name, type, mask);
 	}
Signature · 1 line
1.6.3.1.197.g41544
maintainer Applied
#1 lore raw
Quoted 4 lines · Alex Riesen

Besdies, for the old code, gcc-4.3.3 produced this warning:
"format not a string literal and no format arguments"

Applied to cryptodev. Thanks!

Signature · 4 lines
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt