diff options
author | Nikolay Morozov <nmorozoff77@yandex.ru> | 2020-02-27 14:28:07 +0300 |
---|---|---|
committer | Dmitry Belyavskiy <beldmit@users.noreply.github.com> | 2020-02-29 21:57:21 +0300 |
commit | d1cf560c742d85ab1986fb0cabe0f9e3a1f0eb23 (patch) | |
tree | cbea4f290be794da54bc2038e0ab933fed8cefc9 /gost_grasshopper_cipher.c | |
parent | 0906436e33bdd8dabf07d494e3d6d5184cc02246 (diff) | |
download | gost-engine-d1cf560c742d85ab1986fb0cabe0f9e3a1f0eb23.zip gost-engine-d1cf560c742d85ab1986fb0cabe0f9e3a1f0eb23.tar.gz gost-engine-d1cf560c742d85ab1986fb0cabe0f9e3a1f0eb23.tar.bz2 |
cppcheck: Variable is reassigned a value before the old one has been used.
Plus some minor chnages
- function defenition doen't match function declaration
- Consecutive break statement is unnecessary.
- Type missmatch in format string
Diffstat (limited to 'gost_grasshopper_cipher.c')
-rw-r--r-- | gost_grasshopper_cipher.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/gost_grasshopper_cipher.c b/gost_grasshopper_cipher.c index 777ca0a..f6b8a39 100644 --- a/gost_grasshopper_cipher.c +++ b/gost_grasshopper_cipher.c @@ -692,9 +692,7 @@ int gost_grasshopper_set_asn1_parameters(EVP_CIPHER_CTX *ctx, ASN1_TYPE *params) { int len = 0; unsigned char *buf = NULL; - ASN1_OCTET_STRING *os = NULL; - - os = ASN1_OCTET_STRING_new(); + ASN1_OCTET_STRING *os = ASN1_OCTET_STRING_new(); if (!os || !ASN1_OCTET_STRING_set(os, buf, len)) { ASN1_OCTET_STRING_free(os); |