summaryrefslogtreecommitdiff
path: root/scripts/sign-file.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2015-08-13 06:03:12 +0300
committerDavid Howells <dhowells@redhat.com>2015-08-13 06:03:12 +0300
commite9a5e8cc55286941503f36c5b7485a5aa923b3f1 (patch)
tree169f250c2b7c3632530c77c9c5a52ab9581693b8 /scripts/sign-file.c
parent772111ab01eace6a7e4cf821a4348cec64a97c92 (diff)
downloadlinux-e9a5e8cc55286941503f36c5b7485a5aa923b3f1.tar.xz
sign-file: Fix warning about BIO_reset() return value
Fix the following warning: scripts/sign-file.c: In function ‘main’: scripts/sign-file.c:188: warning: value computed is not used whereby the result of BIO_ctrl() is cast inside of BIO_reset() to an integer of a different size - which we're not checking but probably should. Reported-by: James Morris <jmorris@namei.org> Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'scripts/sign-file.c')
-rwxr-xr-xscripts/sign-file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/sign-file.c b/scripts/sign-file.c
index e9741e879bbd..058bba3103e2 100755
--- a/scripts/sign-file.c
+++ b/scripts/sign-file.c
@@ -185,7 +185,7 @@ int main(int argc, char **argv)
ERR(!b, "%s", x509_name);
x509 = d2i_X509_bio(b, NULL); /* Binary encoded X.509 */
if (!x509) {
- BIO_reset(b);
+ ERR(BIO_reset(b) != 1, "%s", x509_name);
x509 = PEM_read_bio_X509(b, NULL, NULL, NULL); /* PEM encoded X.509 */
if (x509)
drain_openssl_errors();