浏览代码

use nick's _ARRAYSIZE abstraction

svn:r1741
Roger Dingledine 20 年之前
父节点
当前提交
5d1510883e
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      src/common/crypto.c

+ 1 - 2
src/common/crypto.c

@@ -78,8 +78,7 @@ struct crypto_pk_env_t
 struct crypto_cipher_env_t
 {
   unsigned char key[CIPHER_KEY_LEN];
-  unsigned char iv[CIPHER_IV_LEN+1];
-    /* +1 because some compilers don't like a length of 0 */
+  unsigned char iv[_ARRAYSIZE(CIPHER_IV_LEN)];
   aes_cnt_cipher_t *cipher;
 };