vfs: eliminte writes to NULL error code pointers
This commit is contained in:
parent
389ca018d1
commit
0f5da3c539
2 changed files with 9 additions and 4 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue