X-Git-Url: http://wagner.pp.ru/gitweb/?a=blobdiff_plain;f=gost_crypt.c;h=8f8e0d382ff05bd340f504b34e29f5a49830454b;hb=5066a5ec83976a283f676b0386e0cb15fd7378dc;hp=3cbea7620c776c7b8954bdf05882615e1354f383;hpb=711b83cba2fb9d5615e83ce17ccd1fbd66d4b9db;p=openssl-gost%2Fengine.git diff --git a/gost_crypt.c b/gost_crypt.c index 3cbea76..8f8e0d3 100644 --- a/gost_crypt.c +++ b/gost_crypt.c @@ -74,7 +74,7 @@ static int magma_cipher_ctl_acpkm_omac(EVP_CIPHER_CTX *ctx, int type, int arg, v * Note: that you cannot template 0 value. */ #define TPL(st,field) ( \ - ((st)->field) ?: TPL_VAL(st,field) \ + ((st)->field) ? ((st)->field) : TPL_VAL(st,field) \ ) #define TPL_VAL(st,field) ( \ @@ -649,7 +649,7 @@ static void ctr64_inc(unsigned char *counter) static inline void apply_acpkm_magma(struct ossl_gost_cipher_ctx * ctx, unsigned int *num) { - if (!ctx->key_meshing || (*num < ctx->key_meshing)) + if (!ctx->key_meshing || (*num < (unsigned int)ctx->key_meshing)) return; acpkm_magma_key_meshing(&ctx->cctx); *num &= MAGMA_BLOCK_MASK;