/
githubmirror
/
libtpms
Обзор
Документация
Войти
/
githubmirror
/
libtpms
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
src/tpm2/Utils.h
20 строк
417 B
Stefan Berger
Sync: Move many files to BSD-2-Clause license
13 фев 2026, 17:59
13 фев 2026, 17:59
65b3939
Код
Авторство
О чём код?
// SPDX-License-Identifier: BSD-2-Clause // (c) Copyright IBM Corporation 2017,2018. #ifndef UTILS_H #define UTILS_H #include "prototypes/Memory_fp.h" #define TPM2_ROUNDUP(VAL, SIZE) \ ( ( (VAL) + (SIZE) - 1) / (SIZE) ) * (SIZE) __attribute__((unused)) static inline void clear_and_free(void *ptr, size_t size) { if (ptr) { MemorySet(ptr, 0, size); free(ptr); } } #endif /* UTILS_H */