瀏覽代碼

fix wrongly used LTC_ARGCHK/LTC_ARGCHKVD macros

Steffen Jaeckel 10 年之前
父節點
當前提交
318dbbccc3
共有 4 個文件被更改,包括 6 次插入6 次删除
  1. 3 3
      src/pk/dh/dh.c
  2. 1 1
      src/pk/dh/dh_static.h
  3. 1 1
      src/pk/rsa/rsa_get_size.c
  4. 1 1
      src/pk/rsa/rsa_sign_saltlen_get.c

+ 3 - 3
src/pk/dh/dh.c

@@ -77,8 +77,8 @@ done:
 void dh_sizes(int *low, int *high)
 {
    int x;
-   LTC_ARGCHK(low != NULL);
-   LTC_ARGCHK(high != NULL);
+   LTC_ARGCHKVD(low != NULL);
+   LTC_ARGCHKVD(high != NULL);
    *low  = INT_MAX;
    *high = 0;
    for (x = 0; sets[x].size != 0; x++) {
@@ -187,7 +187,7 @@ error2:
 */
 void dh_free(dh_key *key)
 {
-   LTC_ARGCHK(key != NULL);
+   LTC_ARGCHKVD(key != NULL);
    if ( key->x ) {
 		mp_clear( key->x );
 		key->x = NULL;

+ 1 - 1
src/pk/dh/dh_static.h

@@ -71,7 +71,7 @@
 
 static inline void packet_store_header (unsigned char *dst, int section, int subsection)
 {
-   LTC_ARGCHK(dst != NULL);
+   LTC_ARGCHKVD(dst != NULL);
 
    /* store version number */
    dst[0] = (unsigned char)(CRYPT&255);

+ 1 - 1
src/pk/rsa/rsa_get_size.c

@@ -25,7 +25,7 @@
 int rsa_get_size(rsa_key *key)
 {
   int ret = INT_MAX;
-  LTC_ARGCHKVD(key != NULL);
+  LTC_ARGCHK(key != NULL);
 
   if (key)
   {

+ 1 - 1
src/pk/rsa/rsa_sign_saltlen_get.c

@@ -27,7 +27,7 @@
 int rsa_sign_saltlen_get_max_ex(int padding, int hash_idx, rsa_key *key)
 {
   int ret = INT_MAX;
-  LTC_ARGCHKVD(key != NULL);
+  LTC_ARGCHK(key != NULL);
 
   if ((hash_is_valid(hash_idx) == CRYPT_OK) &&
       (padding == LTC_PKCS_1_PSS))