diff options
| author | Filip Wandzio <contact@philw.dev> | 2025-12-30 02:45:11 +0100 |
|---|---|---|
| committer | Filip Wandzio <contact@philw.dev> | 2025-12-30 02:45:11 +0100 |
| commit | 4c90d1d9e4092f9ee0106d316829144653a276ea (patch) | |
| tree | cba5e7697a1334da068c5fa5e5951e00696fb903 /src/util/util.c | |
| parent | 11b1ff4691ff3e0f8346e7431fa3f90cc846fc5d (diff) | |
| download | dwm-4c90d1d9e4092f9ee0106d316829144653a276ea.tar.gz dwm-4c90d1d9e4092f9ee0106d316829144653a276ea.zip | |
Split monolithic dwm.h into modular headers and group them by it's functionalities
The new plan of refactoring this project is to split entire monolithic codebase into separate, (kind of) independent modules. This will help with understanding the code by turning off modules and deciding which ones require some work.
Signed-off-by: Filip Wandzio <contact@philw.dev>
Diffstat (limited to 'src/util/util.c')
| -rw-r--r-- | src/util/util.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/util/util.c b/src/util/util.c index 61c864c..7938f0f 100644 --- a/src/util/util.c +++ b/src/util/util.c | |||
| @@ -54,11 +54,11 @@ void die(const char *format_string, ...) | |||
| 54 | * int *array = ecalloc(10, sizeof(int)); // Allocate memory for an array of | 54 | * int *array = ecalloc(10, sizeof(int)); // Allocate memory for an array of |
| 55 | * 10 integers. | 55 | * 10 integers. |
| 56 | */ | 56 | */ |
| 57 | void *ecalloc(size_t num_elements, size_t element_size) | 57 | void *ecalloc(const size_t num_elements, const size_t element_size) |
| 58 | { | 58 | { |
| 59 | void *allocated_memory; | 59 | void *allocated_memory; |
| 60 | 60 | ||
| 61 | if (!(allocated_memory = calloc(num_elements, element_size))) | 61 | if (!((allocated_memory = calloc(num_elements, element_size)))) |
| 62 | die("calloc:"); | 62 | die("calloc:"); |
| 63 | 63 | ||
| 64 | return allocated_memory; | 64 | return allocated_memory; |
