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:
pjd 2006-07-25 19:06:54 +00:00
parent 1bdee6da83
commit 90aa974bdf

View File

@ -72,7 +72,7 @@ struct padlock_session {
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,
struct cryptoini *encini);