Fix ifndef
names. Remove useless summation
This commit is contained in:
parent
256efe6b22
commit
fe30349d17
3 changed files with 10 additions and 10 deletions
|
@ -1,5 +1,5 @@
|
||||||
#ifndef LINKED_LIST_C
|
#ifndef MEMORY_C
|
||||||
#define LINKED_LIST_C
|
#define MEMORY_C
|
||||||
|
|
||||||
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
@ -26,7 +26,7 @@ typedef struct page_tag {
|
||||||
page_tag *start = (void *) MEMORY_START;;
|
page_tag *start = (void *) MEMORY_START;;
|
||||||
|
|
||||||
size_t calculate_realsize(size_t size) {
|
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);
|
return size + PAGE_ALIGNMENT - (size % PAGE_ALIGNMENT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -205,4 +205,4 @@ int command_mem_dump(char *string) {
|
||||||
// test_allocs();
|
// test_allocs();
|
||||||
//}
|
//}
|
||||||
|
|
||||||
#endif // LINKED_LIST_C
|
#endif // MEMORY_C
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef TESTS_C
|
#ifndef TESTS_TESTS_C
|
||||||
#define TESTS_C
|
#define TESTS_TESTS_C
|
||||||
|
|
||||||
#define TESTS_ENABLED
|
#define TESTS_ENABLED
|
||||||
#ifdef TESTS_ENABLED
|
#ifdef TESTS_ENABLED
|
||||||
|
@ -88,4 +88,4 @@ static char *all_tests() {
|
||||||
|
|
||||||
#endif // TESTS_ENABLED
|
#endif // TESTS_ENABLED
|
||||||
|
|
||||||
#endif // TESTS_C
|
#endif // TESTS_TESTS_C
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef TABS_PRINTER_C
|
#ifndef UTIL_PRINTER_C
|
||||||
#define TABS_PRINTER_C
|
#define UTIL_PRINTER_C
|
||||||
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
|
||||||
|
@ -69,4 +69,4 @@ void print(const char *fmt, ...) {
|
||||||
va_end(argp);
|
va_end(argp);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif //TABS_PRINTER_C
|
#endif //UTIL_PRINTER_C
|
Loading…
Reference in a new issue