mirror of
https://github.com/QuasarApp/openssl.git
synced 2025-05-17 11:59:42 +00:00
Fix some GitHub issues.
GH1180: Local variable sometimes unused GH1181: Missing close paren. Thanks to <wipedout@yandex.ru> for reporting these. Reviewed-by: Richard Levitte <levitte@openssl.org>
This commit is contained in:
parent
47ae05ba62
commit
56989dcd0e
@ -14,7 +14,6 @@ void DES_string_to_key(const char *str, DES_cblock *key)
|
|||||||
{
|
{
|
||||||
DES_key_schedule ks;
|
DES_key_schedule ks;
|
||||||
int i, length;
|
int i, length;
|
||||||
register unsigned char j;
|
|
||||||
|
|
||||||
memset(key, 0, 8);
|
memset(key, 0, 8);
|
||||||
length = strlen(str);
|
length = strlen(str);
|
||||||
@ -23,7 +22,8 @@ void DES_string_to_key(const char *str, DES_cblock *key)
|
|||||||
(*key)[i % 8] ^= (str[i] << 1);
|
(*key)[i % 8] ^= (str[i] << 1);
|
||||||
#else /* MIT COMPATIBLE */
|
#else /* MIT COMPATIBLE */
|
||||||
for (i = 0; i < length; i++) {
|
for (i = 0; i < length; i++) {
|
||||||
j = str[i];
|
register unsigned char j = str[i];
|
||||||
|
|
||||||
if ((i % 16) < 8)
|
if ((i % 16) < 8)
|
||||||
(*key)[i % 8] ^= (j << 1);
|
(*key)[i % 8] ^= (j << 1);
|
||||||
else {
|
else {
|
||||||
@ -46,7 +46,6 @@ void DES_string_to_2keys(const char *str, DES_cblock *key1, DES_cblock *key2)
|
|||||||
{
|
{
|
||||||
DES_key_schedule ks;
|
DES_key_schedule ks;
|
||||||
int i, length;
|
int i, length;
|
||||||
register unsigned char j;
|
|
||||||
|
|
||||||
memset(key1, 0, 8);
|
memset(key1, 0, 8);
|
||||||
memset(key2, 0, 8);
|
memset(key2, 0, 8);
|
||||||
@ -66,7 +65,8 @@ void DES_string_to_2keys(const char *str, DES_cblock *key1, DES_cblock *key2)
|
|||||||
}
|
}
|
||||||
#else /* MIT COMPATIBLE */
|
#else /* MIT COMPATIBLE */
|
||||||
for (i = 0; i < length; i++) {
|
for (i = 0; i < length; i++) {
|
||||||
j = str[i];
|
register unsigned char j = str[i];
|
||||||
|
|
||||||
if ((i % 32) < 16) {
|
if ((i % 32) < 16) {
|
||||||
if ((i % 16) < 8)
|
if ((i % 16) < 8)
|
||||||
(*key1)[i % 8] ^= (j << 1);
|
(*key1)[i % 8] ^= (j << 1);
|
||||||
|
@ -641,7 +641,7 @@ static int hwcrhk_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f) (void))
|
|||||||
CRYPTO_THREAD_write_lock(chil_lock);
|
CRYPTO_THREAD_write_lock(chil_lock);
|
||||||
BIO_free(logstream);
|
BIO_free(logstream);
|
||||||
logstream = NULL;
|
logstream = NULL;
|
||||||
if (BIO_up_ref(bio)
|
if (BIO_up_ref(bio))
|
||||||
logstream = bio;
|
logstream = bio;
|
||||||
else
|
else
|
||||||
HWCRHKerr(HWCRHK_F_HWCRHK_CTRL, HWCRHK_R_BIO_WAS_FREED);
|
HWCRHKerr(HWCRHK_F_HWCRHK_CTRL, HWCRHK_R_BIO_WAS_FREED);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user