Modify PADLOCK_ALIGN() macro, so when the given address is already 16 bytes
aligned, it will be used directly, not 'address + 16'.
This commit is contained in:
parent
1fa760f7a0
commit
78c344f3da
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=160675
@ -72,7 +72,7 @@ struct padlock_session {
|
|||||||
TAILQ_ENTRY(padlock_session) ses_next;
|
TAILQ_ENTRY(padlock_session) ses_next;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define PADLOCK_ALIGN(p) (void *)((char *)(p) - ((uintptr_t)(p) % 16) + 16)
|
#define PADLOCK_ALIGN(p) (void *)((uintptr_t)(p) - (((uintptr_t)(p) - 1) % 16) + 15)
|
||||||
|
|
||||||
int padlock_cipher_setup(struct padlock_session *ses,
|
int padlock_cipher_setup(struct padlock_session *ses,
|
||||||
struct cryptoini *encini);
|
struct cryptoini *encini);
|
||||||
|
Loading…
Reference in New Issue
Block a user