refactoring

This commit is contained in:
Maxim Devaev
2026-01-28 08:49:41 +02:00
parent 12cf4492bd
commit 6ac5a5f065
35 changed files with 143 additions and 163 deletions

View File

@@ -24,11 +24,11 @@
#include <string.h>
#include <strings.h>
#include <assert.h>
#include <sys/mman.h>
#include "types.h"
#include "tools.h"
us_memsink_shared_s *us_memsink_shared_map(int fd, uz data_size) {
@@ -40,12 +40,12 @@ us_memsink_shared_s *us_memsink_shared_map(int fd, uz data_size) {
if (mem == MAP_FAILED) {
return NULL;
}
assert(mem != NULL);
US_A(mem != NULL);
return mem;
}
int us_memsink_shared_unmap(us_memsink_shared_s *mem, uz data_size) {
assert(mem != NULL);
US_A(mem != NULL);
return munmap(mem, sizeof(us_memsink_shared_s) + data_size);
}