mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 09:41:03 -04:00
Fix warnings due to type mismatch.
Cast ctxp to caddr_t to pass data as expected. While void * is a universal type, char * isn't (and that's what caddr_t is defined as). One could argue these prototypes should take void * rather than caddr_t, but changing that is much more invasive. Sponsored by: Netflix
This commit is contained in:
parent
6fefa52c48
commit
f4380fc45d
1 changed files with 3 additions and 3 deletions
|
|
@ -82,17 +82,17 @@ geliboot_crypt(u_int algo, int enc, u_char *data, size_t datasize,
|
|||
rijndael_set_key(&ctxp->key1, key, xts_len / 2);
|
||||
rijndael_set_key(&ctxp->key2, key + (xts_len / 16), xts_len / 2);
|
||||
|
||||
enc_xform_aes_xts.reinit(ctxp, iv);
|
||||
enc_xform_aes_xts.reinit((caddr_t)ctxp, iv);
|
||||
|
||||
switch (enc) {
|
||||
case 0: /* decrypt */
|
||||
for (i = 0; i < datasize; i += AES_XTS_BLOCKSIZE) {
|
||||
enc_xform_aes_xts.decrypt(ctxp, data + i);
|
||||
enc_xform_aes_xts.decrypt((caddr_t)ctxp, data + i);
|
||||
}
|
||||
break;
|
||||
case 1: /* encrypt */
|
||||
for (i = 0; i < datasize; i += AES_XTS_BLOCKSIZE) {
|
||||
enc_xform_aes_xts.encrypt(ctxp, data + i);
|
||||
enc_xform_aes_xts.encrypt((caddr_t)ctxp, data + i);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue