vfs: eliminte writes to NULL error code pointers

This commit is contained in:
Michael Shaw 2024-02-12 23:58:26 -05:00
commit 0f5da3c539
2 changed files with 9 additions and 4 deletions

View file

@ -18,6 +18,11 @@
#define PACKED __attribute__((packed))
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
#define ATTEMPT_WRITE(_x, _y) \
if (_x) { \
*(_x) = _y; \
}
#define KB (1024ull)
#define MB (KB * KB)
#define GB (KB * MB)