]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - crypto/acompress.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
[linux.git] / crypto / acompress.c
index 1544b7c057fb5660e593c64d2033542fa9d1ea47..0c5bedd06e705525ab2cbc49a2c951713fa3d633 100644 (file)
@@ -33,15 +33,11 @@ static int crypto_acomp_report(struct sk_buff *skb, struct crypto_alg *alg)
 {
        struct crypto_report_acomp racomp;
 
-       strncpy(racomp.type, "acomp", sizeof(racomp.type));
+       memset(&racomp, 0, sizeof(racomp));
 
-       if (nla_put(skb, CRYPTOCFGA_REPORT_ACOMP,
-                   sizeof(struct crypto_report_acomp), &racomp))
-               goto nla_put_failure;
-       return 0;
+       strscpy(racomp.type, "acomp", sizeof(racomp.type));
 
-nla_put_failure:
-       return -EMSGSIZE;
+       return nla_put(skb, CRYPTOCFGA_REPORT_ACOMP, sizeof(racomp), &racomp);
 }
 #else
 static int crypto_acomp_report(struct sk_buff *skb, struct crypto_alg *alg)