Print this page
6717509 Need to use bswap/bswapq for byte swap of 64-bit integer on x32/x64 (fix lint)

Split Close
Expand all
Collapse all
          --- old/usr/src/common/crypto/modes/ctr.c
          +++ new/usr/src/common/crypto/modes/ctr.c
↓ open down ↓ 51 lines elided ↑ open up ↑
  52   52          size_t need;
  53   53          uint8_t *datap = (uint8_t *)data;
  54   54          uint8_t *blockp;
  55   55          uint8_t *lastp;
  56   56          void *iov_or_mp;
  57   57          offset_t offset;
  58   58          uint8_t *out_data_1;
  59   59          uint8_t *out_data_2;
  60   60          size_t out_data_1_len;
  61   61          uint64_t counter;
  62      -#ifdef _LITTLE_ENDIAN
  63      -        uint8_t *p;
  64      -#endif
  65   62  
  66   63          if (length + ctx->ctr_remainder_len < block_size) {
  67   64                  /* accumulate bytes here and return */
  68   65                  bcopy(datap,
  69   66                      (uint8_t *)ctx->ctr_remainder + ctx->ctr_remainder_len,
  70   67                      length);
  71   68                  ctx->ctr_remainder_len += length;
  72   69                  ctx->ctr_copy_to = datap;
  73   70                  return (CRYPTO_SUCCESS);
  74   71          }
↓ open down ↓ 171 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX