Fix ifndef names. Remove useless summation

This commit is contained in:
Maxime Bloch 2020-01-29 22:53:38 +01:00
parent 256efe6b22
commit fe30349d17
No known key found for this signature in database
GPG key ID: CE32A7D95B7D6418
3 changed files with 10 additions and 10 deletions

View file

@ -1,5 +1,5 @@
#ifndef LINKED_LIST_C
#define LINKED_LIST_C
#ifndef MEMORY_C
#define MEMORY_C
#include <stddef.h>
@ -26,7 +26,7 @@ typedef struct page_tag {
page_tag *start = (void *) MEMORY_START;;
size_t calculate_realsize(size_t size) {
if (size % PAGE_ALIGNMENT == 0) return size + 0;
if (size % PAGE_ALIGNMENT == 0) return size;
return size + PAGE_ALIGNMENT - (size % PAGE_ALIGNMENT);
}
@ -205,4 +205,4 @@ int command_mem_dump(char *string) {
// test_allocs();
//}
#endif // LINKED_LIST_C
#endif // MEMORY_C

View file

@ -1,5 +1,5 @@
#ifndef TESTS_C
#define TESTS_C
#ifndef TESTS_TESTS_C
#define TESTS_TESTS_C
#define TESTS_ENABLED
#ifdef TESTS_ENABLED
@ -88,4 +88,4 @@ static char *all_tests() {
#endif // TESTS_ENABLED
#endif // TESTS_C
#endif // TESTS_TESTS_C

View file

@ -1,5 +1,5 @@
#ifndef TABS_PRINTER_C
#define TABS_PRINTER_C
#ifndef UTIL_PRINTER_C
#define UTIL_PRINTER_C
#include <stdarg.h>
@ -69,4 +69,4 @@ void print(const char *fmt, ...) {
va_end(argp);
}
#endif //TABS_PRINTER_C
#endif //UTIL_PRINTER_C